Restore option to disable Javascript

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
BlakeyRat
Moonbather
Moonbather
Posts: 52
Joined: 2014-02-13, 12:34
Location: Hell

Restore option to disable Javascript

Unread post by BlakeyRat » 2014-02-13, 12:42

Disabling Javascript can only be done from about:config because it was removed from the Options -> Content dialog box. That dialog box has plenty of empty space and the option can be put back where it was before.

Although Javascipt is often necessary for most websites, there are a few sites that do stupid or annoying things, like disabling all right-click, or injecting extra junk into links. It would be nice to easily disable Javascript when necessary.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35636
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Restore option to disable Javascript

Unread post by Moonchild » 2014-02-13, 12:51

You can disable JavaScript for a session by going to Web Developer -> Toggle Tools, then clicking the gear top-left and checking the option "disable javascript" (right column).

For more control, please use Pale Moon Commander to tweak advanced options in Pale Moon. It has options to disable specific parts of JavaScript that are (apparently) abused by the sites you visit.
It also has the option to completely and globally disable JavaScript (permanently) although that's not recommended, because, as you say, it's required for many website functions.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

sIDcORK

Re: Restore option to disable Javascript

Unread post by sIDcORK » 2014-02-13, 13:29

The add-on Toolbar Buttons includes one to toggle Javascript http://codefisher.org/toolbar_button/ and many other options.

jumba

Re: Restore option to disable Javascript

Unread post by jumba » 2014-02-13, 14:47

So what is wrong in using about:config for this kind of an option? If you need quick access for it, I don't think a check box behind an options dialog is what you want. Create an add-on that adds a button to where you want that toggles that entry. Or just browse AMO, there are plenty of them,
BlakeyRat wrote:Although Javascipt is often necessary for most websites, there are a few sites that do stupid or annoying things, like disabling all right-click, or injecting extra junk into links. It would be nice to easily disable Javascript when necessary.
Black list these sites. Use YesScript
Edit: quote from the developer of that addon
I believe that Firefox is secure enough by default and that blocking all scripts by default is paranoia.
Edit2: Haha, I read user comments for that addon, one of them:
This Product is excellent for turning java on and off on websites that are troublesome or known malicious websites. Also works like a charm on my Seamonkey 2.22.1 Five stars.
No wonder why mozilla removed this Java option! :lol:

WebZapped

Re: Restore option to disable Javascript

Unread post by WebZapped » 2014-04-10, 08:16

Why not have it under View Page Info-Permissions to disable it on a per site basis
Though if the site is using javascript to block right clicking, there would have to be another way to get around that

access2godzilla

Re: Restore option to disable Javascript

Unread post by access2godzilla » 2014-04-10, 08:43

WebZapped wrote:Why not have it under View Page Info-Permissions to disable it on a per site basis
Addons exist for this purpose: Yesscript or Noscript in "Scripts globally allowed" mode.
WebZapped wrote:Though if the site is using javascript to block right clicking, there would have to be another way to get around that
Check out Righttoclick on AMO for this purpose.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35636
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Restore option to disable Javascript

Unread post by Moonchild » 2014-04-10, 10:21

You can use Pale Moon Commander (or manually set preferences) to determine what JS has a right to do (including changing/disabling the right-click menu). No need for an additional add-on.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

WebZapped

Re: Restore option to disable Javascript

Unread post by WebZapped » 2014-04-10, 20:43

Don't you think if a website can 'take over' the UI like that (or in any other way), that should be regarded as a security risk and disabled by default?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35636
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Restore option to disable Javascript

Unread post by Moonchild » 2014-04-10, 21:23

WebZapped wrote:Don't you think if a website can 'take over' the UI like that (or in any other way), that should be regarded as a security risk and disabled by default?
No. Editing the context menu is not the same as "taking over the UI", since it is content and page specific. There is no security risk involved since the context menu entries do not get any sort of elevated privileges and any choices there that are page-defined have no higher risk or permissions than any in-content feature of a page (e.g. link) would have. This has been very carefully examined and secured when it was implemented in the browser.

Some people feel it is inconvenient, since some sites disable the context menu on purpose (e.g. not wanting people to copy elements off of their site that are considered copyrighted). In by far the most cases it provides additional flexibility and convenience for the user by allowing a website to add website/content-specific additional features to the site.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

WebZapped

Re: Restore option to disable Javascript

Unread post by WebZapped » 2014-04-10, 21:53

Well, I fixed it (at least from my POV) and it's not a big deal. I used to have lots of UI suggestions for firefox because they were going in the wrong direction but now it's hard to come up with any.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35636
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Restore option to disable Javascript

Unread post by Moonchild » 2014-04-10, 21:56

WebZapped wrote:Well, I fixed it (at least from my POV) and it's not a big deal. I used to have lots of UI suggestions for firefox because they were going in the wrong direction but now it's hard to come up with any.
I think most people have given up on making UI suggestions to the Mozilla UX team since they don't seem to listen anyway :P
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

WebZapped

Re: Restore option to disable Javascript

Unread post by WebZapped » 2014-04-11, 10:19

