1

I'm trying to prevent a specific unwanted behavior on a website by disabling a script loaded by the website using a Tampermonkey userscript. The internal script is located at https://website.com/_next/static/chunks/framework-ca706bf673a13738.js and contains functions that trigger an unwanted popup when an item is clicked.

Using the below Chrome developer tools options allows me to disable that script.

How would I do this using Tampermonkey?

Chrome Dev Tools

Giacomo1968
  • 58,727

1 Answers1

2

While in theory it might be possible with Tampermonkey in a way or another depending on the script, it's not really a tool suitable for that task.

uBlock Origin is a tool much more feasible for it. Simply add a custom filter like this:

||website.com/_next/static/chunks/framework-ca706bf673a13738.js^$script

and it should prevent the JS file from loading, assuming it doesn't have a random name, but then a regular expression could be used instead.

Note: thanks to Manifest V3, uBlock Origin may or may not work in your Chrome currently, depending on its version. You could try its lite version instead, which the developer is trying to bring more and more into the level of the old one. Or you could try some workarounds to keep uBlock Origin usable for longer, bunch of them are findable.

Destroy666
  • 12,350