github repo delete auto confirm

auto complete the confirm input when deleting a repo on github

当前为 2023-12-16 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name github repo delete auto confirm
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.0.1
  5. // @description auto complete the confirm input when deleting a repo on github
  6. // @author remisiki
  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.  
  15. // Your code here...
  16. document.querySelector("#dialog-show-repo-delete-menu-dialog").addEventListener("click", () => {
  17. document.querySelector("#repo-delete-proceed-button").click();
  18. setTimeout(() => {
  19. document.querySelector("#repo-delete-proceed-button").click();
  20. setTimeout(() => {
  21. const confirmBox = document.querySelector("#verification_field");
  22. confirmBox.value = confirmBox.getAttribute("data-repo-nwo");
  23. confirmBox.dispatchEvent(new Event("focus"));
  24. confirmBox.dispatchEvent(new Event("input"));
  25. }, 100);
  26. }, 0);
  27. });
  28. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址