HV Potion bar

吃药

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name      HV Potion bar
// @namespace  Potionbar
// @version    0.82.0
// @description  吃药
// @match      http://hentaiverse.org/?s=Battle*
// @copyright  2015, ggxxsol
// ==/UserScript==
if (!document.getElementById("togpane_log"))return
if (document.querySelector(".btcp"))return
function itembar(itemno)
{
    if(tempb=document.getElementById('ikey_'+(itemno*1+1)))return tempb;
    else return false;
}
array = ['HPD', 'HP', 'MPD','MP','SPD','SP'];    //可修改名称,最多就六个,对应1-6的药水
array1 = ['green', 'green', 'blue','blue','red','red'];//可修改颜色,最多就六个
for (var i = 0; i < 6 ; i++ )
{
    ccc = document.createElement('div');
    ccc.style.cssText = "font-size:15pt;line-height:2.5;color:"+array1[i]+";z-index:100;width: 50px;height: 45px;position:absolute;left:"+(500+i*60)+"px;top:5px"//可调整位置
    ccc.innerHTML=array[i]
    if(itembar(i))
    {
        ccc.value=i*1+1
        ccc.onclick=function(){document.getElementById('ikey_'+this.value).onclick()}
        ccc.onmouseover=function(){this.style.background='rgba(63,237,208,0.50)'}
        ccc.onmouseout=function(){this.style.background=''}
        ccc.style.cursor='pointer'
    }
    else
    {
        ccc.style.background="white"
    }
    document.body.appendChild(ccc);
}