您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
http://www.bloodyworld.com
// ==UserScript== // @name bw-fix-battle // @description http://www.bloodyworld.com // @include http://www.bloodyworld.com/* // @exclude http://www.bloodyworld.com/xfn/* // @exclude http://www.bloodyworld.com/xfn2/* // @version 0.0.1.20150604004031 // @namespace https://greasyfork.org/users/12000 // ==/UserScript== window.opera.defineMagicVariable( 'TotalDEF', function(x) { bDEF = document.getElementsByName('shit[]'); tot = 0; for (i=0; i<bDEF.length; i++) { if (bDEF[i].checked) tot ++; } return tot; }, null ); window.opera.defineMagicFunction( 'AddShitDEF', function(x) { if (TotalDEF<=MaxTotalDEF) { return 1; } else { alert('Maximum '+MaxTotalDEF+' defend points'); return 0; } } ); window.opera.defineMagicVariable( 'TotalATK', function(x) { tot = 0; bATK = document.getElementsByName('fire'); for (i=0; i<bATK.length; i++) { if (bATK[i].checked) tot ++; } bATK = document.getElementsByName('fire[]'); for (i=0; i<bATK.length; i++) { if (bATK[i].checked) tot ++; } return tot; }, null ); window.opera.defineMagicFunction( 'AddShitATK', function(x) { if (TotalATK<=MaxTotalATK) { return 1; } else { alert('Maximum '+MaxTotalATK+' attack points'); return 0; } } );