Surviv.io | Health and Adrenaline counter

apple apple apple

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Surviv.io | Health and Adrenaline counter
// @namespace    https://github.com/Samer-Kizi
// @version      1.1
// @description  apple apple apple
// @author       sk
// @license      MIT
// @match        https://surviv.io/*
// @match        https://surviv2.io/*
// @match        https://2dbattleroyale.com/*
// @match        https://2dbattleroyale.org/*
// @match        https://piearesquared.info/*
// @match        https://thecircleisclosing.com/*
// @match        https://secantsecant.com/*
// @match        https://parmainitiative.com/*
// @match        https://ot38.club/*
// @match        https://drchandlertallow.com/*
// @match        https://rarepotato.com/*
// @match        https://archimedesofsyracuse.info/*
// @match        https://nevelskoygroup.com/*
// @match        https://kugahi.com/*
// @match        https://kugaheavyindustry.com/*
// @match        https://chandlertallowmd.com/*
// @grant        none
// @require      http://code.jquery.com/jquery-3.4.1.min.js
// ==/UserScript==

// I stole health counter from Michal2SAB lol

(function() {
    'use strict';
    var lastHP = 0
    var health = document.createElement("span");
    health.style = "display:block;position:fixed;z-index: 2;margin:6px 0 0 0;right: 15px;mix-blend-mode: difference;font-weight: bold;font-size:large;";
    document.querySelector("#ui-health-container").appendChild(health);

    var adr = document.createElement("span");
    adr.style = "display:block;position:fixed;z-index: 2;margin:6px 0 0 0;left: 15px;mix-blend-mode: difference;font-weight: bold;font-size:large;";
    document.querySelector("#ui-health-container").appendChild(adr);

    setInterval(function(){
        var hp = document.getElementById("ui-health-actual").style.width.slice(0,-1)
        if(lastHP !== hp){
            lastHP = hp
            health.innerHTML = Math.round(hp)
        }
        var boost0 = document.getElementById("ui-boost-counter-0").querySelector(".ui-bar-inner").style.width.slice(0,-1),
            boost1 = document.getElementById("ui-boost-counter-1").querySelector(".ui-bar-inner").style.width.slice(0,-1),
            boost2 = document.getElementById("ui-boost-counter-2").querySelector(".ui-bar-inner").style.width.slice(0,-1),
            boost3 = document.getElementById("ui-boost-counter-3").querySelector(".ui-bar-inner").style.width.slice(0,-1),
            adr0 = boost0*25/100 + boost1*25/100 + boost2*37.5/100 + boost3*12.5/100
        adr.innerHTML = Math.round(adr0)
    })
})();