Last active
January 15, 2023 03:08
-
-
Save omargfh/2b29ef2294410a217528adb469041acd to your computer and use it in GitHub Desktop.
Stars all repositories on a page where the "Star" button is visible with 500ms grace period
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fn = (i, total) => { | |
string = ""; | |
approx = Math.floor(i / total * 20) | |
for (let n = 0; n < 20; n++) { | |
if (n <= approx) | |
string += "█" | |
else | |
string += "–" | |
} | |
return string; | |
} | |
prcg = new Intl.NumberFormat('en', {style: "percent", maximumFractionDigits: 2}) | |
a = Array.from(document.querySelectorAll('button[aria-label="Star this repository"]')) | |
a.forEach((e, i) => { | |
setTimeout(() => { e.click(); console.clear(); console.log(`[${fn(i, 30)}] ${prcg.format(i / 30)}`); }, i * 500) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment