The question is – is it possible to do this with any hacks?
I have users select a list of links and on click they should open at once in new tabs.
I've been searching for a few days now. Tried creating links by js, window.open(), fake clicks, attributes, 2 libs and nothing…
And of course, this means bypassing pop-up blockers.
window.open() requires the following conditions:
- The stack
tracemust contain the trusted event. Formally, a click is not necessarily needed to trigger such an event, the same
mousemovegives a trusted event no worse than
document.querySelector('button').onclick = event=>console.log(event.isTrusted); document.querySelector('button').onmousemove = event=>console.log(event.isTrusted);
- There is one of two things: either the browser has a voluntarily manually set permission for pop-up windows by the user. Either
unsave-nonewill be passed among the
Cross-Origin-Opener-Policyheaders. Examples can be taken from here . If the server belongs to you, then this should not be a problem.