Giter VIP home page Giter VIP logo

disable-javascript's Introduction

Disable JavaScript has been discontinued!

As you might have noticed (no updates for a long time), unfortunately I didn't have sufficient time to further develop this web extension. While the development of this web extension was exciting, there were very little donations and also some questionable reviews about the web extension.

As Manifest V2 is getting deprecated soon, I decided to end this journey for now and handed over the ownership of the extension on Chrome and Firefox to another party. While I can't say if the code will continue to stay public, I want to point out that I'm not the maintainer anymore and that versions after 2.3.1 won't reflect the source code of this repository.

Thanks everyone who supported this project by writing genuine reviews, donating or simply creating pull requests.

Disable JavaScript

This web extension lets a user decide if JavaScript should be enabled or disabled for a given host or a given tab.

When accessing e.g. google.com and disabling JavaScript, the web extension will block all JavaScript which otherwise would be loaded by google.com (including inline JS and external JS files from other hosts).

Please note that scripts from the blocked host will still be loaded if they're being loaded in another host (unless you block that host as well of course).

Supported browsers

Usage

Disabling and enabling JavaScript should be pretty self-explanatory.
The icons and labels update for a tab accordingly.

NOTE: On Firefox for Android, no icon will be shown but toggling is possible via a menu item.
See the Add-on page for screenshots.

Installation from source

To install the web extension directly from the source, follow this steps:

  • Install Node.js and npm
  • Install gulp.js (run npm install --global gulp-cli)
  • Clone or download this code
  • In the project's root folder: Run npm install
  • In the project's root folder: Run gulp compile
  • Add the web extension to your browser
    • Mozilla Firefox: Visit about:debugging and click on Load Temporary Add-on. Load then the manifest.json file in the project's root folder
    • Google Chrome: Visit chrome://extensions/ and click on Load unpacked. Choose the project's root folder
  • If you simply want to test new branches/custom code without interfering with the installed version of the web extension, check out these browsers:

Pushing to mobile

Make sure you have prepared your device with these instructions.
After following the previous steps, continue like this:

  • In the project's root folder: Overwrite the existing manifest.json with the manifest-gecko.json file
  • Connect your mobile device via USB to your composer
  • In the project's root folder: Run ./push-to-mobile.sh
  • In Firefox in your mobile device: Access file:///storage/emulated/0 and select the [email protected] file

Contribution guidelines

If you want to contribute in any way or simply report bugs, please have a look at the contribution guidelines first.
Thank you!

Future plans

Feature proposals are being added as issues on GitHub.
If you want something to be added, create an issue or upvote an existing one.

Other web extensions

Maintainer

License

MIT License

Copyright (c) 2017 David Pacassi Torrico

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

disable-javascript's People

Contributors

cdelacombaz avatar dpacassi avatar heatherbooker avatar kant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

disable-javascript's Issues

Separate Blacklist from Whitelist

Hi @dpacassi , thank you for your work.

If I understand correctly the current version only has 1 list which revert the default behaviour. This is inconvenient when we toggle this default, since all the domains enabled/disabled have now the opposite setting.

It would make more sense to have black-listed and white-listed domains.

<noscript>-Tags are parsed on all tabs when one tab is blocked

The content.js file is being added to all tabs when JS is disabled for one tab.
It should only be added to the specific tab though.
(If that's not supported by the web extension API then do another additional check inside content.js if JS is really disabled in the current tab).

Add feature to enable / disable the the extension temporarily

Ublock origin does this for example. It fixes the following use-case:

  • have JS turned-off by default, with the "block JS by domain" mode selected.
  • visit some website which requires JS but does so using scripts from 3rd party websites, or different domains but still owned by the same company, (often happens for banking websites for example)
  • Turn on JS, but still have a nonfunctional site because necessary scripts from other websites are still blocked.
  • Be hence forced to either: a) go into extensions and manually disable the extension temporarily, or b) figure out which websites the scripts were requested from, whitelist them, then try again.

Unfortunately option b) can often be time consuming if the website in question uses many different 3rd parties and/or domains, so I often revert to a).

[Feature Request] Option to allow/disallow 3rd-party linked scripts for given rule entry

