effecticely disabling javascript

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
User avatar
suseuser04
Moongazer
Moongazer
Posts: 13
Joined: 2019-03-25, 14:04

effecticely disabling javascript

Unread post by suseuser04 » 2019-03-25, 14:28

Hello:

My question is how I can disable javascript in palemoon.

I tried to disable javascript for the given page in "Default Developer Tools" window,
under "Advanced settings" section, "Disable JavaScript" check box, but it does not
work as I expect. Here is an example:

I want to download mozilla firefox addons from addons.mozilla.org site in
palemoon. When the addon page is loaded, there is no download button for
downloading the addon. Instead, there is a "Only with Firefox - Get Firefox Now"
button. If Javascript is disabled, this button should be changed to a download
button, but in palemoon the "Only with Firefox - Get Firefox Now" button stays
even if Javascript is disabled. In Seamonkey web browser if I disable Javascript
in the preferences, the "Only with Firefox - Get Firefox Now" button is replaced
by a "Download Now" button which gives the download link of the addon.
How can I achieve this in palemoon?

Thanks in advance,

suseuser04

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

Re: effecticely disabling javascript

Unread post by Moonchild » 2019-03-25, 16:23

  • You're trying to do the wrong thing here. These buttons are not dependent on JS, they are dependent on server-side detection based on the user-agent string.
  • Firefox extensions from addons.mozilla.org cannot be used in Pale Moon. They are not compatible.
"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

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2194
Joined: 2018-05-05, 13:29

Re: effecticely disabling javascript

Unread post by vannilla » 2019-03-25, 17:46

Even if addons.mozilla.org is useless for downloading extensions for Pale Moon, you can still disable Javascript using extensions such as uBlock origin or eMatrix.

01101001b

Re: effecticely disabling javascript

Unread post by 01101001b » 2019-03-25, 18:15

First of all, a question :wtf: Are you aware Firefox Quantum addons do NOT work in Pale Moon, right?

Once upon a time, pre-Firefox Quantum addons could/could not work in Pale Moon, but now, they don't.

Regarding your question about disable Javascript for a given page, you could try this addon: ScriptBlock

Regards! :thumbup:

User avatar
gepus
Keeps coming back
Keeps coming back
Posts: 943
Joined: 2017-12-14, 12:59

Re: effecticely disabling javascript

Unread post by gepus » 2019-03-25, 18:19

vannilla wrote:..., you can still disable Javascript using extensions such as uBlock origin or eMatrix.
Don't want to sound like a smartass but uBlockO blocks JavaScript. I don't use eMatrix but I assume it does the same.
Disabling and blocking are not exactly the same thing. Disabling is the cleaner and resource sparing option.
Also in case of blocking, some sites may misbehave and won't redirect you to their scriptless flavor.

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

Re: effecticely disabling javascript

Unread post by Moonchild » 2019-03-25, 20:51

gepus wrote:Don't want to sound like a smartass
Trust me, you sound like the opposite of one.

Blocking content JavaScript and disabling JavaScript effectively achieve the same from a web page's perspective: it won't run.
Blocking would be the better option because it actually prevents the download, and can be applied in a fine-grained and per-site manner. Disabling JavaScript for content does neither.
"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

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2194
Joined: 2018-05-05, 13:29

Re: effecticely disabling javascript

Unread post by vannilla » 2019-03-25, 22:35

