alexherbo2 / krabby

A keyboard interface to the web, inspired by Kakoune
https://krabby.netlify.app
The Unlicense
311 stars 20 forks source link

Open in new tab doesn't seem to work in firefox #15

Closed Clyybber closed 4 years ago

Clyybber commented 4 years ago

Adding

krabby.modes.modal.map('Link', ['Control', 'Enter'], () => alert('Tchou'), 'Open link in new tab', 'Open links')

to the config.js works; a popup with Tchou appears. Its not a missing default either since adding

krabby.modes.modal.map('Link', ['Control', 'Enter'], () => krabby.commands.openInNewTab(krabby.selections), 'Open link in new tab', 'Open links')

doesn't work, which seems to suggest that krabby.commands.openInNewTab somehow fails.

I'm on Firefox 73.0.1

alexherbo2 commented 4 years ago

I cannot reproduce. I have Firefox 73.0.1 too.

Can you try the temporary install method to see the debug?

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension

Clyybber commented 4 years ago

Sure, I managed to get an error just by starting firefox from the terminal too. It appears right when pressing Ctrl-Enter in link mode:

JavaScript error: moz-extension://9f9f6358-bd92-4bcc-a24b-fe153bc107f0/packages/krabby/extension/extension.js, line 30: Error: Attempt to postMessage on disconnected port

Not sure if that suffices, I can do the temporary install method if you need more info

alexherbo2 commented 4 years ago

It is because it cannot connect to the extension.

The extension Krabby uses for opening tabs, etc. is chrome-commands.

Clyybber commented 4 years ago

Oh, yeah I don't have that installed. Should I make a PR to add it to the dependencies section?

alexherbo2 commented 4 years ago

This extension is installed in ~/.config/krabby/extensions/commands/target/firefox/package.zip when you do make install from the Krabby repository or make update from your config, but it needs to be added to your browser like you did for Krabby.

Clyybber commented 4 years ago

Heh, sorry for the noise here.