keysnail icon indicating copy to clipboard operation
keysnail copied to clipboard

Error when loading keysnail.js in Firefox Nightly 41.0a1 (2015-06-29)

Open ghost opened this issue 9 years ago • 10 comments

When attempting to use a previously generated keysnail.js configuration file in Firefox Nightly 41.0a1+, it cites missing '{' on line 275. I did not experience this in Firefox stable or later (v38+, v39+, v40+).

Offending section
    let (ct = command.getClipboardText()) 
    (!command.kill.ring.length || ct != command.kill.ring[0]) && command.pushKillRing(ct);
Corrected
    let (ct = command.getClipboardText()) {
      (!command.kill.ring.length || ct != command.kill.ring[0]) && command.pushKillRing(ct);
    }

Using the corrected section did not error in releases prior to Firefox 41,

ghost avatar Jun 29 '15 17:06 ghost

Same problem occurs in Firefox Developer Edition 41.0a2 (2015-07-04). Corrected the same way above to _keysnail.js in my home directory.

langsam avatar Jul 04 '15 23:07 langsam

Thank you for confirming this @langsam, I've updated my notes above to reflect your findings. It appears that only versions 41+ are where this occurs and the fix is extremely minor, so I view this as a low priority.

ghost avatar Jul 05 '15 02:07 ghost

This may become a larger problem for some now that Firefox is being updated via the package updater on Ubuntu.

Jesse-Millwood avatar Sep 24 '15 12:09 Jesse-Millwood

I ran into exactly this issue yesterday after Ubuntu did an update, and this fix didn't seem to help. Even after downgrading (and removing and reinstalling keysnail) keysnail would still not activate successfully. I had to also delete my firefox profile.

Sorry I don't have a more precise report. I was probably doing something wrong, and I was kind frantically trying to get keysnail to work again, because it was really, really annoying to open new windows every time I wanted to scroll down a line.

Right now I have a fresh profile and firefox pinned to a version that works with keysnail.

I could try to track down a more specific, reproducible case if it would be helpful.

pjstadig avatar Sep 24 '15 13:09 pjstadig

Sorry for the inconvenience. In most cases, what you have to do is remove dropped syntax (let expression/statements) from your .keysnaiil.js (@pjstadig 's case is mysterious).

I've wrote a simple guide: https://github.com/mooz/keysnail/wiki/How-to-fix-errors-in-your-.keysnail.js

Hope this will help.

mooz avatar Sep 24 '15 14:09 mooz

I tried to reproduce what I was seeing. I'm on Ubuntu 14.04.3 with Firefox 41.0+build3-0ubuntu0.14.04.1 and Keysnail 2.1.6. If I start up firefox it will complain about the let syntax. Even after I fix the let syntax and restart firefox the keysnail bindings are still broken. Uninstalling and reinstalling keysnail doesn't seem to work. However, if I delete my profile and recreate it, and start up firefox in that clean profile with the syntax already fixed, then the bindings work. It is like there's some state left around in my profile that is interfering with keysnail.

pjstadig avatar Sep 24 '15 16:09 pjstadig

pjstadig: I thought I was in the same situation, and then I noticed that Keysnail simply wasn't "enabled" any longer in my profile. Menu -> Tools -> Keysnail -> Enable got things working again. It took me a while to actually notice that, though, so I mention it just in case that's all that's happening in your case.

phil-s avatar Sep 26 '15 05:09 phil-s

phil-s: Firefox has become almost unusable for me since I haven't been able to use keysnail after I became so dependent on it. I tried to disable and re-enable it through the hamburger menu -> plug-ins but that didn't work. Then I remembered I had to press Alt to see the top menu (I keep it hidden) and then your method worked! Thank you!

Jesse-Millwood avatar Sep 26 '15 23:09 Jesse-Millwood

@phil-s yes, I just tested it again, and you are correct. Like @Jesse-Millwood I don't see the menubar unless I hit Alt. I was going to the Firefox Add-Ons page and seeing that keysnail was enabled there, but the fact that keysnail has a separate kill switch was confusing. Also, the value of that kill switch seems to be preserved even if you remove and re-install keysnail, so that was also adding to my confusion.

Thanks for clearing it up!

pjstadig avatar Sep 27 '15 00:09 pjstadig

Had the same issue here since upgrading to FF 41.0. @ghost's solution solved this for me.

jeroentbt avatar Sep 28 '15 13:09 jeroentbt