Moonchild wrote:
WebZapped wrote:Well, I fixed it (at least from my POV) and it's not a big deal. I used to have lots of UI suggestions for firefox because they were going in the wrong direction but now it's hard to come up with any.
I think most people have given up on making UI suggestions to the Mozilla UX team since they don't seem to listen anyway :P

UX designers need something to do. They can't justify themselves by proposing tiny useful changes once in a while so they try to redesign everything.

opera1215b1748

Re: Restore option to disable Javascript

Unread post by opera1215b1748 » 2014-04-14, 07:48

I strongly believe that JS/plugin/cookie management must be available on the per-site basis via the Page Info tabs.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35636
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Restore option to disable Javascript

Unread post by Moonchild » 2014-04-14, 10:16

opera1215b1748 wrote:I strongly believe that JS/plugin/cookie management must be available on the per-site basis via the Page Info tabs.
I believe you are right in 2/3rds of the cases, and you obviously have not looked at page permissions as available in Pale Moon.
A picture says it all:
page-permissions.png
As for JS: I disagree, and if you want that per-site, you should use NoScript or YesScript or a similar add-on. Why do I think JS is essential? Because it is. Without JS, you cannot do anything required for dynamic site layouts (You will have no DOM access, no user interaction, no dynamic updates, no AJAX, etc.), and as such I think that JS should always be enabled. If you prefer to browse as if you were in the '90s, then that is your choice, of course, but having a JS toggle in page permissions would most likely have people shoot themselves in the foot (e.g. by blocking js from Google domains, and then being surprised that a large number of other sites break that pull in JS libraries from the same google JS CDN), assume Pale Moon is broken, and blame the wrong person as a result. If you are aware enough to want to disable JS on certain sites, then you should also be confident in using an extension that gives you fine-grained control (with easier access than page permissions, probably, as well).
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

sIDcORK

Re: Restore option to disable Javascript

Unread post by sIDcORK » 2014-04-14, 11:17

Anyone wanting to toggle JS (or rather a lot of other things) could try Toolbar Buttons 1.0 http://codefisher.org/toolbar_button/ which should keep most people happy.

opera1215b1748

Re: Restore option to disable Javascript

Unread post by opera1215b1748 » 2014-04-14, 12:00

Moonchild wrote:...Why do I think JS is essential? Because it is....
Indeed it is!
It is essential to both:
  • for dynamic site layouts etc;
  • launching an exploit code on a site/iframe etc.
I am not "browsing like '90s", I'm browsing in the safe style.
Moonchild wrote:...having a JS toggle in page permissions would most likely have people shoot themselves in the foot (e.g. by blocking js from Google domains, and then being surprised that a large number of other sites break that pull in JS libraries from the same google JS CDN), assume Pale Moon is broken, and blame the wrong person as a result.
I've heard exactly that kind of excuses about not implementing the "Fit to Width", and many other Opera Presto features in their new chromium clone, from Opera ASA.

I strongly believe that PM is not for an average clueless [l]user, PM is for well [enough] educated group of users who know which browser to use and why.

If you are afraid of someone "shooting himself in the foot" - it is only a question of proper UI wording and warnings for these settings. It is possible to mark them as "Advanced", deeper in the same tab. And as usual - a "Factory restore" button to the rescue near by.

access2godzilla

Re: Restore option to disable Javascript

Unread post by access2godzilla » 2014-04-14, 12:47

Moonchild wrote:having a JS toggle in page permissions would most likely have people shoot themselves in the foot
Didn't know that even Moonchild is also responding with Mozilla Corp style statements.

FYI, even Chrome has better granularity in this respect: yes, per site JS and image blocking. The former would be a nice addition to Pale Moon, the latter was removed from the FF codebase (FF 22 IIRC) and it should be restored as well (in Settings>Content). You want to prevent people from shooting themselves in the foot? Add a warning dialog, "Disabling JS could severely break the functionality of many websites. Continue at your own risk."

No wonder why many power users are switching to Chrome, despite the lack of powerful extensions, or the inability to customise the UI.

sIDcORK

Re: Restore option to disable Javascript

Unread post by sIDcORK » 2014-04-14, 14:57

No wonder why many power users are switching to Chrome
I have to ask, what is a "power user"? And what evidence is there that she, he or it is switching to Chrome?

Supernova

Re: Restore option to disable Javascript

Unread post by Supernova » 2014-04-14, 16:02

A power user is a user of a personal computer who has the ability to use advanced features of programs which are beyond the abilities of "average" users, but is not necessarily capable of computer programming and system administration
From https://en.wikipedia.org/wiki/Power_user ; and this corresponds to the usage I seen of the word.

jumba

Re: Restore option to disable Javascript

Unread post by jumba » 2014-04-14, 18:57

access2godzilla wrote:FYI, even Chrome has better granularity in this respect: yes, per site JS and image blocking.
Why should a web browser be developed to block viewing of web content? I strongly believe that this is a job for the extensions and they already do it well.
access2godzilla wrote:No wonder why many power users are switching to Chrome, despite the lack of powerful extensions, or the inability to customise the UI.
I've never heard of this to be a reason to switch to chrome. There are many text-based web browsers to view the content as plain text that sounds more a true "power user", who needs all the control over the web, would do! 8-)

Locked