Posted: . At: 11:32 AM. This was 3 years ago. Post ID: 14920
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


How to use uBlock origin to block a certain annoying Javascript easily.


Many websites these days have Javascript that blocks certain elements unless you are a subscriber, this is very annoying but can be fixed with the uBlock origin plugin for Firefox.

Click the uBlock origin icon and then open the logger.

uBlock origin logger.
uBlock origin logger.

Then refresh the page and the logger will fill up with all of the elements on the page.

All page elements loaded in the logger.
All page elements loaded in the logger.

Then, to block a certain Javascript element, click the marked area on the logger and a menu will pop up.

Preparing to block a certain script on a website.
Preparing to block a certain script on a website.

Then, the blocking dialogue will pop up. This allows the creation of a static rule that will block the Javascript file. This how easy this is. Just click create on a static rule and it will be inserted into the dashboard.

Blocking a particular Javascript file with uBlock origin.
Blocking a particular Javascript file with uBlock origin.

This is the resulting uBlock origin rule that will be created in the Dashboard.

||assets.vidora.com/js/vidora-client.1.x.x.min.js$script,domain=www.dailytelegraph.com.au

This is how easy it is to block unwanted Javascript files with uBlock origin. This is very useful when anti-adblocker popups are annoying you and you wish to remove them for good. This is also very good for blocking scripts that hide most of the text on a site unless you are a subscriber. That is very annoying. You just want to read the news and you are blocked by stupid scripts.

This is another example, blocking annoying sign-up scripts.

||www.geeksforgeeks.org/wp-content/themes/iconic-one/js/gfg.min.js

That should be very helpful indeed.

Yet another example, blocking ad scripts on the CNN website.

! 2021-08-21 https://edition.cnn.com
||securepubads.g.doubleclick.net/tag/js/gpt.js$script,domain=edition.cnn.com
||tag.bounceexchange.com/340/i.js$script,domain=edition.cnn.com
||secure.quantserve.com/quant.js$script,domain=edition.cnn.com
||get.s-onetag.com/c15ddde9-ec7d-4a49-b8ca-7a21bc4b943b/tag.min.js$script,domain=edition.cnn.com
||amplify.outbrain.com/cp/obtp.js$script,domain=edition.cnn.com

This is very good proof of how useful an ad blocker can be, you can block more than just ad elements, you can stop those invasive scripts as well. Especially a call to action that pops up when you are trying to read a website.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.