Skip to content

Commit 2ac8360

Browse files
committed
update
1 parent d505db1 commit 2ac8360

7 files changed

Lines changed: 72 additions & 6 deletions
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// ==UserScript==
2+
// @name Github 增强 - 高速下载
3+
// @version 1.0.0
4+
// @author X.I.U
5+
// @description 为 Github 的 Releases、Code(ZIP) 添加高速下载
6+
// @match *://github.com/*
7+
// @icon https://github.githubassets.com/favicon.ico
8+
// @require https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js
9+
// @license GPL-3.0 License
10+
// @run-at document-end
11+
// @namespace https://greasyfork.org/scripts/412245
12+
// ==/UserScript==
13+
14+
(function() {
15+
var source_code = false; // Source code 加速,false=关闭,true=开启
16+
var download_url1 = "https://download.fastgit.org";
17+
var download_url2 = "https://github.wuyanzheshui.workers.dev";
18+
var download_url3 = "https://gh.api.99988866.xyz";
19+
var download_zip_svg = `<svg class="octicon octicon-file-zip mr-3" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>`;
20+
// Releases 加速
21+
$(".Box.Box--condensed").each(function () {
22+
$(this).find(".d-flex.Box-body>a").each(function () {
23+
var href = $(this).attr("href");
24+
var url1 = download_url1 + href;
25+
var url2 = download_url2 + href;
26+
var url3 = download_url3 + '/github.com' + href;
27+
var div1 = `<div style="display: flex;justify-content: flex-end;flex-grow: 1;">
28+
<div><a style="padding:1px 4px;margin-right: -1px;border-radius: 2px;" class="btn" href="${url1}" rel="nofollow">下载 01</a></div>
29+
<div><a style="padding:1px 4px;margin-right: -1px;border-radius: 2px;" class="btn" href="${url2}" rel="nofollow">下载 02</a></div>
30+
<div><a style="padding:1px 4px;margin-right: -1px;border-radius: 2px;" class="btn" href="${url3}" rel="nofollow">下载 03</a></div>
31+
</div>`
32+
33+
$(this).after(div1);
34+
});
35+
// Source code 加速,默认关闭
36+
if (source_code){
37+
$(this).find(".d-block.Box-body>a").each(function () {
38+
var href = $(this).attr("href");
39+
var url1 = download_url1 + href;
40+
var url2 = download_url2 + href;
41+
var url3 = download_url3 + '/github.com' + href;
42+
var div1 = `<div style="display: flex;">
43+
<div><a style="padding:0 4px;margin-right: -1px;border-radius: 2px;" class="btn user-btn-link" href="${url1}" rel="nofollow">下载 01</a></div>
44+
<div><a style="padding:0 4px;margin-right: -1px;border-radius: 2px;" class="btn user-btn-link" href="${url2}" rel="nofollow">下载 02</a></div>
45+
<div><a style="padding:0 4px;margin-right: -1px;border-radius: 2px;" class="btn user-btn-link" href="${url3}" rel="nofollow">下载 03</a></div>
46+
</div>`
47+
$(this).after(div1);
48+
});
49+
}
50+
});
51+
// Download ZIP 加速
52+
$(".dropdown-menu.dropdown-menu-sw.p-0 ul li:last-child").each(function () {
53+
var href_split = location.href.split("/");
54+
var url1 = download_url2 +"/"+href_split[3]+"/"+href_split[4]+ "/archive/master.zip";
55+
var url2 = download_url3 +"/"+location.href+ "/archive/master.zip";
56+
var span1 = `<li class="Box-row Box-row--hover-gray p-0"><a class="d-flex flex-items-center text-gray-dark text-bold no-underline p-3" rel="nofollow" href="${url1}">${download_zip_svg}Download ZIP 01</a></li>
57+
<li class="Box-row Box-row--hover-gray p-0"><a class="d-flex flex-items-center text-gray-dark text-bold no-underline p-3" rel="nofollow" href="${url2}">${download_zip_svg}Download ZIP 02</a></li>`;
58+
$(this).after(span1);
59+
});
60+
})();

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* [知乎增强 - 默认显示高清原图](https://greasyfork.org/scripts/412217)
1414
* [知乎增强 - 置顶显示发布/编辑时间](https://greasyfork.org/scripts/412216)
1515

16+
* [Github 增强 - 高速下载](https://greasyfork.org/scripts/412245)
17+
1618
****
1719

1820
## 如何安装/使用脚本?

SteamWorkshopImageRepair.user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
// @name Steam Workshop Image Repair
33
// @name:zh-CN Steam 创意工坊大图修复
44
// @name:zh-TW Steam 創意工坊大圖修復
5+
// @version 1.0.0
56
// @author X.I.U
67
// @description Fixed Steam Workshop image not showing
78
// @description:zh-CN 修复 Steam 创意工坊预览大图无法显示的问题。
89
// @description:zh-TW 修復 Steam 創意工坊預覽大圖無法顯示的問題。
910
// @include *://steamcommunity.com/sharedfiles/filedetails/*
1011
// @include *://steamcommunity.com/workshop/filedetails/*
11-
// @version 1.0.0
1212
// @icon https://store.steampowered.com/favicon.ico
13+
// @license GPL-3.0 License
1314
// @run-at document-end
1415
// @namespace https://greasyfork.org/scripts/397666
1516
// ==/UserScript==
1617

17-
1818
if(typeof onYouTubeIframeAPIReady == 'function') {
1919
onYouTubeIframeAPIReady();
2020
}

ZhihuEnhanced-CollapsedAnswer.user.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
// @name 知乎增强 - 一键收起回答
33
// @name:zh-CN 知乎增强 - 一键收起回答
44
// @name:zh-TW 知乎增強 - 壹鍵收起回答
5+
// @version 1.0.0
56
// @author X.I.U
67
// @description 在知乎右下角添加「一键收起回答」按钮,点击后可以收起所有长篇回答。
78
// @description:zh-CN 在知乎右下角添加「一键收起回答」按钮,点击后可以收起所有长篇回答。
89
// @description:zh-TW 在知乎右下角添加「壹鍵收起回答」按鈕,點擊後可以收起所有長篇回答。
910
// @include *://www.zhihu.com/question/*
10-
// @version 1.0.0
1111
// @icon https://static.zhihu.com/static/favicon.ico
1212
// @require https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js
13+
// @license GPL-3.0 License
1314
// @run-at document-end
1415
// @namespace https://greasyfork.org/scripts/412205
1516
// ==/UserScript==

ZhihuEnhanced-HD-Pictures.user.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
// ==UserScript==
22
// @name 知乎增强 - 默认显示高清原图
33
// @version 1.0.0
4-
// @description 回答和文章默认显示高清原图
54
// @author X.I.U
5+
// @description 回答和文章默认显示高清原图
66
// @match *://www.zhihu.com/*
77
// @match https://zhuanlan.zhihu.com/*
88
// @icon https://static.zhihu.com/static/favicon.ico
99
// @require https://cdn.bootcdn.net/ajax/libs/jquery/3.1.1/jquery.min.js
1010
// @connect zhihu.com
11+
// @license GPL-3.0 License
1112
// @run-at document-end
1213
// @namespace https://greasyfork.org/scripts/412217
1314
// ==/UserScript==

ZhihuEnhanced-Time.user.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
// ==UserScript==
22
// @name 知乎增强 - 置顶显示发布/编辑时间
33
// @version 1.0.1
4-
// @description 回答和文章置顶显示发布时间、编辑时间
54
// @author X.I.U
5+
// @description 回答和文章置顶显示发布时间、编辑时间
66
// @match *://www.zhihu.com/*
77
// @match https://zhuanlan.zhihu.com/*
88
// @icon https://static.zhihu.com/static/favicon.ico
99
// @require https://cdn.bootcdn.net/ajax/libs/jquery/3.1.1/jquery.min.js
1010
// @connect zhihu.com
1111
// @grant unsafeWindow
12+
// @license GPL-3.0 License
1213
// @run-at document-end
1314
// @namespace https://greasyfork.org/scripts/412216
1415
// ==/UserScript==

ZhihuEnhanced-Widescreen.user.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
// @name 知乎增强 - 宽屏显示
33
// @name:zh-CN 知乎增强 - 宽屏显示
44
// @name:zh-TW 知乎增強 - 寬屏顯示
5+
// @version 1.0.0
56
// @author X.I.U
67
// @description 将知乎首页、热榜、搜索等页面由窄屏改为宽屏显示。
78
// @description:zh-CN 将知乎首页、热榜、搜索等页面由窄屏改为宽屏显示。
89
// @description:zh-TW 將知乎首頁、熱榜、搜索等頁面由窄屏改為寬屏顯示。
910
// @include *://www.zhihu.com/*
10-
// @version 1.0.0
1111
// @icon https://static.zhihu.com/static/favicon.ico
12+
// @license GPL-3.0 License
1213
// @run-at document-start
1314
// @namespace https://greasyfork.org/scripts/412212
1415
// ==/UserScript==

0 commit comments

Comments
 (0)