From d8bd49a55ab76690dfef08e8f9e061406690b6d1 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 23 Jun 2021 09:14:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E6=97=A5=E6=9C=AC?= =?UTF-8?q?=E4=B8=9C=E4=BA=AC]=20Raw=20=E5=8A=A0=E9=80=9F=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GithubEnhanced-High-Speed-Download.user.js | 53 +++++++++++++--------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/GithubEnhanced-High-Speed-Download.user.js b/GithubEnhanced-High-Speed-Download.user.js index f3bf7c9..7487bf8 100644 --- a/GithubEnhanced-High-Speed-Download.user.js +++ b/GithubEnhanced-High-Speed-Download.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Github 增强 - 高速下载 -// @version 1.5.2 +// @version 1.5.3 // @author X.I.U // @description 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁) // @match *://github.com/* @@ -29,31 +29,34 @@ fontColor = '#b2b8bf'; } } -//['https://github.91chifun.workers.dev','美国'], +//['https://gh.66ccff.work', '美国'], +//['https://github.91chifun.workers.dev', '美国'], +//['https://github.rc1844.workers.dev', '美国'], var download_url = [ - ['https://gh.api.99988866.xyz','美国'], - ['https://gh.msx.workers.dev','美国'], - ['https://gh.xiu2.xyz','美国'], - ['https://gh.argv.cc','美国费利蒙'], - ['https://git.yumenaka.net','美国洛杉矶'], - ['https://download.fastgit.org','日本东京'], - ['https://ghproxy.com','韩国首尔'], - ['https://pd.zwc365.com/seturl','中国香港'] + ['https://gh.api.99988866.xyz', '美国'], + ['https://gh.msx.workers.dev', '美国'], + ['https://gh.xiu2.xyz', '美国'], + ['https://gh.argv.cc', '美国费利蒙'], + ['https://git.yumenaka.net', '美国洛杉矶'], + ['https://download.fastgit.org', '日本东京'], + ['https://ghproxy.com', '韩国首尔'], + ['https://pd.zwc365.com/seturl', '中国香港'] ], clone_url = [ - ['https://hub.fastgit.org','中国香港'], - ['https://gitclone.com','中国浙江'], - ['https://github.com.cnpmjs.org','新加坡'] + ['https://hub.fastgit.org', '中国香港'], + ['https://gitclone.com', '中国浙江'], + ['https://github.com.cnpmjs.org', '新加坡'] ], clone_ssh_url = [ - ['git@git.zhlh6.cn','中国北京'], - ['git@hub.fastgit.org','中国香港'] + ['git@git.zhlh6.cn', '中国北京'], + ['git@hub.fastgit.org', '中国香港'] ], raw_url = [ - ['https://raw.githubusercontent.com','Github 原生',''], - ['https://cdn.jsdelivr.net','中国国内','注意:该加速源存在缓存机制(24小时),所以文件可能不是最新。 注意:当前分支所有文件总文件大小超过 50MB 时,该加速源不可用。 注意:当前分支名为版本号格式时(如 v1.2.3),该高速下载链接因格式限制不可用。'], - ['https://raw.fastgit.org','中国香港','注意:单个文件太大时可能会提示超时(实时获取中),请重试。'], - ['https://ghproxy.com','韩国首尔',''] + ['https://raw.githubusercontent.com', 'Github 原生',''], + ['https://cdn.jsdelivr.net','中国国内', '注意:该加速源存在缓存机制(24小时),所以文件可能不是最新。 注意:当前分支所有文件总文件大小超过 50MB 时,该加速源不可用。 注意:当前分支名为版本号格式时(如 v1.2.3),该高速下载链接因格式限制不可用。'], + ['https://raw.fastgit.org','中国香港', '注意:单个文件太大时可能会提示超时(实时获取中),请重试。'], + ['https://cdn.staticaly.com','日本东京', '注意:该加速是全球 Anycast CDN,国内一般分配到日本节点。'], + ['https://ghproxy.com','韩国首尔', ''] ], svg = [ '', @@ -251,11 +254,12 @@ url = [ raw_url[1][0] + "/gh" + href.replace('/blob/','@'), raw_url[2][0] + href2, - raw_url[3][0] + "/" + raw_url[0][0] + href2 + raw_url[3][0] + "/gh" + href.replace('/blob/','/'), + raw_url[4][0] + "/" + raw_url[0][0] + href2 ], _html = ``; for (let i=0;i${raw_url[i+1][1]}` + _html += `${raw_url[i+1][1]}` } html.insertAdjacentHTML('afterend', _html); } @@ -300,10 +304,15 @@ url_tip = raw_url[1][2]; break; case 3: - url = raw_url[3][0] + "/" + raw_url[0][0] + href2; + url = raw_url[3][0] + '/gh' + href.replace('/blob/','/'); url_name = raw_url[3][1]; url_tip = raw_url[3][2]; break; + case 4: + url = raw_url[4][0] + "/" + raw_url[0][0] + href2; + url_name = raw_url[4][1]; + url_tip = raw_url[4][2]; + break; default: url = raw_url[menu_raw_fast][0] + href2; url_name = raw_url[menu_raw_fast][1];