Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Chrome extension - how to turn JavaScript on/off?

Is it possible to turn JavaScript on/off with a self-made Google Chrome extension?

For example, in Opera browser, there are simple possibilities to do that with widgets, user-made buttons, etc., but I didn't find any solutions to do that in Chrome (my first source was the official Google Chrome extensions' documentations).

A strange aspect is that I need JavaScript to run the extension itself...if I'm able to turn JavaScript off with an extension, can I still use JavaScript in my extension after doing it?


Edit:

It's already possible to do it via chrome.contentSettings.javascript!
See this example which shows how to use it (Quick JavaScript Switcher extension, which mlb linked here).

like image 901
Sk8erPeter Avatar asked Jan 11 '11 22:01

Sk8erPeter


Video Answer


1 Answers

It's now possible with the ContentSettings API,
and there is an extension named Quick Javascript Switcher that turns on/off javascript on the fly : https://github.com/maximelebreton/quick-javascript-switcher

QJS on the Chrome Webstore : https://chrome.google.com/webstore/detail/geddoclleiomckbhadiaipdggiiccfje

Enjoy !

seo : disable javascript chrome extension

like image 88
mlb Avatar answered Sep 17 '22 18:09

mlb