您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
revive big and stronk
// ==UserScript== // @name Big Revive // @namespace http://tampermonkey.net/ // @version 1.0 // @description revive big and stronk // @author NootNooot // @match https://www.torn.com/profiles.php?XID=* // @run-at document-start // @grant GM_addStyle // @license MIT // @icon https://www.google.com/s2/favicons?sz=64&domain=greasyfork.org // ==/UserScript== (function() { 'use strict'; function getSuccessChance() { const regex = /(\d+(?:\.\d+)?)%\s+chance of success/i; const text = document.body.innerText; const match = text.match(regex); return match ? parseFloat(match[1]) : null; } GM_addStyle(` .user-information, .buttons-list > a:not(.profile-button-revive) { display: none !important; } .profile-button-revive { position: fixed !important; top: 50% !important; left: 50% !important; transform: translate(-50%, -50%) !important; font-size: 24px !important; padding: 200px 400px !important; z-index: 9999 !important; } `); function styleConfirmButton() { GM_addStyle(` .confirm-action-yes { position: fixed !important; top: 50% !important; left: 50% !important; transform: translate(-50%, -50%) !important; font-size: 50px !important; padding: 200px 400px !important; z-index: 9999; } `); } let successThreshold = parseFloat(localStorage.getItem('reviveSuccessThreshold')) || 50; function waitForTextAndApply() { const interval = setInterval(() => { const chance = getSuccessChance(); if (chance !== null) { clearInterval(interval); if (chance > successThreshold) { styleConfirmButton(); } } }, 100); // checks every 100ms until it finds the percentage } waitForTextAndApply(); })();