[development] Running SteemPlus natively on Firefox

in #utopian-io6 years ago

Repository

https://github.com/stoodkev/SteemPlus

Bug Fixes

  • What was the issue(s)?

SeeemPlus doesn't run natively on Firefox and I like to discover and install it directly from Firefox Add-ons site with extra checks that Mozilla imposes on such extensions.

I decided to check compatibility of uploaded Chrome extension 2.20.0.1 with Firefox and went to official https://www.extensiontest.com/ site from Mozilla. It requires .crx file for testing, and I had to use this hack to get SteemPlus .crx from Chrome Web Store. I also filled issue with Mozilla to support extracting .crx from Chrome Web Store automatically.

Uploading .crx for SteemPlus 2.20.0.1 failed the check.

This prevents extension from being accepted to Firefox Addons website.

  • What was the solution?

Luckily, there was only 1 compatibility issue.

The solution was to figure out what chrome.tabs.getSelected method does and find a replacement. The result is now merged and SteemPlus 2.20.0.3 is marked as compatible.

https://github.com/stoodkev/SteemPlus/pull/146

  • What's next?

Work still needs to be done to package and upload SteemPlus to Firefox Addons and it is already possible to use from Firefox natively it by cloning extension repository and pointing Firefox to manifest.json from about:debugging --> Load Temporary Add-On menu.

This post was written with SteemPlus extension running in Firefox natively without Chrome Store Foxified.

GitHub Account

https://github.com/abitrolly

Sort:  

Thank you very much for the contribution. I am sure this will benefit the Firefox users. From the code you have touched, I can see slightly a few code duplication, which can be refactored by extracting that to a function.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you for your review, @justyy!

So far this week you've reviewed 4 contributions. Keep up the good work!

I haven't got much time to rewrite the whole block, and because I am not JavaScript or WebExtensions expert, I decided to concentrate on making the bug fix clear without additional refactoring.

The particular thing what is needed for refactoring is understanding the difference between lastFocusedWindow and currentWindow flags when querying for tabs. Chrome current window docs mention that currentWindow is where the code is currently executing. I understand that when I click extension button on the toolbar, the code is executed in the window with the toolbar. Then I don't understand why lastFocusedWindowis being used.

Hey @abitrolly
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Great job!
Foxified as always be a pain to deal with, please contact me on Discord.

Trying Discord right now. There are so many things going on that I can not be responsive more than I am here or on GitHub. Usually I am logged in Freenode IRC, but that doesn't guarantee anything. :)

Hi @abitrolly! We are @steem-ua, a new Steem dApp, computing UserAuthority for all accounts on Steem. We are currently in test modus upvoting quality Utopian-io contributions! Nice work!

Congratulations @abitrolly! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

Award for the total payout received

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:
SteemitBoard and the Veterans on Steemit - The First Community Badge.

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Congratulations @abitrolly! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.17
TRX 0.16
JST 0.029
BTC 75263.74
ETH 2718.66
USDT 1.00
SBD 2.46