fastGithub

加速你的github clone速度

  1. // ==UserScript==
  2. // @name fastGithub
  3. // @namespace https://github.zhlh6.cn
  4. // @version 0.2
  5. // @description 加速你的github clone速度
  6. // @author ZHLH
  7. // @match https://github.com/*
  8. // @run-at document-idle
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. setTimeout(function(){
  14. var patt = /git@github.com/;
  15. var address = document.querySelectorAll('input.input-monospace');
  16. var i,add;
  17. for(i = 0;i<address.length;i++){
  18. add = address[i];
  19. if(patt.test(add.value)){
  20. add.setAttribute("value",add.value.replace("git@github.com:","git@git.zhlh6.cn:"));
  21. }
  22. }
  23. var copyAddress = document.querySelectorAll('clipboard-copy.btn.btn-sm');
  24. var cadd;
  25. for(i = 0;i<copyAddress.length;i++){
  26. cadd = copyAddress[i];
  27. if(patt.test(cadd.value)){
  28. cadd.setAttribute("value",cadd.getAttribute("value").replace("git@github.com:","git@git.zhlh6.cn:"));
  29. }
  30. }
  31. },500);
  32. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址