pentadactyl-pm icon indicating copy to clipboard operation
pentadactyl-pm copied to clipboard

Stops working on Pale Moon 28.5.0

Open zhihaoy opened this issue 5 years ago • 9 comments

On Windows.

zhihaoy avatar Apr 30 '19 15:04 zhihaoy

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

john-x avatar Apr 30 '19 19:04 john-x

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")

BillyIII avatar May 01 '19 03:05 BillyIII

This patch works for me, thanks @BillyIII

TimB87 avatar May 01 '19 09:05 TimB87

Patch worked perfectly, thanks @BillyIII

the-elven-archer avatar May 01 '19 19:05 the-elven-archer

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

pizdjuk avatar May 03 '19 12:05 pizdjuk

Pentadactyl lives to see another day! Thank you =)

Think you can submit a pull request?

jackrosenthal avatar May 05 '19 05:05 jackrosenthal

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)

palemoonrider avatar May 07 '19 16:05 palemoonrider

@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.

xaizek avatar May 07 '19 16:05 xaizek

@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!

palemoonrider avatar May 07 '19 17:05 palemoonrider