PM 28.0.0b2 breaks CustomButtons Topic is solved

This board is for discussions, bug reports, etc. for pre-releases of the v28 milestone building on UXP.
Locked
dinosaur
Fanatic
Fanatic
Posts: 131
Joined: 2014-06-03, 09:26
Location: France

PM 28.0.0b2 breaks CustomButtons

Post by dinosaur » 2018-07-05, 15:14

Greetings,

I finally got around finding a little time to compile and try PM 28. Among all the extensions I am using, one (a pure little jewel that I could simply not do without so much I use it) is totally broken: Custom Buttons.

The issue seems to be related with the __defineGetter__ JavaScript function.

Here is what shows in the console:
CustomButtonsErrors.png
Last edited by dinosaur on 2018-07-05, 15:15, edited 1 time in total.

GMforker
Astronaut
Astronaut
Posts: 537
Joined: 2015-08-27, 06:29
Location: Czech Republic

Re: PM 28.0.0b2 breaks CustomButtons

Post by GMforker » 2018-07-05, 16:06

__defineGetter__ vs. this.__defineGetter__
__defineSetter__ vs. this.__defineSetter__
See also viewtopic.php?f=63&p=142327#p142327

User avatar
JustOff
Localization Coordinator
Localization Coordinator
Posts: 1934
Joined: 2015-09-03, 19:47
Location: UA
Contact:

Re: PM 28.0.0b2 breaks CustomButtons

Post by JustOff » 2018-07-05, 16:09

Try to install custom_buttons-0.0.5.8.9-fixed8.xpi (or earlier "fixed" versions from the linked forum), and don't forget that the buttons you are using with it must also be compatible.
Last edited by JustOff on 2018-07-05, 16:18, edited 1 time in total.
Here are the add-ons I made in a spare time. That was fun!

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 26080
Joined: 2011-08-28, 17:27
Location: 58°2'16"N 14°58'31"E
Contact:

Re: PM 28.0.0b2 breaks CustomButtons

Post by Moonchild » 2018-07-05, 16:26

To quote the relevant tidbit for extension devs:

"Previously, the __defineGetter__ and __defineSetter__ methods could be called at the global scope without any object, because the global object was automatically used in such cases. As part of ECMAScript 2016 compliance, Pale Moon 28 and later no longer support the legacy behavior and throw a TypeError instead. The workaround here is to explicitly use the this keyword, like this.__defineGetter__ or this.__defineSetter__."
"There will be times when the position you advocate, no matter how well framed and supported, will not be accepted by the public simply because you are who you are." -- Merrill Rose
Image

User avatar
jars_
Lunatic
Lunatic
Posts: 292
Joined: 2016-12-27, 00:12

Re: PM 28.0.0b2 breaks CustomButtons

Post by jars_ » 2018-07-05, 18:12

Or, you can try CB3 by srazzano with some improvements(GUI tabs).

dinosaur
Fanatic
Fanatic
Posts: 131
Joined: 2014-06-03, 09:26
Location: France

Re: PM 28.0.0b2 breaks CustomButtons

Post by dinosaur » 2018-07-05, 20:58

Thank you folks ! The fixed versions do work fine. :thumbup:

(posted with PM 28.0.0b2)

Locked