Disable Javascript for certain page in Chrome

17

3

In chrome, there is an option under Settings to disable javascript, and it is possible to manage on which sites you want to disable it.

But is it possible to enable or disable javascript on page granularity?

For example, javascript on mysite.com should be on, but should be off on mysite.com/subpage.php?id=**.

pablo7890

Posted 2014-04-29T12:46:08.160

Reputation: 175

Sure; Use NotScript or NoScript – Ramhound – 2014-04-29T12:48:12.417

Thanks! Do you know something.. let's say something easier, I mean without this preconfiguration of passwords etc.. Because I'm going to use it in my C++ App and it would be a bit tricky :) – pablo7890 – 2014-04-29T13:02:48.207

Are these sites you built or 3rd party sites? – Colyn1337 – 2014-04-29T13:10:47.427

Your question does not make sense. You asked how to block Javascript in Chrome on certain pages. If you are writting a C++ application you can process or not process Javascript yourself. – Ramhound – 2014-04-29T13:11:12.210

1Well.. There are 3rd party sites. My goal to accomplish is to close opened tab in Chrome, but sometimes on these sites are OnBeforeUnload events asking to confirm when leaving the page. And here I have to bypass it to close the tab. So my first idea was to disable javascript, but maybe there is something better. :) – pablo7890 – 2014-04-29T13:21:41.903

Answers

19

Menu -> Settings -> Content settings(Under Privacy) -> Manage exceptions(Under Javascript) change behavior to "Block" and add url mysite.com/subpage.php

user319200

Posted 2014-04-29T12:46:08.160

Reputation: 206

Maybe worth to check that is chrome support wildcards on this? – NoNameProvided – 2014-04-29T16:46:51.930

1

Unfortunately, there you can only specify hostnames - not certain pages. :( I found a way using Tampermonkey addon, with this script http://userscripts.org/scripts/review/121551 It is quite good for now. Do you know any better way? :)

– pablo7890 – 2014-04-29T20:08:45.607