0

Hide 'allow popup' message and show it directly

So I have a link of FB in a wordpress website , and by clicking on that link , it will open a FB page in the new tab. Now it should also happen once the page is loaded. So I simply used jQuery's trigger() method , within the document.ready() method , to automatically load the FB page in new tab. Now the thing is that when onloading is done , and the trigger() executes , the browser asks as ' allow this pop up to open' , however when directly clicking on that FB link, it doesn't ask anything. Now how to hide that Allow thing and always open it without asking... I know I can do it by changing the browser setting and all and also , I have tried few more approaches like click() , then window.open() . But all results the same. I wonder if there's any wordpress plugin which can help me out?đŸ˜¶

11th Feb 2021, 1:26 PM
Saurav Kumar
Saurav Kumar - avatar
1 Answer
0
I don't think so... because this behavior is due to how browsers handle window.open(): if you call it without any user interaction, the new document to open will be considered as spam, so ask to user for permission to open it...
11th Feb 2021, 4:13 PM
visph
visph - avatar