chrome-next-step-for-trello icon indicating copy to clipboard operation
chrome-next-step-for-trello copied to clipboard

Feature: add Firefox support

Open adrienjoly opened this issue 7 years ago • 13 comments

  • [x] try to run the user script with greasemonkey
  • [ ] make it a real firefox add-on
  • [ ] publish to firefox add-on store

adrienjoly avatar Nov 12 '16 14:11 adrienjoly

Status: Works on Firefox, with Greasemonkey!

  1. Install Greasemonkey in Firefox
  2. Download the raw version of next-step-for-trello.user.js
  3. Drag & drop the next-step-for-trello.user.js file into Firefox
  4. Restart Firefox

Watch me figuring it out: Making a Chrome Extension: Next Step for Trello - Livecoding Session #4

adrienjoly avatar Nov 16 '16 15:11 adrienjoly

WIP on "make it a real firefox add-on", using greasemonkey script compiler:

  • trial 1, with keeping the userscript as is => error: using setInterval not on a window object
  • trial 2, with require('timer') => error: require is not defined
  • trial 3, with nsITimer => error: Components.classes is not defined:
   //setInterval(theLoop, interval);
  var timer = Components.classes["@mozilla.org/timer;1"].createInstance(Components.interfaces.nsITimer);
  const TYPE_REPEATING_PRECISE_CAN_SKIP = Components.interfaces.nsITimer.TYPE_REPEATING_PRECISE_CAN_SKIP;
  timer.init({ observe: theLoop }, interval, TYPE_REPEATING_PRECISE_CAN_SKIP);

=> http://stackoverflow.com/questions/21378058/why-components-classes-is-undefined

adrienjoly avatar Nov 16 '16 15:11 adrienjoly

Notes from latest livecoding session:

https://arantius.com/misc/greasemonkey/script-compiler.php
1st: d53099b4-625d-413e-acd8-a68d1d996699
2nd: 63d7f9ae-ea98-44da-a0a4-d124e55abcb3
3rd: a5426a6d-ece2-427c-a69c-27325c70dda6

max ver: 52.0

adrienjoly avatar Dec 07 '16 12:12 adrienjoly

could use that: https://github.com/EmailThis/extension-boilerplate

adrienjoly avatar Mar 15 '17 16:03 adrienjoly

according to Francisco Giordano (thru olark):

Firefox has adopted the Chrome extensions API, which means that extensions can now be portable with very little effort. I was wondering if you could take a look into it, because it would be great to be able to use the extension on Firefox. :)

adrienjoly avatar Apr 09 '17 08:04 adrienjoly

Indeed: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Porting_a_Google_Chrome_extension

adrienjoly avatar Apr 09 '17 08:04 adrienjoly

Chrome Store Foxified could be a simple solution to install Next Step for Trello on Firefox.

Anyone tried it?

adrienjoly avatar Jun 15 '17 09:06 adrienjoly

Or https://developer.mozilla.org/Add-ons/WebExtensions

adrienjoly avatar Sep 13 '17 13:09 adrienjoly

according to Extension Compatibility Test for Firefox, "Your extension is compatible with Firefox"

=> next steps:

  1. testing in firefox
  2. publishing

adrienjoly avatar Sep 13 '17 13:09 adrienjoly

⚠️ when trying to install extension in firefox nightly: "There was an error during installation: Extension is invalid"

adrienjoly avatar Sep 13 '17 14:09 adrienjoly

I just made sure the extension can work as a user-script, hence making it work on Firefox, thanks to Tampermonkey. (successor to Greasemonkey)

  • Video how-to: https://www.youtube.com/watch?v=DWr8mRku-Lc
  • Step-by-step instructions: https://github.com/adrienjoly/chrome-next-step-for-trello/blob/master/dist/next-step-for-trello.user.js#L11
  • A link to these instructions was added below the "Install on Google Chrome" button, at https://adrienjoly.com/chrome-next-step-for-trello/

adrienjoly avatar Apr 26 '20 15:04 adrienjoly

I also submitted a version of the extension to Mozilla/Firefox add-ons: https://addons.mozilla.org/en-US/developers/addon/nextstepfortrello/edit (pending validation)

Note: even though the .crx file generated by Chrome was valid according to https://www.extensiontest.com, it was seen as "invalid" (or corrupt) when uploading as-is to https://addons.mozilla.org/en-US/developers/.

=> I removed the include_globs, exclude_matches and exclude_globs properties from the manifest (see https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts#Matching_URL_patterns), created a fresh .zip file from the contents of the dist/ directory, and then re-uploaded it successfully. (pending review)

=> Let's wait for it to appear on:

  • https://addons.mozilla.org/en-US/firefox/search/?q=Next%20Step%20For%20Trello
  • my dev profile: https://addons.mozilla.org/en-US/firefox/user/12656985/

... otherwise, I can try to follow these instructions: https://extensionworkshop.com/documentation/develop/porting-a-google-chrome-extension/

adrienjoly avatar Apr 26 '20 16:04 adrienjoly

Update: I received the following email, even though the extension is still not published in the store:

Your add-on, Next Step For Trello, has passed our automatic tests. Version 1.19.1 is now signed and ready for you to download at https://addons.mozilla.org/developers/addon/750372/versions . Note that you need to be logged in as a developer of the add-on before downloading

adrienjoly avatar Apr 26 '20 16:04 adrienjoly