Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stops working on Pale Moon 28.5.0 #7

Open
zhihaoy opened this issue Apr 30, 2019 · 9 comments

Comments

Projects
None yet
9 participants
@zhihaoy
Copy link

commented Apr 30, 2019

On Windows.

@john-x

This comment has been minimized.

Copy link

commented Apr 30, 2019

No longer works on Linux* either. The add-ons manager shows it enabled but all the functions are completely absent (as if it was disabled).

*crunchbang 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64 GNU/Linux

@BillyIII

This comment has been minimized.

Copy link

commented May 1, 2019

Quick and dirty fix, works for me. EDIT: RIP formatting.

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..64a8a4a4 100644
--- a/common/modules/base.jsm
+++ b/common/modules/base.jsm
@@ -909,6 +909,18 @@ function Class(...args) {
     if (callable(args[0]))
         superclass = args.shift();
 
+    // dump('\nname -----------------------\n');
+    // dump(name);
+    // dump('\nargs -----------------------\n');
+    // try { dump(args); } catch(e) { dump('ERROR ' + e); }
+    // dump('\ninit -----------------------\n');
+    // try { dump(Class.prototype.init); } catch(e) { dump('ERROR ' + e); }
+    // dump('\nexec ');
+    // try { dump(/^function .*?\((.*?)\)/
+    //            .exec(args[0] && args[0].init || Class.prototype.init));
+    //     } catch(e) { dump('ERROR ' + e); }
+    // dump('\n');
+    
     var Constructor = eval(String.replace('\n\
         (function constructor(PARAMS) {                      \n\
             var self = Object.create(Constructor.prototype); \n\
@@ -1815,7 +1827,7 @@ update(iter, {
 });
 
 var Iter = Class("Iter", {
-    init(iter) {
+    init: function init(iter) {
         this.iter = iter;
         if (!(Symbol.iterator in iter) && "__iterator__" in iter)
             this.iter = iter.__iterator__();
diff --git a/common/modules/commands.jsm b/common/modules/commands.jsm
index 39e97913..3cf049c3 100644
--- a/common/modules/commands.jsm
+++ b/common/modules/commands.jsm
@@ -476,7 +476,7 @@ var Ex = Module("Ex", {
 
     commands: null,
 
-    init() {
+    init: function init() {
         let proxy = new Proxy(this, {
             get(target, prop, receiver) {
                 if (prop === "isProxy")
@TimB87

This comment has been minimized.

Copy link

commented May 1, 2019

This patch works for me, thanks @BillyIII

@the-elven-archer

This comment has been minimized.

Copy link

commented May 1, 2019

Patch worked perfectly, thanks @BillyIII

@pizdjuk

This comment has been minimized.

Copy link

commented May 3, 2019

works for me too. waiting for the "production-quality" patch :D:D:D

@jackrosenthal

This comment has been minimized.

Copy link

commented May 5, 2019

Pentadactyl lives to see another day! Thank you =)

Think you can submit a pull request?

jackrosenthal added a commit to jackrosenthal/pentadactyl-pm that referenced this issue May 5, 2019

Palemoon 28.5 compatibility
This is a patch for compatibility with PM 28.5 based on Billylll@'s
patch posted to madand#7.
@palemoonrider

This comment has been minimized.

Copy link

commented May 7, 2019

Newbie here. Could somebody please tell me how to actually apply the patch? Is it a piece of JavaScript I need to run, if so where? Or is there some file I need to replace with this, again, if so, where?

Many thanks guys (only using PaleMoon because of pentadactyl since demise of vimperator)

@xaizek

This comment has been minimized.

Copy link

commented May 7, 2019

@palemoonrider, you can just clone https://github.com/jackrosenthal/pentadactyl-pm which contains this patch with additional changes in the master branch. Then follow instructions for building xpi given in the README.

@palemoonrider

This comment has been minimized.

Copy link

commented May 7, 2019

@palemoonrider, you can just clone https://github.com/jackrosenthal/pentadactyl-pm which contains this patch with additional changes in the master branch. Then follow instructions for building xpi given in the README.

xalzek, thanks for the speedy reply.

I followed the instructions and built the .xpi. I then opened it manually from within Palemoon and it seems to have added the addon successfully in the Add-ons Manager. However, keys still don't seem to have any Vim functionality. Don't know if you have any further ideas but thanks anyway.

Using Ubuntu.

UPDATE:

Ignore the above. I cloned the old source instead of the updated one. Everything working fine now. Thanks once again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.