n0spam wrote: ↑November 15th, 2023, 12:01 am
SeaMonkey 2.53.18 beta 1 removed syntax for functions without curly brackets around the body.
[...]
The fix is trivial though:
[...]
OK, looks like I lied, and it's only trivial if you're familiar with JavaScript syntax. Sorry for that.
Thank you for this information.
I'm using Adblock Plus 2.9.1 with some modifications to make it work under 2.53.17. I prefer ADP because I'm not using external lists of filters and I really on my own choices which is much easier to perform than using uBO.
Unfortunately, 2.53.18 requires more changes - I can't see lists of filters anymore (empty/blank window for "Filter Preferences"). I'm looking for such solution since 2.53.18 pre-beta version. I tried to put curly brackets but without "return" it didn't worked at all.
Before your hint I had two major breaking errors:
1) Error Console message for "filters-filteractions.js"
Code: Select all
Timestamp: 11/15/2023, 8:34:49 PM
Error: SyntaxError: missing { before function body
Source File: chrome://adblockplus/content/ui/filters-filteractions.js
Line: 64, Column: 20
Source Code:
get treeElement() E("filtersTree"),
Original code:
Code: Select all
/**
* <tree> element containing the filters.
* @type XULElement
*/
get treeElement() E("filtersTree"),
Changed code:
Code: Select all
/**
* <tree> element containing the filters.
* @type XULElement
*/
get treeElement()
{
return E("filtersTree")
},
This one works and will not cause more errors.
2) Error Console message for "filters-filterview.js"
Code: Select all
Timestamp: 11/15/2023, 8:52:00 PM
Error: SyntaxError: missing { before function body
Source File: chrome://adblockplus/content/ui/filters-filterview.js
Line: 239, Column: 20
Source Code:
get treeElement() this.boxObject ? this.boxObject.treeBody.parentNode : null,
Original code:
Code: Select all
/**
* <tree> element that the view is attached to.
* @type XULElement
*/
get treeElement() this.boxObject ? this.boxObject.treeBody.parentNode : null,
Changed code:
Code: Select all
/**
* <tree> element that the view is attached to.
* @type XULElement
*/
get treeElement()
{
return this.boxObject ? this.boxObject.treeBody.parentNode : null
},
It helped because there is no more error for this part of script in Error Console.
Unfortunately, it's not over for "filters-filterview.js". New entry:
Code: Select all
Timestamp: 11/15/2023, 8:59:58 PM
Error: SyntaxError: missing { before function body
Source File: chrome://adblockplus/content/ui/filters-filterview.js
Line: 308, Column: 21
Source Code:
get subscription() this._subscription,
Original code:
Code: Select all
/**
* Filter subscription being displayed.
* @type Subscription
*/
get subscription() this._subscription,
set subscription(value)
{
if (value == this._subscription)
return;
// Make sure the editor is done before we update the list.
if (this.treeElement)
this.treeElement.stopEditing(true);
this._subscription = value;
this.refresh(true);
},
As you can see it's a little more complicated and I suspect we need more {} and "return"s...
Can you help with this one?