您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Makes the chain watch a whole lot bigger.
当前为
// ==UserScript== // @name Chain Watch // @namespace LordBusiness.CW // @version 1.2 // @description Makes the chain watch a whole lot bigger. // @author LordBusiness [2052465] // @match https://www.torn.com/* // @grant GM_addStyle // ==/UserScript== GM_addStyle(` .lbschainoverlay { opacity: 0.8; position: fixed; height: 100px; width: 200px; top: 10px; right: 10px; border-radius: 10px; background-color: white; z-index: 6666; display: flex; justify-content: center; align-items: center; font-size: 3rem; color: #2f2f2f; transition: all 1s; pointer-events: none; } .lbsvbig { height: calc(100% - 20px); width: calc(100% - 20px); bottom: 10px; left: 10px; font-size: 4rem; } .lbschainlabel { display: none; } .lbsvbig .lbschainlabel { display: initial !important; } `); document.getElementsByTagName("body")[0].insertAdjacentHTML("beforeend", `<div class="lbschainoverlay"><span class="lbschainlabel">Chain: </span><span class="lbschaintime"></span></div>`); const chainOverlay = document.querySelector(".lbschainoverlay"); var popupTimer; const displayOverlay = () => { chainOverlay.classList.add("lbsvbig"); } const barChainTime = "#barChain [class^=bar-stats] [class^=bar-timeleft]"; const Chainregex = /(\d{2}):\d{2}/igm; const observerChainTime = new MutationObserver((mutations) => { let CTime = document.querySelector(barChainTime).innerText; chainOverlay.querySelector(".lbschaintime").innerHTML = CTime; let ChainTimeregAr = Chainregex.exec(CTime); if(ChainTimeregAr !== null && parseInt(ChainTimeregAr[1]) <= 4) { chainOverlay.classList.add("t-red"); } else { chainOverlay.classList.remove("t-red"); } }) const observeObserverCT = () => { observerChainTime.observe(document.querySelector(barChainTime).childNodes[0], { characterData: true }) } const observerSidebar = new MutationObserver((mutations) => { for (const mutation of mutations) { if (document.querySelector(barChainTime) !== null) { console.log("This is also working!!"); observeObserverCT(); observerSidebar.disconnect(); } } }) const notInactive = () => { clearTimeout(popupTimer); chainOverlay.classList.remove("lbsvbig"); popupTimer = setTimeout(displayOverlay, 10000); } document.addEventListener('keypress', notInactive); document.addEventListener('mousemove', notInactive); if (document.querySelector(barChainTime) === null) { observerSidebar.observe(document.getElementById('sidebarroot'), { subtree: true, childList: true }) } else { observeObserverCT(); }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址