Greasy Fork

Greasy Fork is available in English.

fastGithub

加速你的github clone速度

目前为 2020-04-16 提交的版本。查看 最新版本

// ==UserScript==
// @name         fastGithub
// @namespace    https://github.zhlh6.cn
// @version      0.1
// @description  加速你的github clone速度
// @author       ZHLH
// @match        https://github.com/*
// @grant        none
// ==/UserScript==

(function() {
    var patt = /[email protected]:/;
    var address = document.querySelectorAll('input.input-monospace');
    var i,add;
    for(i = 0;i<address.length;i++){
        add = address[i];
        if(patt.test(add.value)){
            add.value = add.value.replace("[email protected]:","[email protected]:");
        }
    }
    var copyAddress = document.querySelectorAll('clipboard-copy');
    var cadd;
    for(i = 0;i<copyAddress.length;i++){
        cadd = copyAddress[i];
        if(patt.test(cadd.value)){
            cadd.value = cadd.value.replace("[email protected]:","[email protected]:");
        }
    }
})();