From 695c41771db7ffc6557f8e646e5e98ca1fcdb42a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=AB=E8=B0=B7=E5=89=91=E4=BB=99?= Date: Thu, 2 Feb 2023 15:49:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E5=AE=89=E8=A3=85=E4=BA=86=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E7=9A=84=E6=A3=80=E6=B5=8B=E8=BD=AC=E7=A7=BB=E5=88=B0?= =?UTF-8?q?=E5=8E=9F=E7=89=88=E7=BD=91=E9=A1=B5=E5=86=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/link-helper.js | 3 +-- script.js | 5 ++++- service-worker.js | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/link-helper.js b/doc/link-helper.js index 12cabd22..39508b6f 100644 --- a/doc/link-helper.js +++ b/doc/link-helper.js @@ -4,7 +4,7 @@ // @name:zh-HK 龍圖急速陣型鏈接助手 // @name:zh-TW 龍圖急速陣型鏈接助手 // @namespace http://www.mapaler.com/ -// @version 1.0.2 +// @version 1.0.3 // @description Helps obtain team data from external cross-domain servers such as PADDB // @description:zh-CN 帮助获取 PADDB 等外部跨域服务器的队伍分享数据 // @description:zh-HK 幫助獲取 PADDB 等外部跨域服務器的隊伍分享數據 @@ -42,5 +42,4 @@ GM_xmlhttpRequest(options); }); }; - document.body.classList.add("external-link-support"); })(); \ No newline at end of file diff --git a/script.js b/script.js index 209a0775..efcec226 100644 --- a/script.js +++ b/script.js @@ -1932,6 +1932,10 @@ function initialize() { qrCodeFrame.show(); }; qrCodeFrame.initialize = function(){ + //如果检测到功能 + if (btnExternalSupport?.asyncGM_xmlhttpRequest) { + document.body.classList.add("external-link-support"); + } const qrSaveBox = this.content.saveBox; const qrReadBox = this.content.readBox; qrReadBox.info.show(''); @@ -2246,7 +2250,6 @@ function initialize() { const paddbSaveOrUpload = document.querySelector("#paddb-save-or-upload-team"); paddbSaveOrUpload.onclick = async function(){ this.disabled = true; - const btnExternalSupport = document.body.querySelector("#external-support"); if (!btnExternalSupport?.asyncGM_xmlhttpRequest) { alert(localTranslating.link_read_message.need_user_script); return; diff --git a/service-worker.js b/service-worker.js index 3d43129a..09c228ab 100644 --- a/service-worker.js +++ b/service-worker.js @@ -8091,7 +8091,7 @@ const cachesMap = new Map([ ], [ "script.js", - "910c1850224619f8c574087b1b5e0e8f" + "bc145197afe8fe38b0090b2930a69e15" ], [ "solo.html", @@ -8367,7 +8367,7 @@ const cachesMap = new Map([ ], [ "doc/index.html", - "b76648dd229ac25cfe97e670cf925ba9" + "16d7e69c328a122a2d6a2e14251c5f9a" ], [ "doc/images/player-bind-box.webp",