Problem with a javascript element on a site.

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
Iceberg
Hobby Astronomer
Hobby Astronomer
Posts: 26
Joined: 2019-03-27, 22:23

Problem with a javascript element on a site.

Unread post by Iceberg » 2023-03-16, 22:28

On this site.

https://www.mascipiemonte.it/

The email address is not visible with Pale Moon (and with SeaMonkey), while it is visible with Firefox and other browsers.
An image to clarify, in the upper Pale Moon, in the lower Firefox.
Image

This is the error.

Code: Select all

Errore:  TypeError: window.customElements is undefined
File sorgente: https://www.mascipiemonte.it/media/system/js/joomla-hidden-mail.min.js
This is the response of the webmaster:
Ciao, ho provato a guardare il tipo di errore, però sembra essere un parametro window.customElements che non viene passato correttamente dal browser, forse per compatibilità di tipo
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Unexpected_type
Ora provo a cercare di capire (da che dipende, n.d.r.), anche se credo ci vorrà un pochino.
Ho provato a scaricare questo browser e lo fa anche a me, però con Chrome, Firefox e Edge il problema non c'è.
Quindi credo dipenda dal browser che non passando correttamente qualche valore viene visto come bot.
Però non sono sicurissimo, provo a indagare.
Automatic translation.
Hi, I tried to look at the type of error, but it seems to be a window.customelements parameter that is not passed correctly from the browser, perhaps for compatibility of the type
https://developer.mozilla.org/en-us/docs/web/ Javascript/Reference/Errors/Unexpected_type
Now I try to try to understand (on what depends, editor's note), even if I think it will take a little.
I tried to download this browser and it does so too, but with Chrome, Firefox and Edge the problem is not there.
So I think it depends on the browser that not correctly passing some value is seen as a bot.
But I'm not very sure, I try to investigate.
Does it depend on Pale Moon or anything else?
Thanks for the attention.

User avatar
Nigaikaze
Board Warrior
Board Warrior
Posts: 1322
Joined: 2014-02-02, 22:15
Location: Chicagoland

Re: Problem with a javascript element on a site.

Unread post by Nigaikaze » 2023-03-16, 22:48

Here's your problem:
Iceberg wrote:
2023-03-16, 22:28

Code: Select all

Errore: TypeError: window.customElements is undefined
Pale Moon does not currently support custom elements. However, a significant amount of custom elements support has been added for the forthcoming Pale Moon 32.1.0, so try this site again once that version has been released.
Nichi nichi kore ko jitsu = Every day is a good day.

User avatar
Iceberg
Hobby Astronomer
Hobby Astronomer
Posts: 26
Joined: 2019-03-27, 22:23

Re: Problem with a javascript element on a site.

Unread post by Iceberg » 2023-03-16, 23:06

Many thanks for the precise, and fast, reply.

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

Re: Problem with a javascript element on a site.

Unread post by Moonchild » 2023-03-16, 23:12

To be fair I don't understand why a mail address hiding script would even need to use Google WebComponents. It's literally throwing a freightliner at something when a dingy would do.
"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
FranklinDM
Add-ons Team
Add-ons Team
Posts: 575
Joined: 2017-01-14, 02:40
Location: Philippines
Contact:

Re: Problem with a javascript element on a site.

Unread post by FranklinDM » 2023-03-16, 23:25

Iceberg wrote:
2023-03-16, 22:28
The email address is not visible with Pale Moon (and with SeaMonkey), while it is visible with Firefox and other browsers.
This should be fixed with the latest code that we have in the development branch.

Yeah, they're using a custom element to display the email address, with the address itself being encoded in base 64...
Attachments
Screenshot 2023-03-17 072204.png

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

Re: Problem with a javascript element on a site.

Unread post by Moonchild » 2023-03-17, 10:28

FranklinDM wrote:
2023-03-16, 23:25
encoded in base 64...
Pointless. base64 is commonly decoded by scrapers.
Aside from that you really don't need a custom element for that. People never heard of setting DOM attributes?
"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

Locked