diff --git a/GithubEnhanced-High-Speed-Download.user.js b/GithubEnhanced-High-Speed-Download.user.js index 904ad3c..15640ea 100644 --- a/GithubEnhanced-High-Speed-Download.user.js +++ b/GithubEnhanced-High-Speed-Download.user.js @@ -3,7 +3,7 @@ // @name:zh-CN Github 增强 - 高速下载 // @name:zh-TW Github 增強 - 高速下載 // @name:en Github Enhancement - High Speed Download -// @version 1.9.6 +// @version 1.9.7 // @author X.I.U // @description 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁) // @description:zh-CN 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁) @@ -35,52 +35,55 @@ //['https://gh.api.99988866.xyz/https://github.com', '美国', '[美国 Cloudflare CDN]'], //['https://github.rc1844.workers.dev', '美国', '[美国 Cloudflare CDN]'], //['https://gh-rep.mirr.one', '美国', '[美国 Cloudflare CDN]'], - ['https://ghgo.feizhuqwq.workers.dev/https://github.com', '美国', '[美国 Cloudflare CDN]'], + //['https://cdn.githubjs.cf', '美国', '[美国 Cloudflare CDN]'], + //['https://gh.yqs.workers.dev', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@HongjieCN] 提供'], + //['https://ghgo.feizhuqwq.workers.dev/https://github.com', '美国', '[美国 Cloudflare CDN]'], ['https://gh.ddlc.top/https://github.com', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [@mtr-static-official] 提供'], ['https://git.yumenaka.net/https://github.com', '美国', '[美国 圣何塞]'], + ['https://download.xn--p8jhe.tw', '美国', '[美国 圣何塞] - 该公益加速源由 [おうか] 提供', 'https://archive.xn--p8jhe.tw'], ['https://github.do/https://github.com', '国内', '[中国 国内] - 该公益加速源由 [小麦云服] 提供'], ['https://ghproxy.fsofso.com/https://github.com', '香港', '[中国 香港] - 该公益加速源由 [F 搜] 提供 - 缓存:无(或时间很短)'], - //['https://github.ddlc.love/https://github.com', '香港', '[中国 香港] - 该公益加速源由 [@mtr-static-official] 提供'], - ['https://download.fastgit.org', '日本', '[日本 东京] - 该公益加速源由 [FastGit] 提供'], - ['https://ghproxy.com/https://github.com', '韩国', '[韩国 首尔]'] - ], - clone_url = [ - ['https://github.do/https://github.com', '国内', '[中国 国内] - 该公益加速源由 [小麦云服] 提供'], - //['https://gitclone.com', '国内', '[中国 国内]'], - ['https://ghproxy.fsofso.com/https://github.com', '香港', '[中国 香港] - 该公益加速源由 [F 搜] 提供 - 缓存:无(或时间很短)'], - ['https://api.mtr.pub', '香港', '[中国 香港] - 该公益加速源由 [@mtr-static-official] 提供'], - ['https://hub.fastgit.xyz', '日本', '[日本 东京] - 该公益加速源由 [FastGit] 提供'], - ['https://ghproxy.com/https://github.com', '韩国', '[韩国 首尔]'], - ['https://gh.gcdn.mirr.one', '俄罗斯', '[俄罗斯 G-Core Labs CDN]'], - ['https://hub.0z.gs', '美国', '[美国 Cloudflare CDN]'], - ['https://hub.shutcm.cf', '美国', '[美国 Cloudflare CDN]'] - ], - clone_ssh_url = [ - ['git@ssh.fastgit.org', '香港', '[中国 香港] - 该公益加速源由 [FastGit] 提供'], - ['git@git.zhlh6.cn', '美国', '[美国 洛杉矶]'] - ], - raw_url = [ - ['https://raw.githubusercontent.com', 'Github 原生', '[日本 东京]'], - ['https://github.do/https://raw.githubusercontent.com', '国内', '[中国 国内] - 该公益加速源由 [小麦云服] 提供 - 缓存:有'], - ['https://ghproxy.fsofso.com/https://github.com', '香港 1', '[中国 香港] - 该公益加速源由 [F 搜] 提供 - 缓存:无(或时间很短)'], - //['https://pd.zwc365.com/seturl/https://raw.githubusercontent.com', '香港 2', '[中国 香港]'], - ['https://raw.iqiq.io', '香港 2', '[中国 香港] - 该公益加速源由 [iQDNS/iQZone] 提供 - 缓存:无(或时间很短)'], - ['https://hk1.monika.love', '香港 3', '[中国 香港] - 该公益加速源由 [@mtr-static-official] 提供 - 缓存:无(或时间很短)'], - //['https://ghproxy.com/https://raw.githubusercontent.com', '韩国', '[韩国 首尔]'], - ['https://fastly.jsdelivr.net/gh', '日本 1', '[日本 东京] - 该公益加速源由 [JSDelivr CDN] 提供 - 缓存:有 - 不支持大小超过 50 MB 的文件 - 不支持版本号格式的分支名(如 v1.2.3)'], - ['https://cdn.staticaly.com/gh', '日本 2', '[日本 东京] - 该公益加速源由 [Statically CDN] 提供 - 缓存:有 - 不支持大小超过 30 MB 的文件'], - ['https://raw.fastgit.org', '日本 3', '[日本 东京] - 该公益加速源由 [FastGit] 提供 - 缓存:无(或时间很短)'], - //['https://cdn.jsdelivr.net/gh', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [JSDelivr CDN] 提供 - 缓存:有 - 不支持大小超过 50 MB 的文件 - 不支持版本号格式的分支名(如 v1.2.3)'], - ['https://gcore.jsdelivr.net/gh', '其他 1', '[移动走香港、电信走日本] - 该公益加速源由 [JSDelivr CDN] 提供 - 缓存:有 - 不支持大小超过 50 MB 的文件 - 不支持版本号格式的分支名(如 v1.2.3)'], - //['https://raw-gh.gcdn.mirr.one', '俄罗斯', '[俄罗斯 G-Core Labs CDN] - 缓存:有'], - ['https://raw.githubusercontents.com', '其他 2', '[香港、新加坡、美国](不固定) - 缓存:有 - 该加速源不支持大小超过 1 MB 的文件'] - ], - svg = [ - '', - '', - '' - ], - style = ['padding:0 6px; margin-right: -1px; border-radius: 2px; background-color: var(--XIU2-back-Color); border-color: rgba(27, 31, 35, 0.1); font-size: 11px; color: var(--XIU2-font-Color);']; + //['https://github.ddlc.love/https://github.com', '香港', '[中国 香港] - 该公益加速源由 [@mtr-static-official] 提供', ''], + ['https://download.fastgit.org', '日本', '[日本 东京] - 该公益加速源由 [FastGit] 提供', 'https://archive.fastgit.org'], + ['https://mirror.ghproxy.com/https://github.com', '日本', '[日本 东京] - 该公益加速源由 [ghproxy] 提供'], + ['https://ghproxy.com/https://github.com', '韩国', '[韩国 首尔] - 该公益加速源由 [ghproxy] 提供'], + ['https://hub.xn--gzu630h.xn--kpry57d', '韩国', '[韩国 首尔] - 该公益加速源由 [ghproxy] 提供'] + ], clone_url = [ + //['https://github.do/https://github.com', '国内', '[中国 国内] - 该公益加速源由 [小麦云服] 提供'], + ['https://gitclone.com', '国内', '[中国 国内] - 该公益加速源由 [GitClone] 提供 - 缓存:有 - 首次比较慢,缓存后较快'], + ['https://ghproxy.fsofso.com/https://github.com', '香港', '[中国 香港] - 该公益加速源由 [F 搜] 提供 - 缓存:无(或时间很短)'], + ['https://api.mtr.pub', '香港', '[中国 香港] - 该公益加速源由 [@mtr-static-official] 提供'], + //['https://hub.fastgit.xyz', '日本', '[日本 东京] - 该公益加速源由 [FastGit] 提供'], + ['https://mirror.ghproxy.com/https://github.com', '日本', '[日本 东京] - 该公益加速源由 [ghproxy] 提供'], + ['https://ghproxy.com/https://github.com', '韩国', '[韩国 首尔] - 该公益加速源由 [ghproxy] 提供'], + ['https://hub.xn--gzu630h.xn--kpry57d', '韩国', '[韩国 首尔] - 该公益加速源由 [ghproxy] 提供'], + ['https://gh.gcdn.mirr.one', '俄罗斯', '[俄罗斯 G-Core Labs CDN]'], + ['https://hub.xn--p8jhe.tw', '美国', '[美国 圣何塞] - 该公益加速源由 [おうか] 提供'] + //['https://hub.0z.gs', '美国', '[美国 Cloudflare CDN]'], + //['https://hub.shutcm.cf', '美国', '[美国 Cloudflare CDN]'] + ], clone_ssh_url = [ + ['git@ssh.fastgit.org', '香港', '[中国 香港] - 该公益加速源由 [FastGit] 提供'], + ['git@git.zhlh6.cn', '美国', '[美国 洛杉矶]'] + ], raw_url = [ + ['https://raw.githubusercontent.com', 'Github 原生', '[日本 东京]'], + ['https://github.do/https://raw.githubusercontent.com', '国内', '[中国 国内] - 该公益加速源由 [小麦云服] 提供 - 缓存:有'], + ['https://ghproxy.fsofso.com/https://github.com', '香港 1', '[中国 香港] - 该公益加速源由 [F 搜] 提供 - 缓存:无(或时间很短)'], + //['https://pd.zwc365.com/seturl/https://raw.githubusercontent.com', '香港 2', '[中国 香港]'], + ['https://raw.iqiq.io', '香港 2', '[中国 香港] - 该公益加速源由 [iQDNS/iQZone] 提供 - 缓存:无(或时间很短)'], + ['https://hk1.monika.love', '香港 3', '[中国 香港] - 该公益加速源由 [@mtr-static-official] 提供 - 缓存:无(或时间很短)'], + //['https://ghproxy.com/https://raw.githubusercontent.com', '韩国', '[韩国 首尔] - 该公益加速源由 [ghproxy] 提供'], + ['https://fastly.jsdelivr.net/gh', '日本 1', '[日本 东京] - 该公益加速源由 [JSDelivr CDN] 提供 - 缓存:有 - 不支持大小超过 50 MB 的文件 - 不支持版本号格式的分支名(如 v1.2.3)'], + ['https://cdn.staticaly.com/gh', '日本 2', '[日本 东京] - 该公益加速源由 [Statically CDN] 提供 - 缓存:有 - 不支持大小超过 30 MB 的文件'], + ['https://raw.fastgit.org', '日本 3', '[日本 东京] - 该公益加速源由 [FastGit] 提供 - 缓存:无(或时间很短)'], + //['https://cdn.jsdelivr.net/gh', '美国', '[美国 Cloudflare CDN] - 该公益加速源由 [JSDelivr CDN] 提供 - 缓存:有 - 不支持大小超过 50 MB 的文件 - 不支持版本号格式的分支名(如 v1.2.3)'], + ['https://gcore.jsdelivr.net/gh', '其他 1', '[移动走香港、电信走日本] - 该公益加速源由 [JSDelivr CDN] 提供 - 缓存:有 - 不支持大小超过 50 MB 的文件 - 不支持版本号格式的分支名(如 v1.2.3)'], + //['https://raw-gh.gcdn.mirr.one', '俄罗斯', '[俄罗斯 G-Core Labs CDN] - 缓存:有'], + ['https://raw.githubusercontents.com', '其他 2', '[香港、新加坡、美国](不固定) - 缓存:有 - 该加速源不支持大小超过 1 MB 的文件'] + ], svg = [ + '', + '', + '' + ], style = ['padding:0 6px; margin-right: -1px; border-radius: 2px; background-color: var(--XIU2-back-Color); border-color: rgba(27, 31, 35, 0.1); font-size: 11px; color: var(--XIU2-font-Color);']; if (menu_raw_fast == null){menu_raw_fast = 1; GM_setValue('xiu2_menu_raw_fast', 1)}; registerMenuCommand(); @@ -155,12 +158,13 @@ let href = _this.href.split(location.host), url = '', _html = `
`; - // 循环生成 HTML 标签 for (let i=0;i -1) url = url.replace('https://download.fastgit.org','https://archive.fastgit.org') - _html += `${download_url[i][1]}` } _this.insertAdjacentHTML('afterend', _html + '
'); @@ -177,11 +181,14 @@ url = '', _html = ''; for (let i=0;i -1) url = url.replace('https://download.fastgit.org','https://archive.fastgit.org') + if (download_url[i][3] === '') continue + if (download_url[i][3] !== undefined) { + url = download_url[i][3] + href.split(location.host)[1] + } else { + url = download_url[i][0] + href.split(location.host)[1] + } + if (location.host === 'hub.fastgit.xyz') url = url.replace('hub.fastgit.xyz','github.com') _html += `
  • ${svg[0]}Download ZIP ${download_url[i][1]}
  • ` } html.insertAdjacentHTML('afterend', _html);