dpacassi / disable-javascript Goto Github PK
View Code? Open in Web Editor NEWAdds the ability to disable JavaScript on specific sites.
License: MIT License
Adds the ability to disable JavaScript on specific sites.
License: MIT License
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.)
My apologies, but I can't seem to find out what the keybinding for the setting Enable shortcuts option is.
Linux, Firefox Quantom.
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.
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.
I've noticed that some sites don't work properly with the extension installed, even with Javascript enabled. Most recent one I've found is the Google Translate API signup page.
With the extension enabled and Javascript switched on, clicking the 'Agree and continue' button does nothing. With the extension disabled, it works fine.
Translate the web extension to other languages
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
Great extension, thank you!
But only accessible by mouse for me, so I must keep extension panel unhided.
Also it would be cool ability to change shortcuts.
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.)
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.
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:
Create a document with details on how people can contribute to this project
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.
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
(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.
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.
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.
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".
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?
Ublock origin does this for example. It fixes the following use-case:
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).
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!
Check the results from npm audit
.
Publish the web extension in the Opera extensions catalog
You could add a button in the "options section" to manually add an URL.
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.
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.
We do it to ensure the button is being displayed in all tabs after installation.
Suggestion: Add a link to do it manually instead of forcing a reload of all tabs.
Open: Is the refresh still needed with Firefox 58, though? Might have been fixed in the meantime.
You can add an option that automatically includes all subdomains by swtiching Java On ?
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
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.
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
:
Normal behavior when js is off in browser manually:
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
Allow users to enter host names like
*.google.com
etc.
Is there any way to disable context-menu option? I'm prefer it's on top menu-bar icon only.
Allow users to define if they want to get notified about new features or not.
DJ 2.3.1 Fx 62.0.3
javascript is not disabled, in either domain or tab mode
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.
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
For some reason with extension enabled the chart is not loading.
I'm looking for automatically disable Javascript when a tab goes in background and re-enable when switching a tab to foreground
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).
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
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.
youtube.com
www.youtube.com
(JS will be disabled)youtube.com
entry being removed)youtube.com
www.youtube.com
(JS will be disabled)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.
Thanks for this useful extension!
Chrome Version 75.0.3770.100 (Official Build) (64-bit)
Default State: JS Off
Disable: By Domain
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.
Add domain.co.uk with sub-domains included and any server in domain.co.uk has JS enabled without having to be added separately.
Possible interaction with #46
Money in your PayPal (after I enabled JS LOL) - thanks.
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.
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.
When right clicking on a link, also display the option to open a link with a disabled or enabled JS state.
See: browser.menus.create
Should probably be part of the README.md file
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.