gautamkrishnar / motrix-webextension

A browser extension for the Motrix Download Manager
GNU General Public License v3.0
1.21k stars 97 forks source link

RPC Key Warning does not Display in some browsers (e.g. Background.js can only prompt a Console warning in Firefox) #107

Closed AyoungDukie closed 1 year ago

AyoungDukie commented 1 year ago

Some user confusion about the extension not working seems to be around the requirement for using and RPC Secret/Key.

Currently the extension will try to warn a user if they do not set a key by using alert in the background.js script. This works for Chrome (and likely other Chromium browser): image

However Firefox security settings block alerts from background windows/activity, so the only notice is in the browser console: image

Looking into this, some recommendations are to use notifications instead (which will be supported in all browsers). Usually the downside is having to request a new permission, but notifications are already being used so it will be a non-issue. Secondarily, a notification will be less front-and-center, and could theoretically be missed.

Conversely some folks have had success injecting the alert into the active tab, but this has some limitations.

There's a decent write-up on SO about this.

gautamkrishnar commented 1 year ago

@AyoungDukie thanks for the suggestion, i will work on this. Firefox is always weird to work with.