Last active
January 31, 2021 21:29
-
-
Save erenhatirnaz/754a561cca7b4310b86269af5c812afa to your computer and use it in GitHub Desktop.
GitHub Dashboard Auto Expander
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
// ==UserScript== | |
// @name GitHub Dashboard Auto Expander | |
// @description This userscript clicks all 'expand' buttons on the dashboard | |
// @version 1.0 | |
// @author Eren Hatırnaz | |
// @homepageURL https://gist.github.com/erenhatirnaz/754a561cca7b4310b86269af5c812afa | |
// @grant none | |
// @match https://github.com/ | |
// ==/UserScript== | |
var CLICK_TIMEOUT=4000; // milliseconds | |
function clickAllDetailsButtons(){ | |
var detailsButtons = document.querySelectorAll('button.btn-link.js-details-target'); | |
detailsButtons.forEach(function (detailsButton) { | |
var isClicked = detailsButton.getAttribute('aria-expanded'); | |
if (isClicked == "false") { detailsButton.click(); } | |
}); | |
} | |
setInterval(clickAllDetailsButtons, CLICK_TIMEOUT); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment