Auto-Copy-Github-Repository-Name

copy github repository name when deleteing a repository

当前为 2022-05-12 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Auto-Copy-Github-Repository-Name
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.0.1
  5. // @description copy github repository name when deleteing a repository
  6. // @author kkopite
  7. // @match https://github.com/**/*/settings
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=github.com
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. const pathname = window.location.pathname
  15. const index = pathname.lastIndexOf('/settings')
  16. const name = pathname.slice(1, index)
  17. navigator.clipboard.writeText(name)
  18.  
  19. })();