浏览器 标签栏 代码 - 删除

发布时间:2023年12月25日

javascript:(function () {
  function trySingleAction(actionFunc, retryTimes) {
    if (retryTimes === 0) {
      console.error("Failed after retries.");
      return;
    }
    try {
      actionFunc();
    } catch (e) {
      console.log("Action failed, retrying...");
      setTimeout(function () {
        trySingleAction(actionFunc, retryTimes - 1);
      }, 1000);
    }
  };
  SM="kubesphere begin";
  trySingleAction(function () { 
    document.querySelector("input[name='confirm']").value =
      document.querySelector("strong").textContent;
  }, 3);

  SM="kubesphere end";

  SM="Verel begin";
  if (window.location.href.indexOf("/settings") === -1) {
    trySingleAction(function () {
      window.location.href =
        window.location.href
          .replace("//", "DOUBLE_SLASH")
          .split("/")
          .slice(0, 3)
          .join("/")
          .replace("DOUBLE_SLASH", "//") + "/settings";
    }, 3);
  };

  trySingleAction(function () {
    document
      .querySelector(
        "#delete-project > div > footer > div.fieldset_actions__VzV_y > div > button"
      )
      .click();
  }, 3);

  trySingleAction(function () {
    document.querySelector(
      "body > reach-portal:nth-child(79) > div.geist-overlay > div > div > form > div > div:nth-child(1) > div > div.modal_inset__7x6D0.modal_last__1fOeG > div > label:nth-child(1) > div > div > input"
    ).value = document.querySelector(
      "body > reach-portal:nth-child(79) > div.geist-overlay > div > div > form > div > div:nth-child(1) > div > div.modal_inset__7x6D0.modal_last__1fOeG > div > label:nth-child(1) > div > p > b"
    ).textContent;
    document.querySelector(
      "body > reach-portal:nth-child(79) > div.geist-overlay > div > div > form > div > div:nth-child(1) > div > div.modal_inset__7x6D0.modal_last__1fOeG > div > label:nth-child(2) > div > div > input"
    ).value = document.querySelector(
      "body > reach-portal:nth-child(79) > div.geist-overlay > div > div > form > div > div:nth-child(1) > div > div.modal_inset__7x6D0.modal_last__1fOeG > div > label:nth-child(2) > div > p > b"
    ).textContent;
  }, 3);
  SM="Verel end";


  SM="Github begin";
  if (window.location.href.indexOf("/settings") === -1) {
    trySingleAction(function () {
      window.location.href =
        window.location.href
          .replace("//", "DOUBLE_SLASH")
          .split("/")
          .slice(0, 3)
          .join("/")
          .replace("DOUBLE_SLASH", "//") + "/settings";
    }, 3);
  };

  trySingleAction(function () {
    document
      .querySelector(
        "#dialog-show-repo-delete-menu-dialog"
      )
      .click();
  }, 3);
  trySingleAction(function () {
    document
      .querySelector(
        "#repo-delete-proceed-button"
      )
      .click();
  }, 3);
  trySingleAction(function () {
    document
      .querySelector(
        "#repo-delete-proceed-button"
      )
      .click();
  }, 3);

  trySingleAction(function () {
    document.querySelector(
      "#verification_field"
    ).value = document.querySelector(
      "#repo-delete-menu-dialog > div.Overlay-body > div.text-center > p"
    ).textContent; 
  }, 3);
  SM="Github end";
})();
压缩 https://tool.css-js.com/:
javascript:(function(){function a(c,b){if(b===0){console.error("Failed after retries.");return}try{c()}catch(d){console.log("Action failed, retrying...");setTimeout(function(){a(c,b-1)},1000)}}SM="kubesphere begin";a(function(){document.querySelector("input[name='confirm']").value=document.querySelector("strong").textContent},3);SM="kubesphere end";SM="Verel begin";if(window.location.href.indexOf("/settings")===-1){a(function(){window.location.href=window.location.href.replace("//","DOUBLE_SLASH").split("/").slice(0,3).join("/").replace("DOUBLE_SLASH","//")+"/settings"},3)}a(function(){document.querySelector("#delete-project > div > footer > div.fieldset_actions__VzV_y > div > button").click()},3);a(function(){document.querySelector("body > reach-portal:nth-child(79) > div.geist-overlay > div > div > form > div > div:nth-child(1) > div > div.modal_inset__7x6D0.modal_last__1fOeG > div > label:nth-child(1) > div > div > input").value=document.querySelector("body > reach-portal:nth-child(79) > div.geist-overlay > div > div > form > div > div:nth-child(1) > div > div.modal_inset__7x6D0.modal_last__1fOeG > div > label:nth-child(1) > div > p > b").textContent;document.querySelector("body > reach-portal:nth-child(79) > div.geist-overlay > div > div > form > div > div:nth-child(1) > div > div.modal_inset__7x6D0.modal_last__1fOeG > div > label:nth-child(2) > div > div > input").value=document.querySelector("body > reach-portal:nth-child(79) > div.geist-overlay > div > div > form > div > div:nth-child(1) > div > div.modal_inset__7x6D0.modal_last__1fOeG > div > label:nth-child(2) > div > p > b").textContent},3);SM="Verel end";SM="Github begin";if(window.location.href.indexOf("/settings")===-1){a(function(){window.location.href=window.location.href.replace("//","DOUBLE_SLASH").split("/").slice(0,3).join("/").replace("DOUBLE_SLASH","//")+"/settings"},3)}a(function(){document.querySelector("#dialog-show-repo-delete-menu-dialog").click()},3);a(function(){document.querySelector("#repo-delete-proceed-button").click()},3);a(function(){document.querySelector("#repo-delete-proceed-button").click()},3);a(function(){document.querySelector("#verification_field").value=document.querySelector("#repo-delete-menu-dialog > div.Overlay-body > div.text-center > p").textContent},3);SM="Github end"})();

文章来源:https://blog.csdn.net/Allure_LoveU/article/details/135209138
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。