This is another feature from the now-defunct SriptBlock addon, which I'd like to see implemented in a currently maintained Javascript blocker like Disable-Javascript.

In ScriptBlock, it would show you in the toolbar icon's drop-down menu when a website links to scripts on 3rd party domains, and would let you enable/disable individual 3rd party domains for this page.

An example case:

Let's say DomainA.com has javascript on it. One of the scripts it links to is at www.DomainA.com/scripts/first-script.js

But the website also links to a script at www.DomainB.com/some_url/second-script.js

With ScriptBlock, you could enable javascript for DomainA.com, and the core elements of the page would load, but it would keep DomainB.com blocked unless you went back into the icon's drop-down menu and clicked on "Enable DomainB.com" or "Enable all for this page".

That "enable all for this page" is also useful, as some sites link to scripts on five or six different domains and it can be a hassle manually enabling each one (but you also don't want to automatically enable all of them when you enable DomainA.com since some of the 3rd party actors might have malicious code in their scripts, so even if you trust the scripts on DomainA it's still best to have separate authorization for 3rd party scripts DomainA might link to).

This is also a functionality concern. For example, I've had PayPal transactions fail in the past because I keep Javascript disabled by default and only enable by whitelist. I had enabled PayPal, but it also links to 3rd party scripts on other domains Paypal owns, and when it couldn't load those scripts it caused problems with the payment gateway.

Without a way to authorize the 3rd party scripts it was trying to link to, my only option would have been to completely disable the script blocking addon, and then re-enable it after the purchase. I presume that's what I'll have to do with Disable-Javascript in its current form. Either way, would be nice to have that level of control to enable/disable 3rd party scripts linked to on a given page.

Shortcuts conflict

Alt+1, Alt+2, ... are built-in Firefox shortcuts on Linux to go to tab number 1, 2, ... and are not supposed to be used by any extension.

About Page: Keyboard Shortcuts on Mac are incorrect

MacOS Keyboards (specifically, Apple/Mac keyboards) do not have an "Alt" key. We have an "option" key instead, symbol U+2325 ⌥ OPTION KEY.
https://en.wikipedia.org/wiki/Option_key

The Shortcuts information on the About page is incorrect, or is simply missing information specifically for Mac users.

Instead of:

Alt + Shift + 1
Toggle JavaScript state
Alt + Shift + 2
Open Disable JavaScript settings

You could say:

Windows/Linux: Alt + Shift + 1
Mac: ⌥ + Shift + 1
Toggle JavaScript state

Windows/Linux: Alt + Shift + 2
Mac: ⌥ + Shift + 2
Open Disable JavaScript settings

Preview of Disable Javascript Keyboard Shortcuts in Chrome Extensions:
image

Improve the handling of iframes

If I'm on domain A and there's an iframe of domain B, I can not enable or disable JS for the content of domain B with the button.
Switching the state only enables/disables JS of domain A but not of the iframes.

We need to change this. We need to inform the user that certain JS have been enabled/disabled due to the iframe situation, independent from your current JS state for the current domain.

[Temporary(?) Feature Request]: Mark and remove multiple whitelisted entries at once

Until we have temporary whitelisting I keep my whitelist clean by periodically manually scanning it and removing (usually several) items in each go. However, beyond a near-trivial number of legitimately whitelisted entries it is rather cumbersome to remove many entries: click an entry, scroll to "Remove" (the one entry), scroll to the next to remove, mark, repeat.

