brandon1024 / find

A find-in-page extension for Chrome and Firefox that supports regular expressions.
https://chrome.google.com/webstore/detail/find%2B-regex-find-in-page/fddffkdncgkkdjobemgbpojjeffmmofb
GNU General Public License v3.0
419 stars 54 forks source link

Search silently fails on about pages (such as about:addons) #373

Open alphanumeric-characters-and-hyphens opened 2 years ago

alphanumeric-characters-and-hyphens commented 2 years ago

I assume Mozilla prevents the addon from working on such pages, which is fine, but the tooltip still pops up as if it's searching normally and just can't find anything. I often forget this and erroneously conclude that the search terms don't appear on the page. It would be wonderful if the tooltip warned you or just didn't pop up on such pages.

BrianHenryIE commented 2 years ago

It fails on the moz-extension://... Find+ User Guide page which opens when the extension is installed in Firefox. Since it didn't work there, I assumed it wasn't working at all. At least, that page should have a notice at the top explaining the limitation.

brandon1024 commented 2 years ago

There are a handful of pages this extension won't work on. about:addons is one of them, but the extension won't work on any browser-specific page (like the chrome web store, the page source tab, and likely a few others too). Chrome and Firefox disallow extensions in these contexts for security reasons.

We do have some special handling in https://github.com/brandon1024/find/blob/develop/popup/js/browser-action.js#L60 that will show a warning message if you're in the chrome web store pages, but I haven't implemented similar functionality for firefox (I don't use firefox). If any of you are interested in submitting a PR, I'd happily merge.