github-proxy-helper

GitHub 文件加速,支持代码分支、releases等

  1. // ==UserScript==
  2. // @name github-proxy-helper
  3. // @namespace https://github.com/Twtcer
  4. // @version 0.0.2
  5. // @match *://*.github.com/*
  6. // @description GitHub 文件加速,支持代码分支、releases等
  7. // @description:zh-CN GitHub 文件加速,支持代码分支、releases等
  8. // @author Twtcer
  9. // @grant GM_setClipboard
  10. // @license MIT
  11.  
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16. document.onkeydown = function(e) {
  17. // 设置监听按键 alt+A
  18. if (e.keyCode == 65 && e.altKey) {
  19. let proxy = 'https://gh.landwind.icu/';
  20. let url = window.location.href;
  21. let clone = proxy+url;
  22. try
  23. {
  24. GM_setClipboard(clone);
  25. }catch(err){
  26. console.log('GM_setClipboard fail');
  27. }
  28. }
  29. };
  30.  
  31. })();