Created
November 12, 2025 10:04
-
-
Save dirad/92936fc1066f48db3f4d1b6529b6d883 to your computer and use it in GitHub Desktop.
gmail pop3 refresher
This file contains hidden or 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
| javascript: (function () { const gmailWindow = window; if(gmailWindow.location.href.indexOf("https://mail.google.com/") === -1){ alert('You have to run the bookmarklet from a Gmail window'); console.log('not gmail window'); return; } gmailWindow.location.assign('https://mail.google.com/mail/u/0/#settings/accounts'); const xpath = "//span[text()='Check mail now']"; const refreshAccounts = () => { const selectedNodeElements = gmailWindow.document.evaluate(xpath, gmailWindow.document, null, XPathResult.ANY_TYPE, null); let currentNode = selectedNodeElements.iterateNext(); if (currentNode === null) { setTimeout(refreshAccounts, 100); } else { while (currentNode) { currentNode.click(); console.log(currentNode); currentNode = selectedNodeElements.iterateNext(); }; /* gmailWindow.location.assign('https://mail.google.com/mail/u/0/#inbox'); */ window.scroll(0,1000); }; }; setTimeout(refreshAccounts, 100); })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment