Open ghost opened 3 years ago
There's an option in the Firefox version of the extension, Show in address bar on server error
, which shows the page action icon in the address bar on these status codes.
This was done because depending on the error, it is not always possible to inject a content script with a popup in the page, and the browser action can't be automatically opened either using the extension API, so this was the easiest compromise to still indicate that there's an action the user can take.
Your suggestion is great, and we could add it to progressively enhance the feature by showing a popup when the option is enabled and the tab content allows script injection, and falling back to the address bar icon if the popup cannot be shown.
That Firefox address bar feature is pretty cool. It seems like Chrome removed that a while ago, though.
I'm guessing that chrome.browserAction.setIcon
wouldn't work either in that case? Still, any indication (even if it doesn't work on all pages) would be a nice addition.
I think the issue was that a pageAction (used for the address bar icon) and browserAction icon could not be shown at the same time in Chrome, it has returned an error. We can use a popup on all platforms when the page content allows it, and fall back to a page action in browsers that support showing both types of actions at the same time, or update the browser action icon as a last resort.
This isn't a big deal, but it would be nice to have an option to automatically display a popup with archive options when you arrive at a 404 page or similar. I could see myself forgetting about this extension and giving up on a broken page otherwise. Plus, it would just be a little quicker and more convenient. Here's what I'm imagining: