Skip to content

Instantly share code, notes, and snippets.

@A
Created October 13, 2019 09:17
Show Gist options
  • Save A/a252f320a7e36566ef7455935e4f6c74 to your computer and use it in GitHub Desktop.
Save A/a252f320a7e36566ef7455935e4f6c74 to your computer and use it in GitHub Desktop.
Just a js snippet to automagically remove opened repository
const sleep = (t) => new Promise((resolve, reject) => {
setTimeout(resolve, t);
});
(async () => {
$('a[data-selected-links*=key_links_settings]').click();
await sleep(3000);
document.querySelectorAll('summary.btn-danger')[2].click();
await sleep(3000);
const name = document.querySelectorAll('.Box-body.overflow-auto p strong')[2].textContent;
const input = document.querySelectorAll('input[name=verify]')[1];
input.value = name;
const button = input.parentElement.parentElement.querySelector('button');
button.disabled = false;
button.click();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment