Skip to content

Instantly share code, notes, and snippets.

@so1ve
Created August 23, 2022 11:10
Show Gist options
  • Save so1ve/539eea84ce2c0e793e14abb000ed2997 to your computer and use it in GitHub Desktop.
Save so1ve/539eea84ce2c0e793e14abb000ed2997 to your computer and use it in GitHub Desktop.
Github delete repository
(() => {
document.querySelector("#options_bucket > div.Box.color-border-danger > ul > li:nth-child(4) > details > summary").click();
const input = document.querySelector('[aria-label="Type in the name of the repository to confirm that you want to delete this repository."]');
const strongs = document.querySelectorAll('.Box-body.overflow-auto strong');
const btns = document.querySelectorAll('.btn-danger.btn.btn-block');
const name = strongs[strongs.length - 1].innerText;
input.value = name;
btns[btns.length - 1].disabled = false;
btns[btns.length - 1].click();
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment