pmalecka / shortkeys

A Firefox extension for custom keyboard shortcuts
https://addons.mozilla.org/en-US/firefox/addon/shortkeys
MIT License
11 stars 4 forks source link

Starting to publish releases for Firefox (and Opera and Edge) from the upstream repo #28

Closed crittermike closed 6 years ago

crittermike commented 6 years ago

See https://github.com/mikecrittenden/chrome-shortkeys/releases/tag/v2.2.2

I switched to a new generator which has built in support for all 4 vendors so this is easy.

THAT SAID, this doesn't seem to actually install in Firefox right now. I'll try to figure out what's up with that at some point, but if you'd like to try to debug it in the meantime, feel free. Once we get that figured out, it'll be much easier for you to deploy releases to FF (unless you want to keep building those yourself, which is of course up to you).

Also, if you get burned out on maintaining this and want me to take over control of the FF version, just give me a holler.

pmalecka commented 6 years ago

Hi Mike,

thanks for reaching out.

from the work you have done - on upgrading to the new API, and the structural changes/bugfixes - I believe we should pool our resources and try to create and maintain a single repo that would support all WebExt browsers.

I will take a look, and see if I can spot any obvious issues with FF.

crittermike commented 6 years ago

Awesome, check out https://github.com/HaNdTriX/generator-chrome-extension-kickstart/blob/master/DOCUMENTATION.md#working-with-multiple-vendors for more information here. Like, if Chrome and Firefox need slightly different manifest options or we need some code that will only run in the Firefox version, there's built-in support for that.

pmalecka commented 6 years ago

Oh, nice, that should do the trick. I'll test your version of the addon now in FF.

From what I can tell, adding the following section: "applications": { "gecko": { "id": "Shortkeys@Shortkeys.com", "strict_min_version": "47.0" } },

and putting "" to the contentscript matches (this should be the only entry there)

makes it load in FF.

also, according to the documentation, options_ui: chrome_style, should be browser_style in FF.

crittermike commented 6 years ago

@pmalecka awesome! That worked for me too. I pushed a v2.2.4 release with updated packages. https://github.com/mikecrittenden/chrome-shortkeys/releases/tag/v2.2.4

I'm also planning to rename the repo to just "shortkeys" and try to remove as many references to Chrome as possible. Any objections to that?

pmalecka commented 6 years ago

great, I'll try and take some time to re-do my changes against your master and submit a PR. I'd also like to see if there are any actions that are not yet merged to your repo.

One thing I noticed is that the commands (from manifest.json) are not configurable in FF as they are in Chrome. So that part of the functionality - we cannot advertise to FF users.

It's called shortkeys@shortkeys.com on mozilla addons (a bit unfortunate choice - I had somehow forgotten to change that before pushing to AMO) - so yeah, shortkeys will work just fine.

crittermike commented 6 years ago

Ah shoot - so I see https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/commands, but it looks like there's just no UI for that yet?

pmalecka commented 6 years ago

Exactly, and no word on whether that will ever be supported. I read somewhere that they plan to introduce a global shortcut API sometime in future.

crittermike commented 6 years ago

Gotcha, that's a shame. I suppose we can leave the code there for FF so if/when they add it then it'll be ready, but just update the docs in the meantime to say that that feature is Chrome only.

crittermike commented 6 years ago

I'm going ahead and closing this since we seem to be in good shape here now, thanks to @pmalecka - you're awesome!