您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Manages your hordes.io tokens.
当前为
// ==UserScript== // @name Hordes.io token manager. // @version 1.0 // @description Manages your hordes.io tokens. // @author Center-Z // @match http://hordes.io/* // @namespace https://greasyfork.org/users/120068 // ==/UserScript== $(window).on('load', ()=>{ if (typeof localStorage.loginTokens !== "string" || localStorage.getItem("loginTokens") === null) { var fl; var tkns = []; var tmp = prompt('Please enter your login token(s) seperated by spaces. (enter nothing to disable this feature): '); if (tmp !== null) { tmp = tmp.split(' '); for (var i in tmp) { tkns.push(tmp[i]); } } else { tkns[0] = 'None'; } localStorage.setItem('loginTokens', JSON.stringify(tkns)); tmp = ''; window.location.reload(); } else if (JSON.parse(localStorage.getItem("loginTokens")) !== ["None"]) { var tkns = JSON.parse(localStorage.loginTokens); var txt = []; for (var i = 0; i < tkns.length; i++) { n = i+1; txt.push(n+".)"+tkns[i]+"\n"); } var c = prompt('Select token:\n'+txt.join('')+'\nOr enter a new token to add it to the list.(Type token again to remove it)'); if (isNaN(c)) { if (tkns.includes(c)) { if (tkns.indexOf(c) !== 0) { tkns.splice(tkns.indexOf(c), 1); } else { tkns.shift(); } } else { tkns.push(c); } localStorage.loginTokens = JSON.stringify(tkns); window.location.reload(); } else { $("#loginTabId")[0].value = tkns[c-1]; setTimeout(()=> { $("#loginTabButton")[0].click(); }, 100); } } });