We can probably discuss disabling vs blocking in the context of the <noscript> tag, but I believe it's an edge case valid only for first-party scripts (which, at least in eMatrix, are enabled/not blocked by default), so I don't know how much it weigths.
In case of third-party scripts, disabling Javascript and blocking it are the same action, as in both cases they are not executed. However, blocking is applied before the resource is downloaded, while no one guarantees that disabling doesn't also stops downloads.
Moonchild says Pale Moon still downloads resources even when Javascript is disabled (that's what I understood at least), but in general it's platform-dependant and only blocking guarantees nothing is downloaded.
Anyway, in my post I just wanted to suggest that there are extensions which can achieve the end goal of avoiding script execution, however you want to perform it.

User avatar
therube
Board Warrior
Board Warrior
Posts: 1651
Joined: 2018-06-08, 17:02

Re: effectively disabling javascript

Unread post by therube » 2019-03-25, 23:40

<typo> effectively

Disabling JavaScript is (typically) one means of thwarting AMO's asinine tactics, but for some reason is not effective in PM on AMO?

Likewise ScriptBlock (or YesScript) or manually disabling JavaScript (javascript.enabled) are ineffectual?

Not sure why?
Does not appear to be a useragent issue?
(Wonder if AMO..., no telling what they might be doing?)


Someone tell me what is going on there?
Even with (Cough)Script installed, blocking .mozilla.org, still - in PM, AMO is blocking the download, redirecting you to instead download FF?

In SeaMonkey, disabling JavaScript, by whatever means, works (in most all cases).

Spoofing UA, doesn't seem to matter?
javascript.enabled, doesn't seem to matter?
Extensions or not, doesn't seem to matter?
(... in PM)

Separately, or maybe related, the page look, layout are totally different in SeaMonkey vs PM, with PM looking like what you get if you visit in FF 66.

Similarly an AMO "search URL", https://addons.mozilla.org/en-US/firefo ... s&q=ublock, works in PM & fails in SM.
(In this case, the failure in SM is due to AMO's sniffing & is "fixed" with a useragent override.)
(A direct link to an extension, https://addons.mozilla.org/en-US/firefo ... ostpopular, works in both browsers.)

1. SeaMonkey 2. Pale Moon 3. FF 66
https://i.postimg.cc/6BpTd7sY/AMO-web-p ... oon-FF.png

(Note that in FF, if you visit an extension page of an extension that you do have installed [in FF], you are presented with a 'Remove' button. Sick.)

User avatar
gepus
Keeps coming back
Keeps coming back
Posts: 943
Joined: 2017-12-14, 12:59

Re: effectively disabling javascript

Unread post by gepus » 2019-03-26, 00:43

therube wrote:Someone tell me what is going on there?
Browser sniffing. No JavaScript involved.
I can download any extension from AMO with JavaScript enabled using Pale Moon. Only thing I have to do is to spoof the UserAgent.
You do not have the required permissions to view the files attached to this post.

User avatar
therube
Board Warrior
Board Warrior
Posts: 1651
Joined: 2018-06-08, 17:02

Re: effecticely disabling javascript

Unread post by therube » 2019-03-26, 00:54

What UA do you use?

(Oh, & I didn't even realize, but PM already comes with a spoof for AMO.)

OK, so I just picked an old FF spoof & that worked.
Damn Mozilla!

Code: Select all

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0

Thanks :-).

User avatar
gepus
Keeps coming back
Keeps coming back
Posts: 943
Joined: 2017-12-14, 12:59

Re: effecticely disabling javascript

Unread post by gepus » 2019-03-26, 01:00

Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0

You're welcome. :)

User avatar
therube
Board Warrior
Board Warrior
Posts: 1651
Joined: 2018-06-08, 17:02

Re: effecticely disabling javascript

Unread post by therube » 2019-03-26, 01:13

(Oh, & I didn't even realize, but PM already comes with a spoof for AMO.)
That was my whole issue.
Not realizing that existed, I took the "simple" route & was simply setting a general.useragent.override, yet the existing general.useragent.override.addons.mozilla.org was overriding that, thwarting my attempts at spoofing.

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

Re: effecticely disabling javascript

Unread post by Moonchild » 2019-03-26, 12:37

therube wrote:
(Oh, & I didn't even realize, but PM already comes with a spoof for AMO.)
That was my whole issue.
Not realizing that existed, I took the "simple" route & was simply setting a general.useragent.override, yet the existing general.useragent.override.addons.mozilla.org was overriding that, thwarting my attempts at spoofing.
And that is very much by design :)
"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

User avatar
suseuser04
Moongazer
Moongazer
Posts: 13
Joined: 2019-03-25, 14:04

Re: effecticely disabling javascript

Unread post by suseuser04 » 2019-03-27, 11:15

>by Moonchild » Mon, 25 Mar 2019, 17:23

Thank you for your reply.

>You're trying to do the wrong thing here. These buttons are not dependent on JS,
>they are dependent on server-side detection based on the user-agent string.

OK, but how can you explain then that in Seamonkey 2.49:
- if javascript is enabled it shows "Only with Firefox - Get Firefox Now" button
- if javascript is enabled it shows "Download Now" button?

On the other hand, if I change palemoon's general.useragent.override.addons.mozilla.org
key to what I have in seamonkey, I get the "Download Now" button if I disable javascript.
That is, as I see, both user agent string and javascript is involved.

>Firefox extensions from addons.mozilla.org cannot be used in Pale Moon.
>They are not compatible.

That's not the issue here, I don't want to use them in palemoon. I want to save
them (download) to my hard disk. I don't understand why mozilla restricts the
downloads to firefox browser only. Isn't it a legitimate requirement being able
to _download_ (_save_) an addon with a different browser? It is a bad restrictive
design trying to force you to use firefox browser.

Anyway by changing the user agent string in palemoon I can do now what I want.

Thanks,

suseuser04

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: effecticely disabling javascript

Unread post by coffeebreak » 2019-03-27, 11:21

suseuser04 wrote:OK, but how can you explain...

Mozilla designed AMO to respond differently depending on which browser it thinks is in use.

(and AMO gets its notion of which browser is in use from the user agent)

User avatar
Isengrim
Board Warrior
Board Warrior
Posts: 1325
Joined: 2015-09-08, 22:54
Location: 127.0.0.1

Re: effecticely disabling javascript

Unread post by Isengrim » 2019-03-27, 11:34

Off-topic:
suseuser04 wrote:It is a bad restrictive design trying to force you to use firefox browser.
Just the latest in a long line of bad design decisions, I'm afraid. :(
a.k.a. Ascrod
Linux Mint 19.3 Cinnamon (64-bit), Debian Bullseye (64-bit), Windows 7 (64-bit)
"As long as there is someone who will appreciate the work involved in the creation, the effort is time well spent." ~ Tetsuzou Kamadani, Cave Story

User avatar
therube
Board Warrior
Board Warrior
Posts: 1651
Joined: 2018-06-08, 17:02

Re: effecticely disabling javascript

Unread post by therube » 2019-03-27, 12:03

That is, as I see, both user agent string and javascript is involved.
Correct.
I don't understand why mozilla restricts the
downloads to firefox browser only. Isn't it a legitimate requirement being able
to _download_ (_save_) an addon with a different browser?
Of course one should be able to do that.
And the reason is obvious, because Mozilla is the bastion of "openness" :-).
(Huh, :confused:, you just said?)
Mozilla designed AMO to respond differently depending on which browser it thinks is in use.
Yep, that's what I want.
I want Mozilla to think for me. For Mozilla to decide what I'm allowed to do. Yep.
Just the latest in a long line of bad design decisions, I'm afraid.
Now is not the time to mince words, just get out there & tell it like it is.

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

Re: effecticely disabling javascript

Unread post by Moonchild » 2019-03-27, 12:59

suseuser04 wrote: Isn't it a legitimate requirement being able
to _download_ (_save_) an addon with a different browser? It is a bad restrictive
design trying to force you to use firefox browser.
It's called the "walled garden approach". In Mozilla's world, the only browser that they should serve is Firefox. So they've made sure to restrict their services more and more to official Mozilla Firefox builds only.
"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

User avatar
gepus
Keeps coming back
Keeps coming back
Posts: 943
Joined: 2017-12-14, 12:59

Re: effecticely disabling javascript

Unread post by gepus » 2019-03-27, 13:26

therube wrote:
That is, as I see, both user agent string and javascript is involved.
Correct.
Can't confirm.
Whether JavaScript is enabled or not I can download with Pale Moon extensions from AMO. Only mandatory requirement is a spoofed UserAgent.

New Tobin Paradigm

Re: effecticely disabling javascript

Unread post by New Tobin Paradigm » 2019-03-27, 15:37

Again all this is pointless anyway.. There is NOTHING left on amo except maybe search engine plugins (is that still a thing in the mozillasphere?) that UXP applications can use.

We have our own awesome tools and services now.. So wtf is the point here? Explain it to me.