🏠 Home 

github clone enhancement

2020/7/1 上午10:56:13


Install this script?
  1. // ==UserScript==
  2. // @name github clone enhancement
  3. // @namespace Violentmonkey Scripts
  4. // @match https://github.com/*
  5. // @grant none
  6. // @version 1.0
  7. // @license MIT
  8. // @author boatrainlsz
  9. // @description 2020/7/1 上午10:56:13
  10. // ==/UserScript==
  11. (function () {
  12. let clipboard = document.getElementsByTagName("clipboard-copy");
  13. //return is clipboard-copy is not exist
  14. if (clipboard.length == 0) {
  15. return
  16. }
  17. //prepend 'git clone' to clipboard's value attribute
  18. clipboard[0].setAttribute("value", "git clone " + clipboard[0].getAttribute("value"));
  19. })();