Block a function within javascript

Discussion of topics related to ad blocking.
Post Reply
ngfx121212
New Member
New Member
Posts: 1
Joined: Thu May 04, 2023 8:36 pm

Block a function within javascript

Post by ngfx121212 »

Is it possible to block a specific function from within a script but not the entire script?

For example www.webite.com loads a script called player.min.js?v=1.0.
player.min.js?v=1.0 has functions that are important for the website.com to work properly, but it also has functions which trigger popups and redirects.
I know I can block the whole script, but that breaks the site. I just want to block specific functions from within the script.
Is that possible? What is the syntax for this type of filter?

Thank you.🙏

NGFX

intense
Contributor
Contributor
Posts: 10500
Joined: Wed Mar 27, 2013 9:56 am

Post by intense »

Not possible using a browser extension.

However to fight popups / redirections there are some useful weapons (especially using uBO - uBlock Origin or AdGuard extension)

Just give us the real example and what do you want to achieve.

Post Reply