Stardown icon indicating copy to clipboard operation
Stardown copied to clipboard

Automatically check for updates

Open wheelercj opened this issue 1 year ago • 2 comments

When Stardown is installed with Git or a zip file, users are not notified when updates are available. (They can turn on notifications for releases in the GitHub repository, but many won't want to.)

Stardown should have an option to check for updates once per day if installed with Git or zip.

const info = browser.management.getSelf();

if (info.installType === 'development') {
    // check for updates once per day if enabled
}

wheelercj avatar Nov 16 '24 19:11 wheelercj

AMO is short for addons.mozilla.org, the Firefox extension store.

When an add-on is listed on AMO, Firefox automatically updates installed copies when a new version is listed on AMO. To enable Firefox to automatically update self-distributed add-ons, you need to include the URL where Firefox can find updates in the add-on manifest's update_url key. If the add-on does not have an update URL to check, Firefox will check AMO for a listed update. If a listed update with a higher version number is available, Firefox will distribute that version to users who have installed the self-distributed file.

Distributing an add-on yourself | Firefox Extension Workshop

I'm not sure we should use the update_url property because users that install without using AMO might not want automatic updates.

wheelercj avatar Nov 25 '24 01:11 wheelercj

Idle and shutdown

Normally, Chrome terminates a service worker when one of the following conditions is met:

  • After 30 seconds of inactivity. Receiving an event or calling an extension API resets this timer.
  • When a single request, such as an event or API call, takes longer than 5 minutes to process.
  • When a fetch() response takes more than 30 seconds to arrive.

Events and calls to extension APIs reset these timers, and if the service worker has gone dormant, an incoming event will revive them. Nevertheless, you should design your service worker to be resilient against unexpected termination.

To optimize the resource consumption of your extension, avoid keeping your service worker alive indefinitely if possible. Test your extensions to ensure that you're not doing this unintentionally.

The extension service worker lifecycle  |  Chrome Extensions  |  Chrome for Developers (2025/3/29)

wheelercj avatar Mar 29 '25 23:03 wheelercj