From 00536f5febd4527275b0aa9cd3b193edfdc94a7b Mon Sep 17 00:00:00 2001 From: Jack Rosenthal Date: Sun, 5 May 2019 15:40:19 -0600 Subject: [PATCH] Palemoon 28.5 compatibility This is a patch for compatibility with PM 28.5 based on Billylll@'s patch posted to madand#7. --- common/content/dactyl.js | 2 +- common/content/mow.js | 2 +- common/modules/base.jsm | 6 +++--- common/modules/commands.jsm | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 0b675140..28d57b36 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -1932,7 +1932,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { dactyl.log(_("dactyl.modulesLoaded"), 3); userContext.DOM = Class("DOM", DOM, { - init(sel, ctxt) { + init: function init(sel, ctxt) { return DOM(sel, ctxt || buffer.focusedFrame.document); } }); diff --git a/common/content/mow.js b/common/content/mow.js index 49cb5c4d..e8eafbbd 100644 --- a/common/content/mow.js +++ b/common/content/mow.js @@ -7,7 +7,7 @@ "use strict"; var MOW = Module("mow", { - init() { + init: function init() { let proxy = new Proxy(this, { get(target, prop, receiver) { if (prop in target) diff --git a/common/modules/base.jsm b/common/modules/base.jsm index eef3ae1e..16a10bc6 100644 --- a/common/modules/base.jsm +++ b/common/modules/base.jsm @@ -1815,7 +1815,7 @@ update(iter, { }); var Iter = Class("Iter", { - init(iter) { + init: function (iter) { this.iter = iter; if (!(Symbol.iterator in iter) && "__iterator__" in iter) this.iter = iter.__iterator__(); @@ -1826,9 +1826,9 @@ var Iter = Class("Iter", { }; }, - next() { return this.iter.next() }, + next: function () { return this.iter.next() }, - send() { return apply(this.iter, "send", arguments) }, + send: function () { return apply(this.iter, "send", arguments) }, "@@iterator": function () { return this.iter }, diff --git a/common/modules/commands.jsm b/common/modules/commands.jsm index 39e97913..2d0ed3c3 100644 --- a/common/modules/commands.jsm +++ b/common/modules/commands.jsm @@ -476,7 +476,7 @@ var Ex = Module("Ex", { commands: null, - init() { + init: function () { let proxy = new Proxy(this, { get(target, prop, receiver) { if (prop === "isProxy") @@ -494,7 +494,7 @@ var Ex = Module("Ex", { return proxy; }, - _args(cmd, args) { + _args: function(cmd, args) { args = Array.slice(args); let res = cmd.newArgs({ context: this.context }); @@ -522,7 +522,7 @@ var Ex = Module("Ex", { return res; }, - _complete(cmd) { + _complete: function (cmd) { return (context, func, obj, args) => { args = this._args(cmd, args); args.completeArg = args.length - 1; @@ -531,7 +531,7 @@ var Ex = Module("Ex", { }; }, - _run(name) { + _run: function (name) { const self = this; let cmd = this.commands.get(name); util.assert(cmd, _("command.noSuch"));