2

I've checked the answers in How to disable JavaScript in Chrome Developer Tools?

but I'm searching to disable a specific script and the solution of blocking a specific ressource in network tab doesn't help : enter image description here

because I want to block a <script> inside DOM

medmek
  • 161
  • 7
  • 3
    Chrome can't block inline scripts. You'll need to modify the page source by using [request interception](https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-getResponseBodyForInterception) in a chrome extension. There may be existing solutions. P.S. it may be easier to use Fiddler or a similar MitM proxy tool. – wOxxOm Oct 25 '19 at 08:45
  • ^^ That. I've used Fiddler to modify requests with custom rules before, and I'm sure you'd be able to use it to remove part of a response, in much the same way, but I've not done that. Google will be able to help you with that - search for `Fiddler custom rules` – Reinstate Monica Cellio Oct 25 '19 at 08:56
  • That said, you've blocked the js file in the image above, but not the min.js file. What happens if you block both? – Reinstate Monica Cellio Oct 25 '19 at 08:58
  • I've had to block an old owl carousel version (triggered in another module) to make sure the gliches was due to interference between version in same page, I just was curious if I had an inline script, so Thank you for MitM proxy (cuz I have linux) – medmek Oct 25 '19 at 09:07

1 Answers1

1

You could download AdBlock: chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/options.html#customize

And add the script-url to the blacklist

If you want to execute the script again just disable ad block

Worked for me Best wishes

Sakramento
  • 299
  • 4
  • 14