DescriptionNoissue - Open options.html directly on Firefox for Android
Firefox requires the url parameter passed to tabs.query to be in a specific format:
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Match_patterns
When this code runs on Firefox for Android, it always sets runtime.lastError to something like "'options.html' is not a valid match pattern" and the returned tabs object is always null (even if options.html is open in a tab).
Since it's guaranteed to fail, and since there's no other way to query for the tab that has the options page open ("moz-extension://" is not supported), there's no point in running that code at all. Instead, we open options.html directly. This simplifies the code a bit.
Patch Set 1 #
Total comments: 1
Patch Set 2 : Don't check for tabs being null #MessagesTotal messages: 4
|