Suggestion : Option to disable Javscript
-
- Posts: 2
- Joined: December 16th, 2013, 8:29 pm
Suggestion : Option to disable Javscript
I already know that the feature was removed because too many basic users broke Firefox by disabling it accidentally.
I know that I can do it by changing javascript.enabled in about:config but it's too dangerous if you want to do it often.
I know that convenient extensions for Firefox like Noscript and others exists to do it, but I don't trust and don't want to manage yet another extension.
And it seems to me such a basic feature for a web browser that I think Firefox is not complete without it.
So I suggest this :
To include the javascript disabling option, not in Preferences or Options, but in the "Permissions" tab of the "Page Info" dialog and in the permissions manager "about:permissions".
The permissions system that introduced the feature to block images, cookies or plugins site-by-site is great.
But how does it make sense to disable Flash, Cookies or even Images for an undesirable or dangerous website but not be able to disable javascript the same way ?
This way would also be an upgrade over the previous situation, because users would have site-by-site control with the option.
And don't tell me basic users would again broke Firefox, because blocking Cookies and Images can broke a website just as well.
I hope that if someone who can do a thing about it read this, he or she would take it under consideration.
I know that I can do it by changing javascript.enabled in about:config but it's too dangerous if you want to do it often.
I know that convenient extensions for Firefox like Noscript and others exists to do it, but I don't trust and don't want to manage yet another extension.
And it seems to me such a basic feature for a web browser that I think Firefox is not complete without it.
So I suggest this :
To include the javascript disabling option, not in Preferences or Options, but in the "Permissions" tab of the "Page Info" dialog and in the permissions manager "about:permissions".
The permissions system that introduced the feature to block images, cookies or plugins site-by-site is great.
But how does it make sense to disable Flash, Cookies or even Images for an undesirable or dangerous website but not be able to disable javascript the same way ?
This way would also be an upgrade over the previous situation, because users would have site-by-site control with the option.
And don't tell me basic users would again broke Firefox, because blocking Cookies and Images can broke a website just as well.
I hope that if someone who can do a thing about it read this, he or she would take it under consideration.
-
- Posts: 997
- Joined: February 21st, 2010, 8:38 am
Re: Suggestion : Option to disable Javscript
You should post this on an official Mozilla-mailing list, not in this forum, which has no relation with Mozilla, and where no Mozilla-devs will read it.
gone
-
- Posts: 483
- Joined: December 29th, 2003, 11:16 am
Re: Suggestion : Option to disable Javscript
Elbart wrote:You should post this on an official Mozilla-mailing list, not in this forum, which has no relation with Mozilla, and where no Mozilla-devs will read it.
Isn't it of value to post a suggestion here and get comments/suggestions on what should be asked for before submitting a feature suggestion officially?
- WaltS48
- Posts: 5141
- Joined: May 7th, 2010, 9:38 am
- Location: Pennsylvania, USA
Re: Suggestion : Option to disable Javscript
The option to disable JavaScript exists in the developer tools, the NoScript extension and probably other extensions.
Linux Desktop - AMD Athlon(tm) II X3 455 3.3GHz | 8.0GB RAM | GeForce GT 630
Windows Notebook - AMD A8 7410 2.2GHz | 6.0GB RAM | AMD Radeon R5
Windows Notebook - AMD A8 7410 2.2GHz | 6.0GB RAM | AMD Radeon R5
-
- Posts: 2
- Joined: December 16th, 2013, 8:29 pm
Re: Suggestion : Option to disable Javscript
Thank you, I didn't know about the option being in the developer tools, I didn't scroll down in the advanced section, I learned something today.WLS wrote:The option to disable JavaScript exists in the developer tools, the NoScript extension and probably other extensions.
I think that's great for the option to be included without third-party extensions.
I still think the javascript permission would be a great addition, its place is right there with the cookie, images and plugins permission.
For posting in a mailing list, I thought about it, but didn't really know in which one since a lot of forum threads around the web give different addresses.
If someone could guide me in the right direction I would gladly post it in the appropriate mailing-list.
-
- Posts: 2225
- Joined: November 9th, 2004, 6:45 pm
- Location: Jakarta, Indonesia (UTC+7)
- Contact:
Re: Suggestion : Option to disable Javscript
Permissions in Page Info and about:permissions are per-site whereas JavaScript permission is global.
- Gort
- Posts: 2349
- Joined: February 2nd, 2003, 6:01 pm
- Location: Sussex, UK
Re: Suggestion : Option to disable Javscript
Zoolcar9 wrote:Permissions in Page Info and about:permissions are per-site whereas JavaScript permission is global.
Sure, but so are images, cookies and other stuff in the View Page Info, yet they're there to be overridden. The suggestion would be akin to the Yesscript extension. Yeah, you could just install that extension, but the suggestion seems to be a logical extension of what's done with images, cookies, popups and other items in the site permissions.
- dickvl
- Posts: 54161
- Joined: July 18th, 2005, 3:25 am
Re: Suggestion : Option to disable Javscript
Firefox does support JavaScript via the docShell property for an individual tab..
https://developer.mozilla.org/en-US/doc ... sIDocShell
This code can toggle JavaScript in the current tab with this code in the Browser Console:
Similar code can be used to toggle images (allowImages) and plugins (allowPlugins) in a tab.
https://developer.mozilla.org/en-US/doc ... sIDocShell
This code can toggle JavaScript in the current tab with this code in the Browser Console:
Code: Select all
var {classes:Cc,interfaces:Ci} = Components;
var ps = Cc["@mozilla.org/embedcomp/prompt-service;1"].getService(Ci.nsIPromptService);
var wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator);
var gB = wm.getMostRecentWindow("navigator:browser").gBrowser;
function getDocShell(){
var docShell = gB.docShell; docShell.QueryInterface(Ci.nsIDocShell); return docShell;
}
var val = getDocShell().allowJavascript;
var res = ps.confirm(null, "JavaScript ("+(val?"enabled":"disabled")+")", (val?"Disable":"Enable")+" JavaScript");
if (res){getDocShell().allowJavascript = !val}
Similar code can be used to toggle images (allowImages) and plugins (allowPlugins) in a tab.
- patrickjdempsey
- Posts: 23686
- Joined: October 23rd, 2008, 11:43 am
- Location: Asheville NC
- Contact:
Re: Suggestion : Option to disable Javscript
YesScript. It's light, has no unexpected features, and requires no learning curve (unlike NoScript).
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
-
- Posts: 848
- Joined: February 12th, 2005, 8:33 pm
Re: Suggestion : Option to disable Javscript
Another good extension is QuickJava. Once installed, it allows you to enable and disable on the fly Javascript, Java, Flash, Cookies, Silverlight, Images, Animated Images...
I use it to keep Java disabled all the time, except on some specific sites that need it.
I use it to keep Java disabled all the time, except on some specific sites that need it.
Michel Gagnon
Montréal (Québec, Canada)
Montréal (Québec, Canada)
-
- Posts: 2225
- Joined: November 9th, 2004, 6:45 pm
- Location: Jakarta, Indonesia (UTC+7)
- Contact:
Re: Suggestion : Option to disable Javscript
dickvl wrote:This code can toggle JavaScript in the current tab with this code in the Browser Console:Code: Select all
…
or without prompt
Code: Select all
var currentDocShell = gBrowser.getBrowserForTab(gBrowser.mCurrentTab).docShell;
currentDocShell.allowJavascript = !currentDocShell.allowJavascript;
gBrowser.reloadTab(gBrowser.mCurrentTab);
-
- Posts: 76
- Joined: July 2nd, 2013, 4:29 am
Re: Suggestion : Option to disable Javscript
Another option to toggle Javascript quickly is PrefBar:
Global: http://prefbar.tuxfamily.org/help/butto ... javascript
Per Tab: http://prefbar.tuxfamily.org/help/butto ... javascript
It's even possible to define a hotkey for the buttons, you need regularly.
Global: http://prefbar.tuxfamily.org/help/butto ... javascript
Per Tab: http://prefbar.tuxfamily.org/help/butto ... javascript
It's even possible to define a hotkey for the buttons, you need regularly.
- dickvl
- Posts: 54161
- Joined: July 18th, 2005, 3:25 am
Re: Suggestion : Option to disable Javscript
Thanks Manuel. I'm using your PrefBar extension for years (I think since Mozilla Suite 1.0) and just updated to the new 6.3.0 release (seem to have missed it), so thanks for the continued support to keep the extension working. I noticed that you've added Australis support, so thanks for that!
The code I posted above is based on what you use in your extension.
Could you consider to use this code in buttonCommands.js as that will make it possible to only set the width or height?
The code I posted above is based on what you use in your extension.
Could you consider to use this code in buttonCommands.js as that will make it possible to only set the width or height?
Code: Select all
function prefbarSetResolution(value) {
var vA=value.split("x");
if(vA[0])window.outerWidth = vA[0];
if(vA[1])window.outerHeight = vA[1];
}
-
- Posts: 76
- Joined: July 2nd, 2013, 4:29 am