app.electricitymap.org

For support with specific websites

Moderator: trava90

Forum rules
Please always mention the name/domain of the website in question in your topic title.
Please one website per topic thread (to help keep things organized). While behavior on different sites might at first glance seem similar, they are not necessarily caused by the same.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:
  1. Clear any current output
  2. Navigate or refresh the page in question
  3. Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.
jokusoftware
Moongazer
Moongazer
Posts: 10
Joined: 2015-08-23, 11:46
Location: Prague, Czech Republic

app.electricitymap.org

Unread post by jokusoftware » 2024-12-09, 09:12

Hello,
The site https://app.electricitymap.org currently crashes with "Error message: TypeError: (intermediate value).formatRange is not a function", apparently it seems to be using https://developer.mozilla.org/en-US/doc ... ormatRange feature (I think it was added to Fx 91). Is this available in PaleMoon or is there some workaround? Thanks.

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

Re: app.electricitymap.org

Unread post by Moonchild » 2024-12-09, 11:45

We don't currently support it.
We do have .format(), formatToParts() and resolvedOptions() of that subsection of the spec, but not formatRange() or formatRangeToParts()
Not sure about any workarounds for this at the moment.
"The world will not be destroyed by those who do evil, but by those who watch them without doing anything." - Albert Einstein
"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
adoxa
Lunatic
Lunatic
Posts: 326
Joined: 2019-03-16, 13:26
Location: Qld, Aus.
Contact:

Re: app.electricitymap.org

Unread post by adoxa » 2024-12-09, 14:03

Simple workaround using a Modify HTTP Response filter.

Code: Select all

[["app.electricitymaps.com",["/Time-.{8}\\.js/",["return new Intl.DateTimeFormat(r,{month:\"short\",day:\"numeric\",year:\"numeric\",timeZone:n}).formatRange(e,t)","const dtf=new Intl.DateTimeFormat(r,{month:\"short\",day:\"numeric\",year:\"numeric\",timeZone:n});return `${dtf.format(e)} - ${dtf.format(t)}`"]]]]

jokusoftware
Moongazer
Moongazer
Posts: 10
Joined: 2015-08-23, 11:46
Location: Prague, Czech Republic

Re: app.electricitymap.org

Unread post by jokusoftware » 2024-12-10, 10:23

adoxa wrote:
2024-12-09, 14:03
Simple workaround using a Modify HTTP Response filter.
Wonderful. Thank you very much. I was hoping for a quick workaround like this :thumbup: .

Post Reply