Created
August 15, 2023 17:33
-
-
Save dzg/ab5b73f1625b819288672e92b283f4bb to your computer and use it in GitHub Desktop.
multi gmail js
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
window.addEventListener("DOMContentLoaded", () => { | |
const listener = e => e.stopPropagation(); | |
const query = () => document.querySelectorAll('a[target=_blank]').forEach(a => { | |
a.removeEventListener('click', listener); | |
a.addEventListener('click', listener, true); | |
}); | |
setInterval(query, 400); // wait time between DOM queries, in milliseconds | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment