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

Pale Moon (fork of Firefox) support #474

Closed
jaetonel opened this issue Mar 20, 2015 · 1 comment
Closed

Pale Moon (fork of Firefox) support #474

jaetonel opened this issue Mar 20, 2015 · 1 comment

Comments

@jaetonel
Copy link

Hello, would you consider creating a Pale Moon-compatible version of VimFx?

In short, since its 25.0 version, Pale Moon has decided not to follow the redesign of Firefox (Australis) and to remain with the UI of Firefox 24 ESR. It has regular security patches and desirable features from recent versions of Firefox are backported to it. As a consequence of not using Australis, the Add-on SDK is that of Firefox 24 (may have some minor differences, not sure). More info in these links:
http://forum.palemoon.org/viewtopic.php?f=1&t=5884
http://forum.palemoon.org/viewtopic.php?f=1&t=6063
http://forum.palemoon.org/viewtopic.php?f=46&t=7005

The last version of VimFx that installs in Pale Moon is ancient (0.5.3). However, ver 0.5.14 works fine after a few minor modifications of the .xpi file:

  1. Modify install.rdf to allow installation (set "minVersion" to "24.0", because of the add-on SDK version).
  2. Delete all occurrences of "TabView" - the Tab Groups feature has been removed by default in Pale Moon (there is an add-on that can add the feature back though)
  3. The Find bar in Pale Moon is per-window and not per-tab, so all occurrences of "vim.rootWindow.gBrowser.getFindBar()" have to be replaced with "vim.rootWindow.gFindBar"

I was going to try the version in the develop branch, but I decided to check 0.5.17 out first. In it, however, the problem was that it simply didn't work after the modifications above. After some poking in the code (I'm a developer, but I've never written a browser extension, nor anything in JavaScript) and using "console.log", it turned out that the problem starts in the keydown event handler in "events.js". Pressing a key bound to a command is not recognized, because you've switched to using KeyboardEvent.key, which works in Firefox, but in Pale Moon, it evaluates to "MozPrintableKey" when typing printable keys. The 0.5.14 version used KeyboardEvent.keyCode and that worked well.

Here is the "console.log" output of what happens when you press the "j" key and print some of the event properties out:

In Firefox:
"event = [object Object]"
"event.key = j"
"event.code = undefined"
"event.keyCode = undefined"

In Pale Moon:
"event = [object XrayWrapper [object KeyboardEvent]]"
"event.key = MozPrintableKey"
"event.code = undefined"
"event.keyCode = 74"

If you decide to make a Pale Moon version of VimFx and have any questions, don't hesitate to ask them in the Pale Moon forum: http://forum.palemoon.org/. For reference, the Pale Moon repository is https://github.com/MoonchildProductions/Pale-Moon

@lydell
Copy link
Collaborator

lydell commented Jun 3, 2015

Sorry, this won’t happen. Feel free to maintain a fork if you feel like it—we could even link to it if it’s well maintained.

@lydell lydell closed this as completed Jun 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants