Skip to content

Instantly share code, notes, and snippets.

@erenhatirnaz
Last active January 31, 2021 21:29
Show Gist options
  • Save erenhatirnaz/754a561cca7b4310b86269af5c812afa to your computer and use it in GitHub Desktop.
Save erenhatirnaz/754a561cca7b4310b86269af5c812afa to your computer and use it in GitHub Desktop.
GitHub Dashboard Auto Expander
// ==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