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

Add name="crx" attribute for URL input in crxviewer.html #99

Closed
myfonj opened this issue Jul 27, 2020 · 4 comments
Closed

Add name="crx" attribute for URL input in crxviewer.html #99

myfonj opened this issue Jul 27, 2020 · 4 comments

Comments

@myfonj
Copy link

myfonj commented Jul 27, 2020

so that user action "Add a Keyword for this Search" worked as expected in Firefox. (Presumably would help Chrome understand it better as well.)

<input type="url" placeholder="URL of Chrome extension, Firefox addon or zip file">

@Rob--W
Copy link
Owner

Rob--W commented Jul 27, 2020

What's the use case for keyword registration of this tool?

Are you using the online demo or the extension? I recommend to use the extension over the online version, because the extension is faster and has less limitations (e.g. it can be used to view the source of extensions/zip files that are behind cookies). The online version relies on a proxy, which is slower and sometimes unavailable.

@myfonj
Copy link
Author

myfonj commented Jul 27, 2020

Are you using the online demo or the extension?

The excellent "online demo" https://robwu.nl/crxviewer/. It worked so far so well for me that I don't fell a need to install extension. Moreover, it produces instant shareable URL of the top level extension folder, what I see as a nice feature.

(Naturally, if usage of the extension is preferred due dangers of increased costs of running the web app on your side, I'll install the extension and forget the app immediately, just tell.)

What's the use case for keyword registration of this tool?

Like any other keyword search: fast navigation and URL placeholder expansion. In this case it would just save user from copypasting URL into input, so they could invoke the on relevant page instead.

This change would just ensure that keyword search bookmark created from context menu on the input field would match actual functionality of the app: "details" page that expects the ?crx= parameter. Since the input currently has no name the actual outcome of bookmark created this way is https://robwu.nl/crxviewer/?=%s what doesn't work. (Yes, manually fixing it is trivial, but ideally should not be necessary.)


Actual use case of his certain keyword search, if it isn't clear already:

Creation

  1. context menu in "URL" field at https://robwu.nl/crxviewer/
  2. pick "Add a Keyword for this Search" option
  3. type for instance crx into "Keyword" field and Save
  4. (so the bookmarked URL reads https://robwu.nl/crxviewer/?crx=%s)

Usage

  1. While on some AMO or Web Store page (e.g. https://addons.mozilla.org/en-US/firefox/addon/crxviewer/)
  2. focus URL bar
  3. write crx (space) before URL and navigate
  4. (Resulting URL is https://robwu.nl/crxviewer/?crx=https%3A%2F%2Faddons.mozilla.org%2Fen-US%2Ffirefox%2Faddon%2Fcrxviewer%2F)

So the Usage outcome is quite identical to CRX > View Source command of installed extension, but without extension

@Rob--W
Copy link
Owner

Rob--W commented Jul 27, 2020

Well to be fair I also sometimes just type my website because it takes less effort than trying to open the extension page.

Naturally, if usage of the extension is preferred due dangers of increased costs of running the web app on your side, I'll install the extension and forget the app immediately, just tell.

Regardless of the cost of serving the web app, I would still recommend to use the extension because the user-perceived performance is better. I use CORS Anyhwere as a proxy (which I also created), which is quite popular, to the extent that it is sometimes down due to the high usage. Using the extension allows the browser to make a direct request, which increases the speed of loading. In the next update of crxviewer, I'll remove the use of the proxy for Firefox add-ons, because the proxy is no longer needed due to the fix for https://bugzilla.mozilla.org/show_bug.cgi?id=1620084. Other sources of extensions will still need the proxy when the online web app is used, though.

Like any other keyword search: fast navigation and URL placeholder expansion. In this case it would just save user from copypasting URL into input, so they could invoke the on relevant page instead.

Sounds reasonable. And like I said, I totally understand your desire for this feature.
This can be implemented in the extension with the omnibox API:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/omnibox

And since adding an extra attribute to the HTML file isn't really a burden, I am also willing to accept a pull request that adds the attribute.

Rob--W added a commit that referenced this issue Mar 28, 2022
Rob--W added a commit that referenced this issue Mar 28, 2022
- Rely on CORS instead of work-arounds for public XPI files from AMO (#92)
- Add work-around for crx access in Brave (#91)
- Support source viewing of extensions from Microsoft Edge (#95)
- Remove web_accessible_resourced to avoid UUID leak (#100)
- Correct 0-padding of hashes (#104)
- Update jsbeautifier to v1.14.0 (#110)
- Support source viewing of extensions from Thunderbird (#111)
- Fix domain front of AMO in Firefox add-on (#115)
- Recognize CRX3 files served by addons.opera.com (#118)
- Opera only: Add work-around to access addons.opera.com (#119)
- web only: Add crx keyword to input field for keyword search (#99)
- web only: Avoid breakage of web version when an extension runs a script (#113)
- Refactor: remove unsupported declarativeWebRequest path
- Refactor: Use declarative page actions to show button.
@Rob--W
Copy link
Owner

Rob--W commented Mar 28, 2022

I've included this change in the latest version at https://robwu.nl/crxviewer/.

@Rob--W Rob--W closed this as completed Mar 28, 2022
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

2 participants