Page 1 of 1

Block a function within javascript

Posted: Fri May 05, 2023 6:18 pm
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.🙏


Re: Block a function within javascript

Posted: Wed May 10, 2023 6:39 pm
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.