Thus it would help quite a lot if multiple entries could be selected (with checkboxes, perhaps) and then have a way to remove them all at once. In fact it could even replace the "Remove All" functionality (if there was an easy way to mark all entries). (If it's too complex, sorting by time added would also help a bit, such that "new" entries can be moved down, near the remove button. It's not perfect but I'd believe is a simpler change.)

Noscript

You need an options window where various settings could be controlled. One of these should give you the ability to ignore noscript sections that are displayed instead of the content if you have javascript disabled.

[Feature Request] Right-click option to temporarily whitelist

Just started using this addon and it works great so far!

One feature I miss from the now-defunct ScriptBlock addon is the ability to temporarily enable javascript on a specific domain/page without permanently whitelisting it.

Sometimes you just want to see something on a page once, and you're never likely to go back to that site. In those cases, having the site permanently whitelisted is an unnecessary security risk. (Not to mention it results in a massively cluttered whitelist.)

It would be great if there was an option in the addon's right-click menu that would enable javascript for the current session, but once a new session opens it would only re-enable javascript for the sites that have been added to the whitelist, and would forget any sites that were only temporarily enabled in the previous session.

Security issue: Fails to block JS from webworkers

Just tried this plugin out after i got tired of no hotkey's in No-script plugin.
But disable-javascript failed to block already loaded webworkers, meaning if i temporarily enable
JS on a domain and then toggle it off again - Any webworkers registered during that pageload will continue to run unrestricted.

Content Security Policy: Directive ‘child-src’ has been deprecated. Please use directive ‘worker-src’ to 
control workers, or directive ‘frame-src’ to control frames respectively.

Support complete inheritance

When manually adding a base domain such as e.g. youtube.com (which also applies to it's sub domains), I want to be able to override this base domain's setting per sub-domain individually without editing the base domain's setting itself.

Current Behavior

  1. Block youtube.com
  2. Access www.youtube.com (JS will be disabled)
  3. Toggle the JS state via icon/context menu (This will result in the youtube.com entry being removed)

Desired Behavior

  1. Block youtube.com
  2. Access www.youtube.com (JS will be disabled)
  3. Toggle the JS state via icon/context menu (Instead of removing the youtube.com entry, a new www.youtube.com entry will be created with it's custom settings.

Maybe we can also add a setting where people can choose it's desired inheritance behavior.

Include sub-domains doesn't work reliably (Chrome)

Thanks for this useful extension!

Environment

Chrome Version 75.0.3770.100 (Official Build) (64-bit)
Default State: JS Off
Disable: By Domain

Current behaviour

domain.co.uk is added with sub-domains included, however servers such as thingy.domain.co.uk & whatsit.domain.co.uk have to be added individually as they default to JS off which makes them non-functional.

Expected behaviour

Add domain.co.uk with sub-domains included and any server in domain.co.uk has JS enabled without having to be added separately.

Note

Possible interaction with #46
Money in your PayPal (after I enabled JS LOL) - thanks.

Import and Export the list of URL disabled

You could add a button in the "options section" to manually Import, and other button to Export, the list of URL disabled, this will be usefull after a new instalation.

Google captcha not visible

Marvelous addon but there is a problem when the default state is JS off.
E.g., when I go here
https://www.abuseat.org/lookup.cgi
despite I enable JS, I can't see the Google Captcha. So I have to disable the addon completely or setting the default state on JS on, and revert the action once finished.

In this case I was warned I failed the captcha so I easily realized JS was not working properly, but on other websites the problem could be more subtle when you are not warned of anything and simply doesn't work properly.

Allow domains to be imported and exported

When people are switching from other web extensions, they might have a list of black- and/or whitelisted domains - we should implement a feature that allows us to import and export our data.

The export functionality would be great for backups or synchronizing until #8 is implemented.

Question: If JS disabled by domain, some sites dont work

Hi there,

maybe i am just missing something:

If i use blocking per domain for example amazon does not work. i guess its because some of the underlying domains (amazon pictures and what not) are not greenlit.

It works if i chose blocking by tab.

Is there a way to greenlight all "invisible" domains belonging to the TLD?

Kind regards

Port to Opera

Publish the web extension in the Opera extensions catalog

It doesn't allow to load js from other domains that are inside the page

This behaviour happens if you set the Default state JS Off and Disable Behaviour by Domain.
In this case, if the page tries to load some js from other sources, this sources will be blocked.
To make the page work I should check the page and add the servers that own the javascript.

If I switch in the preferences to Disable Behaviour by Tab, it works.

I think that when you enable JS, all the JS in the page should start to work, not only the JS in that domain.

[Feature Request] "edit" button in domain list

Hi,

I have just installed this addon and I really like it: it was exactly what I needed!

Just a question: is it possible to add an "edit" button in the "domain list"? By this way I could change entries...

For example this would be useful to change "include sub-domains" option from "no" to "yes" without having to enter an url with the "add" button...

I hope to have explained it well. :-)

Thanks for your work and have a nice day

Provide a synchronisation service for your settings and domains

I'm thinking about creating a service which allows you to synchronize your settings and your tabs across different browsers or maybe just after a fresh installation of your computer/browser.

This feature should be optional though, I don't want to enforce people of submitting their settings to an external server if they don't want to.

But what do you people think about this idea? Would you use it? Or is it maybe just an overkill?

Invalid host when entering "37signals.com"

Hi,

I noticed that I can't add "37signals.com" domain in the domain list using "add" button: it says "please enter a valid host". But the host is valid...

Could you please check?

Thanks

Doesnt block all js on this site

https://thepiratebay.org

(firefox)

Doesn't stop some JS that hijacks only the first click and redirects to malware site.

The problem goes way, if I disable JS completely in dev-tools.
So its definitely JS-related.

Adblock plus cant kill it either, even when told to block scripts, so they are doing something tricky


Addition:

I just noticed the same on this site, where i use it to kill the cookie-popup:
https://www.extremetech.com/

BUT, it works again if I turn off ad block plus!

So maybe there is some new incompatibility between your addon and ABP?
This definitely used to work fine before.

Disable Java Script in partnership with Ublock

Hello,
thank's nice and helpful tool for my Firefox. I'm on testing.
But I have a question regarding "Disable Java Script" in comibination with Ublock. It is usefuel that I create an UBlock rule (see you here, unfortunately only in German) for "Disable JS" like this example:
no-csp-reports: noscript-csp.invalid false.

Thank's a lot for your support in advance.
Greetings from South Germany

Rename "domains" to "host names"

The web extension also works with IP addresses, host names in general.
Therefor it makes sense to rename the existing "domain" label to "host name".

hotkeys on mac conflict with € sign

For us europeans, it's quite unfortunate that our currency sign hotkey (alt+shift+2) is the same as the hotkey for this extension.

Imagine that every time you type $ somewhere in an email or google doc, your javascript settings page comes up.

I've disabled hotkeys for now., but perhaps it's an idea to make this hotkey configurable?

Anyway, thanks for this very nice plugin!

Greasemonkey/Tampermonkey

Is it possible for Disable JavaScript to coexist with Greasemonkey and Tampermonkey? Specifically, is it (or would it one day be) possible to use this extension to disable all JS on a domain EXCEPT for user-scripts that we write ourselves (using either of the monkeys, for example)?

(Currently it seems like disabling JS on a domain prevents Tampermonkey from running on Firefox 65, at least.)

JavaScript enabled but the first time website reports that it is disabled

Hello.

it happens that when I click on one of my Firefox bookmarks and I open the website on a new tab then website says that JavaScript is disabled (but Javascript works).

Please take a look at the following example from Braintree website:
http://www.awesomescreenshot.com/image/3617104/9773eacd52bc1c11e7002d7de99591da

However javascript works correctly and I can login into Braintree successfully. If I refresh the page without logging in then "you need javascript enabled to use this application" message disappears.

It is not a critical issue because website works fine despite the message displayed on screen... Just wanted to tell you about that. :-)

Thank you and have a nice day

Attribute "class" doesn't applied to <noscript>

I have some code in my page, something like this:

<noscript class="global-warning-message">Для полноценного использования сайта необходимо включить Javascript в вашем браузере.</noscript>

When I click on "Disable JavaScript", class attribute doesn't apply to div:

image

Normal behavior when js is off in browser manually:

image

P.S.: some diagnostic info
version: v2.3.1
browser: Chrome 69.0.3497.100 and FF 60.2.2esr
os: Debian 9
list of installed extensions: in FF - nothing
problem observed on this site

It makes google docs stop working

After I installed this extension I could not edit my text documents on google docs (docs.google.com). Javascript was enabled so there is no reason for the interference.

After I disabled the extension I pressed F5 in the document page and It appeared normally.

What's the shortcut key?

My apologies, but I can't seem to find out what the keybinding for the setting Enable shortcuts option is.

Linux, Firefox Quantom.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.