madand / pentadactyl-pm

Pentadactyl for Pale Moon | New official repo is here https://github.com/pentadactyl/pentadactyl
Other
26 stars 4 forks source link

Stops working on Pale Moon 28.5.0 #7

Open zhihaoy opened 5 years ago

zhihaoy commented 5 years ago

On Windows.

john-x commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

This patch works for me, thanks @BillyIII

the-elven-archer commented 5 years ago

Patch worked perfectly, thanks @BillyIII

pizdjuk commented 5 years ago

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

jackrosenthal commented 5 years ago

Pentadactyl lives to see another day! Thank you =)

Think you can submit a pull request?

palemoonrider commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

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