您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Helps you from unknownly claiming a faction hit
// ==UserScript== // @name Chain called hit alert // @namespace http://tampermonkey.net/ // @version 0.3 // @description Helps you from unknownly claiming a faction hit // @author Sil3ntOne [2008029] // @match https://www.torn.com/* // @grant none // ==/UserScript== (function(d) { 'use strict'; var currentCount = parseInt(d.querySelector('#barChain [class*="bar-value"]').innerText.split('/')[0]); console.log(currentCount); var limits = [250, 500, 1000, 2500, 5000, 10000, 25000, 50000, 100000]; for(var limit of limits) { var diff = limit - currentCount; console.log(diff); if(diff <= 10 && diff > 0) { if(localStorage.factionChainHitCallMsgAck != limit) { var resp = confirm("The " + limit + "th hit might have been called by someone.\nPlease check your faction chat to confirm.\n\nPlease confirm that you have read & acknowleged this message."); if(resp) { localStorage.factionChainHitCallMsgAck = limit; } } } } if(typeof localStorage.factionChainHitCallMsgAck != "undefined") { if(currentCount >= localStorage.factionChainHitCallMsgAck) { // Reset the ack after the limit has been crossed. delete localStorage.factionChainHitCallMsgAck; } } })(document);