|
1 | 1 | // ==UserScript== |
2 | 2 | // @name Github 增强 - 高速下载 |
3 | | -// @version 1.1.4 |
| 3 | +// @version 1.1.5 |
4 | 4 | // @author X.I.U |
5 | 5 | // @description 为 Github 的 Clone、Release、Raw、Code(ZIP) 添加高速下载 |
6 | 6 | // @match https://github.com/*/* |
7 | 7 | // @match https://github.com/*/*/releases |
8 | 8 | // @match https://github.com/*/*/releases/* |
9 | 9 | // @icon https://github.githubassets.com/favicon.ico |
10 | 10 | // @require https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js |
| 11 | +// @grant GM_registerMenuCommand |
| 12 | +// @grant GM_openInTab |
11 | 13 | // @license GPL-3.0 License |
12 | 14 | // @run-at document-end |
13 | 15 | // @namespace https://greasyfork.org/scripts/412245 |
|
47 | 49 | 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>` |
48 | 50 | 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;` |
49 | 51 |
|
| 52 | + GM_registerMenuCommand('反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});}); |
| 53 | + |
50 | 54 | addRelease(); // Release 加速 |
51 | 55 | addDownloadZIP(); // Source Code 加速 |
52 | 56 | addGitClone(); // Download ZIP/Code(ZIP) 加速 |
53 | 57 | addRawFile(); // Raw 加速 |
54 | 58 | setTimeout(addDownLink, 2000); // 添加 Raw 下载链接(添加到项目页文件名称后面),延迟 2 秒执行,避免被 pjax 刷掉 |
55 | 59 |
|
56 | | - $(document).on('pjax:success',function(evt){ |
| 60 | + document.addEventListener('pjax:success',function(){ |
57 | 61 | addRelease(); // Release 加速 |
58 | 62 | addDownloadZIP(); // Source Code 加速 |
59 | 63 | addGitClone(); // Download ZIP/Code(ZIP) 加速 |
|
0 commit comments