'Bypass popup blockin in bookmarklet in firefox
I use a bookmarklet to open pages in a new tab(the script is more complex than this but this is pretty much the idea(the specifics of the script are irrelevant):
javascript: (() => {
window.open(location.href, '_blank');
})();
The issue is this: The window.open with _blank opens a new tab. That new tab triggers the popup blocking for the site. I have to unblock all popups(or the specific instance) for that site to allow the new tab to open.
Is there any way to allow the new tab to open without firefox thinking it is a popup window? I do not want to have to unblock all popups for the site(globally) because they might open popups on their own. I also do not want to have to allow each popup manually because I actually use it several times(several tabs per site). So both options have negatives: Either having to all popups for the entire site and not just the usage of my script or having to constantly allow the script's popup to open a new tab.
Neither of these are acceptable. Are there any tricks around this problem? Since this is a bookmarklet it is safe since I'm triggering it and wrote the code.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
