Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring of Browser Action and API Polling #266

Merged
merged 3 commits into from
Jul 9, 2017
Merged

Conversation

lidel
Copy link
Member

@lidel lidel commented Jul 9, 2017

We had multiple issues with the way Alarms are implemented in Firefox and there are limitations under minimal interval in Chromium-based browsers.

This PR removes use of browser.alarms.* for triggering and signaling API status changes within background script and between background script and Browser Action popup.

IPFS API polling is now handled by simple Interval, and communication with Browser Action popup uses browser.runtime.* APIs.

This PR fixes #218, #259 and #243.

lidel added 3 commits July 8, 2017 21:46
This replaces alarm-based updates with message-based signalling
based on `browser.runtime.connect` API

Chrome does not support Alarm intervals smaller than one minute,
so we will replace all of them with this new type of signalling.
This is yet another piece of #218 (and #259) efforts.

This commit also closes #243 by hiding broken actions in 'incognito' mode.
It was replaced with browser.storage.onChanged listener some time ago
This fixes 1-minute-refresh lag in Chrome-based browsers (#218)
and enables us to skip updates when browser is idle for more than 5 minutes.

It should also close #259, as it no longer relies on Alerts for status
updates.
@lidel lidel added the kind/maintenance Work required to avoid breaking changes or harm to project's status quo label Jul 9, 2017
@lidel lidel added this to the v2.0.0 milestone Jul 9, 2017
@lidel lidel self-assigned this Jul 9, 2017
@lidel lidel merged commit 52e6073 into master Jul 9, 2017
@lidel lidel deleted the browser-action-port branch July 9, 2017 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/maintenance Work required to avoid breaking changes or harm to project's status quo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for chromium-based browsers
1 participant