play-with icon indicating copy to clipboard operation
play-with copied to clipboard

[REQUEST] Chrome support

Open Poilaucul opened this issue 7 years ago • 4 comments

Hello,

Chrome support possible?

Poilaucul avatar Oct 18 '18 18:10 Poilaucul

Hi,

I haven't developed for Chrome yet, but I'm not rejecting the request. I might have a look how much effort it is when I've got some spare time, but don't hold your breath :wink:

grmat avatar Oct 21 '18 01:10 grmat

Any news?

pilaco avatar Feb 03 '20 17:02 pilaco

No

grmat avatar Feb 03 '20 18:02 grmat

Hello,

i ported the current version to chrome. You can find the changes here.

Things I've done(see https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Chrome_incompatibilities for differences between ff and chrome):

  • Converting .svg icons to png b/c chrome doesn't support svg, changing paths in manifest.json
  • background.js: renaming all browser namespace occurrences to chrome
  • play.js: also renaming namespace to chrome, removing the promise handling, adding callback which chrome needs. Therefore error handling is done in the onGot method.

In this state the addon could be used in ff aswell, but some warnings will be thrown by firefox due to unknown manifest keys(don't recommend).

Possible solutions to merge both addons:

  • check in which browser the addon is executed, use the correct namespace OR
  • create CI/CD job which refactors the current code and "builds" a chrome version OR
  • have both versions parallel in one repo, bugfixes/features have to be done in both

Side note: To publish an addon to chrome store you need a developer account which costs 5$.

Conclusion:

I'm not going to "port" future releases. I don't like Chrome. Just wanted to show how it is done, maybe somebody wants to contribute. I also dislike to have 2 different version just because browser manufactures are unwilling to implement one standard(see here and here). Also I'm not willing to pay 5$ ;)

magictucura avatar Mar 23 '20 17:03 magictucura