|
3 | 3 | // @name:zh-CN Github 增强 - 高速下载 |
4 | 4 | // @name:zh-TW Github 增強 - 高速下載 |
5 | 5 | // @name:en Github Enhancement - High Speed Download |
6 | | -// @version 2.0.0 |
| 6 | +// @version 2.0.1 |
7 | 7 | // @author X.I.U |
8 | 8 | // @description 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁) |
9 | 9 | // @description:zh-CN 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁) |
|
31 | 31 | var backColor = '#ffffff', fontColor = '#888888', menu_raw_fast = GM_getValue('xiu2_menu_raw_fast'), menu_menu_raw_fast_ID, menu_feedBack_ID; |
32 | 32 | const download_url = [ |
33 | 33 | //['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] 提供'], |
35 | 35 | ['https://gh.ddlc.top/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@mtr-static-official] 提供'], |
36 | 36 | ['https://gh.gh2233.ml/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@X.I.U/XIU2] 提供'], |
37 | 37 | //['https://gh.api.99988866.xyz/https://github.com', '美国', '[美国 Cloudflare CDN]'], |
|
48 | 48 | ['https://download.fastgit.org', '日本', '[日本 东京] - 该公益加速源由 [FastGit] 提供', 'https://archive.fastgit.org'], |
49 | 49 | ['https://mirror.ghproxy.com/https://github.com', '日本', '[日本 东京] - 该公益加速源由 [ghproxy] 提供'], |
50 | 50 | ['https://ghproxy.com/https://github.com', '韩国', '[韩国 首尔] - 该公益加速源由 [ghproxy] 提供'], |
51 | | - ['https://hub.xn--gzu630h.xn--kpry57d', '韩国', '[韩国 首尔] - 该公益加速源由 [ghproxy] 提供'] |
| 51 | + ['https://hub.xn--gzu630h.xn--kpry57d', '韩国', '[韩国 首尔]'] |
52 | 52 | ], clone_url = [ |
53 | 53 | //['https://github.do/https://github.com', '国内', '[中国 国内] - 该公益加速源由 [小麦云服] 提供'], |
54 | 54 | ['https://gitclone.com', '国内', '[中国 国内] - 该公益加速源由 [GitClone] 提供 - 缓存:有 - 首次比较慢,缓存后较快'], |
|
57 | 57 | ['https://hub.fastgit.xyz', '日本', '[日本 东京] - 该公益加速源由 [FastGit] 提供'], |
58 | 58 | ['https://mirror.ghproxy.com/https://github.com', '日本', '[日本 东京] - 该公益加速源由 [ghproxy] 提供'], |
59 | 59 | ['https://ghproxy.com/https://github.com', '韩国', '[韩国 首尔] - 该公益加速源由 [ghproxy] 提供'], |
60 | | - ['https://hub.xn--gzu630h.xn--kpry57d', '韩国', '[韩国 首尔] - 该公益加速源由 [ghproxy] 提供'], |
| 60 | + ['https://hub.xn--gzu630h.xn--kpry57d', '韩国', '[韩国 首尔]'], |
61 | 61 | //['https://gh.gcdn.mirr.one', '俄罗斯', '[俄罗斯 G-Core Labs CDN]'], |
62 | 62 | //['https://cithub.icu', '美国', '[美国 洛杉矶]'], |
63 | 63 | //['https://hub.xn--p8jhe.tw', '美国', '[美国 圣何塞]'] |
|
76 | 76 | ['https://fastly.jsdelivr.net/gh', '日本 1', '[日本 东京] - 该公益加速源由 [JSDelivr CDN] 提供 - 缓存:有 - 不支持大小超过 50 MB 的文件 - 不支持版本号格式的分支名(如 v1.2.3)'], |
77 | 77 | ['https://cdn.staticaly.com/gh', '日本 2', '[日本 东京] - 该公益加速源由 [Statically CDN] 提供 - 缓存:有 - 不支持大小超过 30 MB 的文件'], |
78 | 78 | ['https://raw.fastgit.org', '日本 3', '[日本 东京] - 该公益加速源由 [FastGit] 提供 - 缓存:无(或时间很短)'], |
| 79 | + ['https://raw.xn--gzu630h.xn--kpry57d', '韩国', '[韩国 首尔] - 缓存:无(或时间很短)'], |
79 | 80 | //['https://raw.cithub.icu', '美国', '[美国 洛杉矶] - 缓存:无(或时间很短)'], |
80 | 81 | //['https://raw.xn--p8jhe.tw', '美国', '[美国 圣何塞] - 缓存:无(或时间很短)'], |
81 | 82 | //['https://git.yumenaka.net/https://raw.githubusercontent.com', '美国', '[美国 圣何塞] - 缓存:无(或时间很短)'], |
|
150 | 151 | // Release |
151 | 152 | function addRelease() { |
152 | 153 | 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;';}; // 调整小屏幕时的样式 |
155 | 156 | for (const current of html) { |
156 | 157 | 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) { |
158 | 159 | let href = _this.href.split(location.host), |
159 | 160 | url = '', _html = `<div class="XIU2-RS" style="${divDisplay}">`; |
160 | 161 |
|
|
167 | 168 | if (location.host === 'hub.fastgit.xyz') url = url.replace('hub.fastgit.xyz','github.com') |
168 | 169 | _html += `<a style="${style[0]}" class="btn" href="${url}" title="${download_url[i][2]}" rel="noreferrer noopener nofollow">${download_url[i][1]}</a>` |
169 | 170 | } |
170 | | - _this.insertAdjacentHTML('afterend', _html + '</div>'); |
| 171 | + _this.parentElement.nextElementSibling.insertAdjacentHTML('beforeend', _html + '</div>'); |
171 | 172 | }); |
172 | 173 | } |
173 | 174 | } |
|
0 commit comments