Skip to content

Commit fea9e01

Browse files
committed
新增 [反馈&建议]扩展菜单选项。
1 parent b71e0a6 commit fea9e01

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

GithubEnhanced-High-Speed-Download.user.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
// ==UserScript==
22
// @name Github 增强 - 高速下载
3-
// @version 1.1.4
3+
// @version 1.1.5
44
// @author X.I.U
55
// @description 为 Github 的 Clone、Release、Raw、Code(ZIP) 添加高速下载
66
// @match https://github.com/*/*
77
// @match https://github.com/*/*/releases
88
// @match https://github.com/*/*/releases/*
99
// @icon https://github.githubassets.com/favicon.ico
1010
// @require https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js
11+
// @grant GM_registerMenuCommand
12+
// @grant GM_openInTab
1113
// @license GPL-3.0 License
1214
// @run-at document-end
1315
// @namespace https://greasyfork.org/scripts/412245
@@ -47,13 +49,15 @@
4749
var raw_svg = `<svg class="octicon octicon-cloud-download" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path d="M9 12h2l-3 3-3-3h2V7h2v5zm3-8c0-.44-.91-3-4.5-3C5.08 1 3 2.92 3 5 1.02 5 0 6.52 0 8c0 1.53 1 3 3 3h3V9.7H3C1.38 9.7 1.3 8.28 1.3 8c0-.17.05-1.7 1.7-1.7h1.3V5c0-1.39 1.56-2.7 3.2-2.7 2.55 0 3.13 1.55 3.2 1.8v1.2H12c.81 0 2.7.22 2.7 2.2 0 2.09-2.25 2.2-2.7 2.2h-2V11h2c2.08 0 4-1.16 4-3.5C16 5.06 14.08 4 12 4z"></path></svg>`
4850
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;`
4951

52+
GM_registerMenuCommand('反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});});
53+
5054
addRelease(); // Release 加速
5155
addDownloadZIP(); // Source Code 加速
5256
addGitClone(); // Download ZIP/Code(ZIP) 加速
5357
addRawFile(); // Raw 加速
5458
setTimeout(addDownLink, 2000); // 添加 Raw 下载链接(添加到项目页文件名称后面),延迟 2 秒执行,避免被 pjax 刷掉
5559

56-
$(document).on('pjax:success',function(evt){
60+
document.addEventListener('pjax:success',function(){
5761
addRelease(); // Release 加速
5862
addDownloadZIP(); // Source Code 加速
5963
addGitClone(); // Download ZIP/Code(ZIP) 加速

0 commit comments

Comments
 (0)