Skip to content

Instantly share code, notes, and snippets.

@chalkygames123
Created December 7, 2022 08:38
Show Gist options
  • Save chalkygames123/f03d920e8795c4dea14057b66c889ca2 to your computer and use it in GitHub Desktop.
Save chalkygames123/f03d920e8795c4dea14057b66c889ca2 to your computer and use it in GitHub Desktop.
javascript:(function () { const load = async () => { await new Promise((resolve, reject) => { const button = document.querySelector('.ajax-pagination-btn'); if (!button) { reject(); return; } button.click(); (function loop() { if (button.disabled) { setTimeout(loop, 200); } else { resolve(); } })(); }); }; document.scrollingElement.scrollIntoView(false); (function loop() { load().then(() => { loop(); }).catch(() => { for (const el of document.querySelectorAll('#dashboard .js-details-target')) el.ariaExpanded === 'false' && el.click(); }).finally(() => { document.scrollingElement.scrollIntoView(false); }); })(); })();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment