diff --git a/misc/Christmas_Town_Helper_2.3.3_mobile.js b/misc/Christmas_Town_Helper_2.3.3_mobile.js index 7218b65..0ff3d04 100644 --- a/misc/Christmas_Town_Helper_2.3.3_mobile.js +++ b/misc/Christmas_Town_Helper_2.3.3_mobile.js @@ -5,6 +5,7 @@ // @description 【Christmas Town Helper@2.3.3】修改而来,增加了PDA支持、国内可用的物品价值查询、简单的汉化,希望为国内TC玩家带来更好的体验 // @author Hardy [2131687] WOOHOO[2687093] // @match https://www.torn.com/christmas_town.php* +// @grant GM_setClipboard // @grant GM_addStyle // @grant unsafeWindow // @grant GM_getValue @@ -19,12 +20,12 @@ if (window.xmas_torn_helper_flag) return; window.xmas_torn_helper_flag = true; - /* + /** * 兼容手机 */ const wh_fake_GM = {}; try { - wh_fake_GM.isRunningUserscriptEngine = !!GM_xmlhttpRequest; + wh_fake_GM.isRunningUserscriptEngine = !!GM_setClipboard; } catch { wh_fake_GM.isRunningUserscriptEngine = false; window.GM_getValue = (k) => { @@ -74,8 +75,12 @@ }; window.unsafeWindow = window; } + let GM_getValue = window.GM_getValue; + let GM_setValue = window.GM_setValue; + let GM_addStyle = window.GM_addStyle; + let GM_xmlhttpRequest = window.GM_xmlhttpRequest; - /* + /** * 原始脚本 */ let version = "2.3.3"; @@ -612,7 +617,7 @@ } }); } - document.querySelector(".hardyCTBox2").innerHTML = '
Christmas Town Helper(圣诞小镇助手)











返回



'; + document.querySelector(".hardyCTBox2").innerHTML = '
Christmas Town Helper(圣诞小镇助手)











返回



'; let itemData = localStorage.getItem("ctHelperItemInfo"); var marketValueData; if (typeof itemData == "undefined" || itemData === null) {