From fea9e01cbd5fe80455c47f00e08f1024991c97ed Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Thu, 22 Oct 2020 18:30:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E5=8F=8D=E9=A6=88&?= =?UTF-8?q?=E5=BB=BA=E8=AE=AE]=E6=89=A9=E5=B1=95=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E9=80=89=E9=A1=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GithubEnhanced-High-Speed-Download.user.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/GithubEnhanced-High-Speed-Download.user.js b/GithubEnhanced-High-Speed-Download.user.js index 15f6d9b..1203ef5 100644 --- a/GithubEnhanced-High-Speed-Download.user.js +++ b/GithubEnhanced-High-Speed-Download.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Github 增强 - 高速下载 -// @version 1.1.4 +// @version 1.1.5 // @author X.I.U // @description 为 Github 的 Clone、Release、Raw、Code(ZIP) 添加高速下载 // @match https://github.com/*/* @@ -8,6 +8,8 @@ // @match https://github.com/*/*/releases/* // @icon https://github.githubassets.com/favicon.ico // @require https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js +// @grant GM_registerMenuCommand +// @grant GM_openInTab // @license GPL-3.0 License // @run-at document-end // @namespace https://greasyfork.org/scripts/412245 @@ -47,13 +49,15 @@ var raw_svg = `` var download_release_style = `padding:0 4px;margin-right: -1px;border-radius: 2px;background-color: #ffffff;border-color: rgba(27, 31, 35, 0.1);font-size: 12px;` + GM_registerMenuCommand('反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});}); + addRelease(); // Release 加速 addDownloadZIP(); // Source Code 加速 addGitClone(); // Download ZIP/Code(ZIP) 加速 addRawFile(); // Raw 加速 setTimeout(addDownLink, 2000); // 添加 Raw 下载链接(添加到项目页文件名称后面),延迟 2 秒执行,避免被 pjax 刷掉 - $(document).on('pjax:success',function(evt){ + document.addEventListener('pjax:success',function(){ addRelease(); // Release 加速 addDownloadZIP(); // Source Code 加速 addGitClone(); // Download ZIP/Code(ZIP) 加速