github-helper

github clone helper

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

  1. // ==UserScript==
  2. // @name github-helper
  3. // @namespace https://github.com/windboot/
  4. // @version 2024-02-11
  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. //console.log(`url:${url},key down :${event.keyCode}`);
  21. GM_setClipboard(url);
  22. }
  23. // release proxy
  24. if(event.ctrlKey && event.keyCode === 82){
  25. }
  26. }
  27. })();