Greasy Fork 还支持 简体中文。

github 镜像加速访问

通过访问镜像站点来提速访问 github,后续计划再通过镜像提速下载

目前為 2022-01-04 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         github 镜像加速访问
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  通过访问镜像站点来提速访问 github,后续计划再通过镜像提速下载
// @author       You
// @match        *://*/*
// @icon         https://img2.baidu.com/it/u=4226010475,2406859093&fm=26&fmt=auto
// @grant        GM_registerMenuCommand
// @grant        GM_openInTab
// ==/UserScript==

(function() {
    var mirror_url1 = "https://" + "github.com.cnpmjs.org";
    var mirror_url2 = "https://" + "hub.fastgit.org";
    var mirror_url3 = "https://" + "github.wuyanzheshui.workers.dev";
    GM_registerMenuCommand(` ⚠ 请勿在镜像站登陆个人账号 ⚠`, function() {})
    GM_registerMenuCommand(`📗打开github 镜像站 1`, function() {
        window.GM_openInTab(mirror_url1, {
            active: true,
            insert: true,
            setParent: true
        });
    })
    GM_registerMenuCommand(`📘打开github 镜像站 2`, function() {
        window.GM_openInTab(mirror_url2, {
            active: true,
            insert: true,
            setParent: true
        });
    })
    // 查找页面上的 “下载zip” 按钮,获取到url,替换为镜像地址,再调用下载操作
})();