Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme: Pale Moon fails to load #637

Closed
jlf001 opened this issue Jan 7, 2017 · 13 comments
Closed

Theme: Pale Moon fails to load #637

jlf001 opened this issue Jan 7, 2017 · 13 comments

Comments

@jlf001
Copy link

jlf001 commented Jan 7, 2017

In Webmin 1.830 and theme version 18.32 (upgrading to latest made no change) I get the following javascript errors in PaleMoon. The left menu loads but no content pages will load due to the errors. Downgrading to webmin version 1.820 works correctly. I replaced the contents of content.min.js with content.js from github, parent.min.js is unchanged.

SyntaxError: missing ; before statement content.min.js:2595:8
TypeError: window.page.f__g is not a function parent.min.js:6:38366
TypeError: g.data(...) is undefined parent.min.js:6:3060

@iliajie
Copy link
Collaborator

iliajie commented Jan 7, 2017

What is the server OS version/name?

Did you restart Webmin? Did you try to add to theme's exclusions this module?

@iliajie
Copy link
Collaborator

iliajie commented Jan 7, 2017

Pale Moon is browser. 😆 Ok, I will have a look now.

@iliajie
Copy link
Collaborator

iliajie commented Jan 7, 2017

What is your PaleMoon version?

@iliajie
Copy link
Collaborator

iliajie commented Jan 7, 2017

Hi,

I have tested things around. Pale Moon doesn't seem to support ES6 completely.

It fails on

let DELAY = 340,
    clicks = 0,
    timer = null;

It fails on this and would fail in other places most likely. I think it's something browser devs should add/fix.

@iliajie iliajie changed the title Causes Javascript errors preventing loading in PaleMoon Theme: PaleMoon load error Jan 7, 2017
@iliajie iliajie changed the title Theme: PaleMoon load error Theme: Pale Moon fails to load Jan 7, 2017
@jlf001
Copy link
Author

jlf001 commented Jan 7, 2017

I will see what I can find out from them.

@jlf001
Copy link
Author

jlf001 commented Jan 8, 2017

According to them it does not currently support 'let' in sloppy mode. If the code is called by the standards with a version it works fine. I have added type="application/javascript;version=1.7" to all <script> tags in the following files.

authentic-init.pm
authentic-lib.pm
authentic.pm

I have only done limited testing so far but everything seems to work fine in both Pale Moon and Firefox, but breaks it in IE 11. Not sure if there is a way to make them all happy or not.

@iliajie
Copy link
Collaborator

iliajie commented Jan 8, 2017

Hi,

The HTML5 spec says that the type attribute is purely advisory.

What is the market-share for this browser? What is your idea on using it, instead, let's say of Firefox?

@iliajie
Copy link
Collaborator

iliajie commented Jan 8, 2017

@jlf001
Copy link
Author

jlf001 commented Jan 8, 2017

The reason why I had to find a new browser to use instead of firefox was because they were becoming to much like google and having to control everything. The biggest problem is I have an extension that I created for my own use, but you can not use your own extensions in firefox any more. They have to be approved by them before you can install them. I tried the developer version but the biggest thing I did not like was the fact was that it sent them information on every site you visit.

Browsing the spec it does say type is optional and will default to application/javascript. I would assume this would mean defaulting to the most recent approved spec, and only needing to supply the version if it is using a draft spec or needing an older version. Not sure why it breaks IE, but the fact it seems to makes it more difficult to support both.

I have no idea what the market share, but probably not very large considering chrome has a large size of it, especially in the US.

@iliajie
Copy link
Collaborator

iliajie commented Jan 8, 2017

The best way to do it is to make it detect the browser on the server side and inject the tag for PaleMoon Browser.

However, what if you replace let with var for those *.min.js files? Will it work then? I guess that it would also fail on const. If so replace const with var as well and tell me what you got.

@jlf001
Copy link
Author

jlf001 commented Jan 8, 2017

Changing 'let' to 'var' in both places seems to have fixed the problem, it now appears to work in all 3 browsers that I have.

@jlf001
Copy link
Author

jlf001 commented Jan 8, 2017

I only changed it in content.min.js as so far that is the only one causing the errors, and have not checked any others for it.

@iliajie
Copy link
Collaborator

iliajie commented Jan 31, 2017

Ref: #45506

iliajie pushed a commit that referenced this issue May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants