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

Display Web Archives popup on 404 error #24

Open
ghost opened this issue Nov 9, 2020 · 3 comments
Open

Display Web Archives popup on 404 error #24

ghost opened this issue Nov 9, 2020 · 3 comments

Comments

@ghost
Copy link

ghost commented Nov 9, 2020

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:

ArchiveMockup

@dessant
Copy link
Owner

dessant commented Nov 9, 2020

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.

Screenshot from 2020-11-09 23-05-38

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.

@ghost
Copy link
Author

ghost commented Nov 9, 2020

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.

@dessant
Copy link
Owner

dessant commented Nov 10, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant