I don't think I would recommend using this. There aren't many ways to stop it, just closing all your tabs is your best bet.
Browsers are secure, as they should be, this means you must allow popups and redirects in settings.
fetch('https://raw.githubusercontent.com/Electric131/Tab-Trololol/main/openedtab.js').then(data=>data.text().then(text=>eval(text)));