您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Default action for Non-active Treasure Maps set to identify
// ==UserScript== // @name Shartak Treasure Map Safety // @namespace http://userscripts.org/users/125692 // @description Default action for Non-active Treasure Maps set to identify // @include http://www.shartak.com/game.cgi // @include http://shartak.com/game.cgi // @include https://shartak.com/game.cgi // @include https://www.shartak.com/game.cgi // @version 1 // @run-at document-start // @grant none // ==/UserScript== (function() { function addNamedGlobalStyle(css,idname) { var head, style; head = document.getElementsByTagName('head')[0]; if (!head) { return; } style = document.createElement('style'); style.id=idname; style.type = 'text/css'; style.innerHTML = css; head.appendChild(style); } //first we make maps unclickable with css injecting style early. //nodot inventory //this one is named so can be toggled. addNamedGlobalStyle("ul.inventory{display:none!important;}","hideinventory"); //then we wait till dom ready then alter then reset css //set eventlistener for when page has maps ready for altering. document.addEventListener ("DOMContentLoaded", DOM_ContentReady); function DOM_ContentReady () { var treasuremaps=document.evaluate( "//input[starts-with(@value,'2Y(')]", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); if(treasuremaps.snapshotLength>0){//we have at least one activated map for(var i=0,j=0;j=treasuremaps.snapshotItem(i);i++){ j.parentNode.firstElementChild.selectedIndex=1; } } document.getElementById('hideinventory').disabled=true; } //EOF })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址