您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Calculates your total winnnings and profit in the Torn bookie
// ==UserScript== // @name Bookie Calculator // @namespace http://tampermonkey.net/ // @version 1.2 // @description Calculates your total winnnings and profit in the Torn bookie // @author LordBusiness // @match https://www.torn.com/bookie.php // @grant none // ==/UserScript== // a minimal jQuery library for reacting to innerHTML changes (function($) { $.fn.change = function(cb, e) { e = e || { subtree:true, childList:true, characterData:true }; $(this).each(function() { function callback(changes) { cb.call(node, changes, this); } var node = this; (new MutationObserver(callback)).observe(node, e); }); }; })(jQuery); var betTimer = setInterval(function() { if($(".bookie-main-wrap").length > 0) { betCalc(); } }, 3000); function betCalc() { if(($(".betRes").length == 0) && ($(".confirm-bet").length > 0)) { $('.confirm-bet').change(function(changes, observer) { try { var betMoney = $(this).text(); betMoney = /\$[0-9,]+/gm.exec(betMoney); var origBetMoney = parseInt(betMoney[0].replace(/[^0-9]/g, '')); console.log("Cons = " +betMoney); var betMultiplier = $(this).parent("ul.item").children("li.multiplier").first().text(); betMultiplier = parseFloat(betMultiplier.replace(/[^0-9.]/gi, '')); betMoney = parseInt(origBetMoney * betMultiplier); if(isNaN(betMoney)) throw 666; $("span.betRes").html(" Win: $" + betMoney.toLocaleString() + " Profit: $" + (betMoney - origBetMoney).toLocaleString()); } catch(err) { console.log("Err:" + err); } }); $(".info-msg").find(".msg").append('<span class="betRes"></span>'); } } console.log("Made by LordBusiness. Send me something if you like it ;)");
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址