On click javascript events
On click javascript events
Could you add an option to block all javascript on click events? or the option to block all javascript popups and have a whitelist with it as well. Most pages specially those that stream are using this method to force the opening of popups and sometimes it gets crazy and 5+ popups open at once everytime you click.
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:51.0) Gecko/20100101 Firefox/51.0
Re: On click javascript events
It's possible to do this with surrogate scripts, but you'll need some JavaScript knowledge. And it will never be foolproof.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.
True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.
True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Re: On click javascript events
Have you tried using an addon that's designed to block popups, such as uBlock Origin?ghost33 wrote:or the option to block all javascript popups and have a whitelist with it as well. Most pages specially those that stream are using this method to force the opening of popups and sometimes it gets crazy and 5+ popups open at once everytime you click.
*Always* check the changelogs BEFORE updating that important software!
-
Re: On click javascript events
Yes it does not work for that it can close the pop up once they open and load a page but it cant prevent it from opening. They supposedly were going to be able to block something like that but I haven't seen it happening.
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:51.0) Gecko/20100101 Firefox/51.0
Re: On click javascript events
Er, actually uBlock Origin *does* block the pop-up from loading. It's only the opening of the new window that it can't prevent.
Does this surrogate script work? (not tested)
replacement
sources is @ followed by the list of sites you don't want opening popups. For example -
Does this surrogate script work? (not tested)
replacement
Code: Select all
Object.defineProperty(window, 'open', {enumerable:true,get:function(){return function(){}}});
Code: Select all
@.example.net .example.com
*Always* check the changelogs BEFORE updating that important software!
-
Re: On click javascript events
Thanks for your reply sadly it causes the popunder to load on the current tab so it's no useful.
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:51.0) Gecko/20100101 Firefox/51.0
Re: On click javascript events
This one should literally block the click listeners, but you may lose wanted functionality.
Code: Select all
for(let et of ['click', 'mousedown', 'mouseup']){window.addEventListener(et, function(e){e.stopPropagation();e.stopImmediatePropagation()}, true)}
*Always* check the changelogs BEFORE updating that important software!
-
Re: On click javascript events
Could you do one or two to block all javascript that opens an other tab or window on the foreground or background?
The block all on mouse events takes away the ability to click on the player to see the video which is the reason I'm on those pages.
The block all on mouse events takes away the ability to click on the player to see the video which is the reason I'm on those pages.
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:51.0) Gecko/20100101 Firefox/51.0
Re: On click javascript events
Given that neutering window.open() produced undesirable results, that would require extensively digging through the individual websites' code. I don't have time for that, sorry.ghost33 wrote:Could you do one or two to block all javascript that opens an other tab or window on the foreground or background?
*Always* check the changelogs BEFORE updating that important software!
-