4

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

4
  • 3
    Chrome can't block inline scripts. You'll need to modify the page source by using request interception in a chrome extension. There may be existing solutions. P.S. it may be easier to use Fiddler or a similar MitM proxy tool. Commented Oct 25, 2019 at 8: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 Commented Oct 25, 2019 at 8: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? Commented Oct 25, 2019 at 8: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) Commented Oct 25, 2019 at 9:07

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.