// ==UserScript== // @icon https://github.githubassets.com/favicon.ico // @name GitHub镜像加速访问、克隆和下载 // @namespace RC1844.FastGithub // @author RC1844 // @homepageURL https://github.com/RC1844/FastGithub // @supportURL https://github.com/RC1844/FastGithub/issues // @license MIT License // @description 镜像访问GitHub、加速克隆和下载;适配Github新UI;增加新克隆站点;前往项目Github仓库查看免费搭建Github镜像站点方法 // @include *://github.com/* // @include *://github* // @include *://hub.fastgit.org/* // @require http://cdn.bootcss.com/jquery/1.8.3/jquery.min.js // @version 1.4.6 // @grant GM_addStyle // @downloadURL none // ==/UserScript== (function () { "use strict"; //=true为启用,=false为禁用 var clone = true; // var clone = false; var depth = true; // var depth = false; var mirror_url = new Array(); mirror_url[0] = "https://github.com.cnpmjs.org/"; mirror_url[1] = "https://hub.fastgit.org/"; mirror_url[2] = "https://github.wuyanzheshui.workers.dev/"; mirror_url[3] = "https://github.bajins.com/"; mirror_url[4] = "https://download.fastgit.org/"; mirror_url[5] = "https://github.rc1844.workers.dev/"; mirror_url[6] = "https://gitclone.com/github.com/"; mirror_url[7] = "git@git.zhlh6.cn:"; mirror_url[8] = "https://github-speedup.laiczhang.com/"; //添加对应索引即可使用 var clone_set = [0, 1, 6, 7, 8]; var mirror_set = [0, 1, 2, 3, 5, 8]; var download_set = [2, 4, 5, 8]; //其他 var other_url = new Array(); other_url = [ { url: "https://github.com/RC1844/FastGithub", name: "脚本Github仓库地址,点个赞谢谢", }, { url: "https://greasyfork.org/zh-CN/scripts/397419", name: "GreasyFork地址,希望可以给我评分收藏", }, { url: "https://minhaskamal.github.io/DownGit", name: "DownGit", }, { url: "https://d.serctl.com/", name: "GitHub中转下载", }, { url: "https://github.zhlh6.cn/", name: "加速你的Github", }, { url: "http://gitd.cc/", name: "GitHub代下载", }, { url: "https://gh.isteed.cc/", name: "gh-proxy部署站点", }, { url: "https://github.zsxwz.workers.dev/", name: "gh-proxy部署站点", }, { url: "https://gh.api.99988866.xyz/", name: "gh-proxy部署站点", }, { url: "https://g.ioiox.com/", name: "gh-proxy部署站点", }, { url: "https://gh.sky-and-poem.fun/", name: "gh-proxy部署站点", }, // { // url: "", // name: "", // }, ]; var str1 = ""; if (clone) { str1 += "git clone "; if (depth) { str1 += "--depth=1 "; } } var a = window.location.href.split("/"); var str2 = a[3] + "/" + a[4] + ".git"; var str3 = window.location.pathname; //镜像列表 var info = `
`; $("div.flex-auto.min-width-0.width-fit.mr-3").after(info); //Fast Download ZIP $("ul >li.Box-row.Box-row--hover-gray.p-0").each(function () { var span = `