Skip to content

Commit 7be3b87

Browse files
committed
修复 因 Github 样式更新导致 Release 加速源不显示的问题
1 parent eefe474 commit 7be3b87

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

GithubEnhanced-High-Speed-Download.user.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @name:zh-CN Github 增强 - 高速下载
44
// @name:zh-TW Github 增強 - 高速下載
55
// @name:en Github Enhancement - High Speed Download
6-
// @version 2.0.0
6+
// @version 2.0.1
77
// @author X.I.U
88
// @description 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁)
99
// @description:zh-CN 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁)
@@ -31,7 +31,7 @@
3131
var backColor = '#ffffff', fontColor = '#888888', menu_raw_fast = GM_getValue('xiu2_menu_raw_fast'), menu_menu_raw_fast_ID, menu_feedBack_ID;
3232
const download_url = [
3333
//['https://pd.zwc365.com/seturl/https://github.com', '美国', '[美国 Cloudflare CDN]'],
34-
['https://gh2.yanqishui.work/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@HongjieCN] 提供'],
34+
//['https://gh2.yanqishui.work/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@HongjieCN] 提供'],
3535
['https://gh.ddlc.top/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@mtr-static-official] 提供'],
3636
['https://gh.gh2233.ml/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@X.I.U/XIU2] 提供'],
3737
//['https://gh.api.99988866.xyz/https://github.com', '美国', '[美国 Cloudflare CDN]'],
@@ -48,7 +48,7 @@
4848
['https://download.fastgit.org', '日本', '[日本 东京] - 该公益加速源由 [FastGit] 提供', 'https://archive.fastgit.org'],
4949
['https://mirror.ghproxy.com/https://github.com', '日本', '[日本 东京] - 该公益加速源由 [ghproxy] 提供'],
5050
['https://ghproxy.com/https://github.com', '韩国', '[韩国 首尔] - 该公益加速源由 [ghproxy] 提供'],
51-
['https://hub.xn--gzu630h.xn--kpry57d', '韩国', '[韩国 首尔] - 该公益加速源由 [ghproxy] 提供']
51+
['https://hub.xn--gzu630h.xn--kpry57d', '韩国', '[韩国 首尔]']
5252
], clone_url = [
5353
//['https://github.do/https://github.com', '国内', '[中国 国内] - 该公益加速源由 [小麦云服] 提供'],
5454
['https://gitclone.com', '国内', '[中国 国内] - 该公益加速源由 [GitClone] 提供

 - 缓存:有
 - 首次比较慢,缓存后较快'],
@@ -57,7 +57,7 @@
5757
['https://hub.fastgit.xyz', '日本', '[日本 东京] - 该公益加速源由 [FastGit] 提供'],
5858
['https://mirror.ghproxy.com/https://github.com', '日本', '[日本 东京] - 该公益加速源由 [ghproxy] 提供'],
5959
['https://ghproxy.com/https://github.com', '韩国', '[韩国 首尔] - 该公益加速源由 [ghproxy] 提供'],
60-
['https://hub.xn--gzu630h.xn--kpry57d', '韩国', '[韩国 首尔] - 该公益加速源由 [ghproxy] 提供'],
60+
['https://hub.xn--gzu630h.xn--kpry57d', '韩国', '[韩国 首尔]'],
6161
//['https://gh.gcdn.mirr.one', '俄罗斯', '[俄罗斯 G-Core Labs CDN]'],
6262
//['https://cithub.icu', '美国', '[美国 洛杉矶]'],
6363
//['https://hub.xn--p8jhe.tw', '美国', '[美国 圣何塞]']
@@ -76,6 +76,7 @@
7676
['https://fastly.jsdelivr.net/gh', '日本 1', '[日本 东京] - 该公益加速源由 [JSDelivr CDN] 提供

 - 缓存:有
 - 不支持大小超过 50 MB 的文件
 - 不支持版本号格式的分支名(如 v1.2.3)'],
7777
['https://cdn.staticaly.com/gh', '日本 2', '[日本 东京] - 该公益加速源由 [Statically CDN] 提供

 - 缓存:有
 - 不支持大小超过 30 MB 的文件'],
7878
['https://raw.fastgit.org', '日本 3', '[日本 东京] - 该公益加速源由 [FastGit] 提供

 - 缓存:无(或时间很短)'],
79+
['https://raw.xn--gzu630h.xn--kpry57d', '韩国', '[韩国 首尔]

 - 缓存:无(或时间很短)'],
7980
//['https://raw.cithub.icu', '美国', '[美国 洛杉矶]

 - 缓存:无(或时间很短)'],
8081
//['https://raw.xn--p8jhe.tw', '美国', '[美国 圣何塞]

 - 缓存:无(或时间很短)'],
8182
//['https://git.yumenaka.net/https://raw.githubusercontent.com', '美国', '[美国 圣何塞]

 - 缓存:无(或时间很短)'],
@@ -150,11 +151,11 @@
150151
// Release
151152
function addRelease() {
152153
let html = document.querySelectorAll('.Box-footer'); if (html.length == 0) return
153-
let divDisplay = '';
154-
if (document.documentElement.clientWidth > 1000) {divDisplay = 'float: right;margin-top: -3px;margin-left: 8px;';}; // 调整小屏幕时的样式
154+
let divDisplay = 'margin-left: -90px;';
155+
if (document.documentElement.clientWidth > 755) {divDisplay = 'margin-top: -3px;margin-left: 8px;display: inherit;';}; // 调整小屏幕时的样式
155156
for (const current of html) {
156157
if (current.querySelector('.XIU2-RS')) continue
157-
current.querySelectorAll('li.Box-row > a').forEach(function (_this) {
158+
current.querySelectorAll('li.Box-row a').forEach(function (_this) {
158159
let href = _this.href.split(location.host),
159160
url = '', _html = `<div class="XIU2-RS" style="${divDisplay}">`;
160161

@@ -167,7 +168,7 @@
167168
if (location.host === 'hub.fastgit.xyz') url = url.replace('hub.fastgit.xyz','github.com')
168169
_html += `<a style="${style[0]}" class="btn" href="${url}" title="${download_url[i][2]}" rel="noreferrer noopener nofollow">${download_url[i][1]}</a>`
169170
}
170-
_this.insertAdjacentHTML('afterend', _html + '</div>');
171+
_this.parentElement.nextElementSibling.insertAdjacentHTML('beforeend', _html + '</div>');
171172
});
172173
}
173174
}

0 commit comments

Comments
 (0)