Created
November 7, 2023 04:38
-
-
Save zacharysyoung/d8498aecabd42ffbe3778522fbf4b25a to your computer and use it in GitHub Desktop.
Open multiple tabs from JavaScript
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
/** | |
* Make sure to check in the tab you run this script from | |
* for any kind of notification about pop-ups being blocked | |
* then allow for this site/page only. | |
* | |
* https://stackoverflow.com/questions/63237482/open-multiple-tabs-with-javascript | |
*/ | |
const anchors = document.getElementsByTagName('a'); | |
for (let x of anchors) { | |
if (x.href.includes('forms') && !(x.href.includes('x_role_id'))) { | |
window.open(x.href, '_blank'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment