github-helper

github clone helper

当前为 2024-02-11 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name github-helper
  3. // @namespace https://github.com/windboot/
  4. // @version v0.1.1
  5. // @description github clone helper
  6. // @author windboot
  7. // @match https://github.com/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=greasyfork.org
  9. // @grant GM_setClipboard
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. let url = window.location.href;
  17. window.onkeydown = function (event) {
  18. // proxy
  19. if(event.ctrlKey && event.keyCode === 71){
  20. let proxy = 'https://gh.landwind.icu/';
  21. //console.log(`url:${url},key down :${event.keyCode}`);
  22. GM_setClipboard(`${proxy}${url}`);
  23. }
  24. // release proxy
  25. if(event.ctrlKey && event.keyCode === 82){
  26. }
  27. }
  28. })();