/Find Bar/

The extensions listed here are no longer supported, these pages are just maintained for historical reasons!

/Find Bar/ is a new extension for Firefox that is still a little bit in progress. I’ve always believed that one of the best features of Firefox is it’s quick find bar. I probably use it about 20 times a day, if not more. But it has to be said its a fairly simple beast. When it comes to more powerful searches you’re just out of luck. This extension adds a whole new dimension to the find bar, regular expressions. The regular expressions are implemented using the JavaScript engine so check the JavaScript RegExp syntax for the full details.

Turns out to be a reasonably popular request in the Firefox support channels where I hide out and I’d generally discounted it as an extremely difficult task. But then I like a challenge and when I suddenly stumbled across an idea that might make it fairly simple this actually all came together quite easily, though as I’ve said it’s not actually complete yet, for that I need your help.

Questions

There are a few questions that I haven’t yet figured out about how the find bar should actually operate. My plan is that anyone who wants to can test out the alpha version, see where it does what they expect and where it doesn’t do what they expect and let me know so I can answer a few of these things:

  • Whitespace. HTML is made up a lot of this, most of it is ignored by the browser and not visible on the page. At the moment this extension doesn’t ignore anything so you may find there are more spaces between words than you expected. Should I err on the side of accuracy as it is now, or collapse all whitespace?
  • Block content. The standard find bar wont find searches that span blocks (paragraphs in human terms). This extension does, which while potentially useful also causes some issues. One thought is to make each paragraph like a line then you can use line breaks to match paragraphs as you might expect.

Unfortunately I am no longer planning on updating my extensions. Short of some kind of critical security issue it is unlikely this extension will receive any updates in the future.

75 thoughts on “/Find Bar/

  1. Working well for me and very useful; boggles the mind why this is not a standard feature.

    Block content: I would submit that HTML block elements be treated as "lines." The current implementation appears to be based on the layout of the source code. In other words, if paragraphs, list items, etc. end, then begin on a new line, the search does not span the block. However, if paragraphs, lists, etc are all on a single line (as on your /Find Bar/ Web page) then the search spans the block elements.

  2. Hmmm… doesn’t work for me on Firefox 2.0.0.2 in Ubuntu Edgy Eft.
    It installs fine, but doesn’t do anything.
    Too bad. Sounds like exactly the kind of thing I’ve been searching for.

  3. Excellent idea.

    But it crashed my browser. 2.0.0.2 on Windows XP Home.

    It froze the browser after typing in ‘^s’, only displayed ^.

  4. This is a great add-on — very useful. Why don’t you post it on Mozilla’s list of Firefox add-ons?

  5. Love this addon. Came accross it the other day have been using it since.

    Actually used your extension to start ‘playing’ around with my very first addon for Firefox, have extracted the code into it’s own addon now, but it was your xul and js that started me off, and helped me learn stuff.

    Rest of what i learnt came from MDC site, but i’m the sort of person who learns from doing / seeing, that’s where your simple addon came in

    Double thanks from me :)

  6. Works brilliantly. Actually, far better than I expected.
    Kudos!

    I think you should point out that one has to choose the "Regular Expression" checkbox to enable it :)

  7. This is fantastic, I’ve been wanting RE support in the find bar for longer than I can remember.

    Thanks!

  8. I’m having the same results as Boy on OSX 10.4.9. Might this be a windows-only extension? That would be disappointing.

  9. I love this extension, I’ve been looking for something like it for… well 5 minutes, then I Google’d for it :-)

    Regarding whitespace, I’d make a single ‘ ‘ match all consecutive whitespaces except r and n (not sure how those are used on web pages) by default, that is [ ftvu00A0u2028u2029]+
    If you ever add Options to /Find bar/, I’d let the user pick among
    ‘ ‘ single spaces matches
    * a single space / /
    * all consecutive whitespace but newlines /[ ftvu00A0u2028u2029]+/
    * all consecutive whitespace /s+/

    After some test with newlines, I’ve found that
    <p>this is a test</p>
    <p>this is a test</p>
    renders to ‘this is a testn this is a test’, that is with an extra ‘ ‘ after the newline – but I have no quick idea about this :-(

    Keep up the good work!

  10. Very nice addon, it would be nice if you could add the option in the view source option. When I watch sources, I like to be able for use regular expression to find stuff rapidly.

  11. Hi!

    Thanks for this useful extension which I use at home on Windows XP.

    However, when trying to install this at work the following is shown instead of the install button. At work I am running Solaris 9. There are other extensions that work for this system, so it might be that you need to compile for Solaris? Could it be done? :-)

    https://addons.mozilla.org/en-US/firefox/addon/6534
    /Find Bar/ is not available for Unknown.

    Best Regards,
    Daniel

  12. i think i triggered something, by accident

    1) press / (or ctrl+f) to bring the find bar, search anything, then close it with esc
    2) go to another tab, press / (or ctrl+f) to bring the find bar:
    click “highlight all”
    cpu goes 99% and i can only kill it

    in step 1, you have to search something, “highlight all” is grayed out till you do
    in step 2, do NOT search anything, just click “highlight all” directly (which was an accident)

    it’s reproducible and does not happen while /Find Bar/ is disabled

    it’s a trivial problem but accident happens

  13. How do you search for a whole word? I tried using the regular expressions but it didn’t work for me. Also even not not using regular expressions, when I try to find a word, it only displays the first occurance of the word, and not the remaining ones when I press Next.

  14. I found a fun bug that causes DOM corruption.

    Repro:
    0) Have Find Toolbar Tweaks installed (this may not be necessary) http://homepage3.nifty.com/georgei/extension/ftt_en.html
    1) Goto https://wiki.secondlife.com/w/index.php?title=Special:Wantedcategories&limit=500&offset=0
    2) Open the find bar and check “Regular Expression” checkbox
    3) Search for “^LSL[^/]*$” but without the quotes
    4) Click the Highlight all button
    5) Observe that the list numbers all increase.

    Theory:
    I believe this happens because the Highlight All captures the “li” element and tries to wrap the element in a span tag. At which point Firefox tries to fix the error by automatically nesting the span tag in a new “li” element.

  15. after upgrading from firefox 3.5 beta to 3.0 rc, find (Ctrl+F) didn’t work anymore. disabling this extension made it work again, so the bug must here. would be cool if you could have a look into this. nice extension.

    @Anon: searching for whole words: “\bWORD\b”.

  16. Hi. When enabled on FF3.0b5, this plugin will break normal searching (even when “Use regular expressions” is not ticked).

    I’m not sure what causes this, but it would be great if you could look into it. The plugin’s really useful when trawling through data on the internet (and it works :P)

    Regards, Stu

  17. I apologise, I forgot to mention in the previous post I’m running Ubuntu Hardy. Also it would be great if the bug tracker didn’t require registration. I would like to file a report, but don’t really want to sign up to yet another site.

  18. I installed this addon in Firefox 3 Beta 5 (I’m on Ubuntu 8.04) and while it does work, after having it open for a couple minutes it crashes firefox. Is there a way I could get debugging info for you to help diagnose this issue?

  19. Great add-on! I second being able to use its functionality in the View->Page Source window.

  20. I just came across this add-on today. I been looking for a find command that would keep the command open on the bottom. I thought I would try out your add-on and this is what happen.

    I have firefox version 3.0 and I could not get it to work at all. I had to disable the add-on to get find to work again.

    I will try back later.

  21. It is a great extension!

    Just a small bug:
    If you start writting this regexp “^hello”, Firefox will hung up just after the first character.
    (at least with my keyboard, where I need to press the ‘^’ key and then the “space” key to just produce “^”.)

    Regards,
    DAvid

  22. My answer to the whitespace question:

    You can use the quickfind bar when viewing the source code (View -> Page Source), so I would use collapsed whitespace search in the presented page and exact whitespace search on the source page. I believe it is better to have a user’s search term match up with what they’re looking at, which is another form of accuracy. I believe this better honors the *intent* of the search.

  23. Would love to have the ability to use regex in my search box. Unfortunately ctrl-F no longer does anything when I have this extension enabled. I just got the new firefox 3.0 yesterday. Will bookmark and check back later for any updates. Thanks!

  24. I just upgraded to 3.0 and it hosed this addon. As a matter of fact, the normal FF find bar would not even appear, even if the addon was disabled. Once I uninstalled, the normal FF find bar came back. Too bad because this was a very useful app, and thanks to the author for putting it out here for us. I’ll check back later to see if it’s updated for 3.0.

  25. Whitespaces: Ideally, this should be a configurable option that the user can choose. But if I had to choose one, I’d say collapse the spaces.

    Block content: Again, this would best be a user-choosable option, but in general, I like the idea of spanning blocks.

  26. I think open office has the ability to use regexp when searching a document. I do not have open office installed currently so I can not say how oo handles whitespaces. It might be interesting/useful to try out the regexp function there anyway.

    Waiting for a 3.0 compliant version of this useful plugin!

    Thanks! I am very grateful for this plugin.

  27. Using FF3.
    Same problem as above, installed, didn’t work, ctrl-F, no find box.
    Then I disabled and restarted–and Find box appears, with Normal, RegExp and Migemo on the right.
    So try disabling it.

  28. Does anyone know when a fix for ff3 will be out? ( Currently the problem Ray described makes it unusable )

  29. Here’s something that *should* fix everyone’s problems (it fixed mine, happy happy joy joy).

    If, at any time, you’re unfamiliar with what I am talking about, you probably don’t need this extension as badly as you think.

    [[[obligatory disclaimer denying liability & suggesting you go cry to mommy if you broke'd all your toys]]]

    Copy these instructions into notepad.

    Close Firefox. ;-)

    Open up the file located at “PROFILE_DIR/extensions/findbarrx@blueprintit.co.uk/chrome/content/findbarrx.xml” in notepad (or whatever). Before editing it, save a backup just in case things go awry.

    Scroll down to about line 59 — you should see something like this:

    Insert a new line after that bit and paste the following:

    Then, scroll to line 107 (or something like that) and find the line that contains “”, which closes the tag that was started up above on line 59. Insert a new line just before the “” line and paste the following:

    This just closes the tag we’ve created — makes everything nice and neat (and not broken).

    File->Save. Open Firefox. Give it a whirl.

    If this fix does not work for you, you *may* need to open up about:config and set “nglayout.debug.disable_xul_cache” to true and “nglayout.debug.disable_xul_fastload” to true. Restart Firefox after making these changes.

    If it *still* doesn’t work, close Firefox and find the files XUL.mfl and XPC.mfl ; if you have them, they would be located in the same directory as your Firefox internet cache directory. Rename them to XUL.mfl.bak and XPC.mfl.bak, respectively. If you can’t find either of these files, well… it looks like you got the short end of the lucky stick in life — your best options is to wait for an official release to come out.

    Hope this helps! If not, well… hope it helps the developer find out why the extension doesn’t work in Firefox 3!

  30. Apologies, all — the textbox ate the meat ‘n’ potatoes of the fix I posted. Here it is again, with proper HTML entity codes. Hopefully it’ll work:

    —– snip —–

    Here’s something that *should* fix everyone’s problems (it fixed mine, happy happy joy joy).

    If, at any time, you’re unfamiliar with what I am talking about, you probably don’t need this extension as badly as you think.

    [[[obligatory disclaimer denying liability & suggesting you go cry to mommy if you broke'd all your toys]]]

    Copy these instructions into notepad.

    Close Firefox. ;-)

    Open up the file located at “PROFILE_DIR/extensions/findbarrx@blueprintit.co.uk/chrome/content/findbarrx.xml” in notepad (or whatever). Before editing it, save a backup just in case things go awry.

    Scroll down to about line 59 — you should see something like this:

    <content align=”center” hidden=”true”>

    Insert a new line after that bit and paste the following:

    <xul:hbox anonid=”findbar-container” class=”findbar-container” flex=”1″ align=”center”>

    Then, scroll to line 107 (or something like that) and find the line that contains “</content>”, which closes the tag that was started up above on line 59. Insert a new line just before the “</content>” line and paste the following:

    </xul:hbox>

    This just closes the <xul:hbox> tag we’ve created — makes everything nice and neat (and not broken).

    File->Save. Open Firefox. Give it a whirl.

    If this fix does not work for you, you *may* need to open up about:config and set “nglayout.debug.disable_xul_cache” to true and “nglayout.debug.disable_xul_fastload” to true. Restart Firefox after making these changes.

    If it *still* doesn’t work, close Firefox and find the files XUL.mfl and XPC.mfl ; if you have them, they would be located in the same directory as your Firefox internet cache directory. Rename them to XUL.mfl.bak and XPC.mfl.bak, respectively. If you can’t find either of these files, well… it looks like you got the short end of the lucky stick in life — your best options is to wait for an official release to come out.

    Hope this helps! If not, well… hope it helps the developer find out why the extension doesn’t work in Firefox 3!

  31. Jason’s fix below worked for me. Thanks Jason!

    I didn’t need to change the XUL caching behavior — just editing findbarrx.xml fixed it for me. But WordPress has mangled his instructions pretty badly, so I fixed them up and put them here:

    http://pastebin.com/f6da88405

    The important part is to make sure all of the quotation marks are straight quotes (ASCII 0×22) and not “fancy” quotes.

    Hope that helps anyone who was scratching their head a bit about this. Thanks again, Jason.

  32. Thank you very much for this excellent plug-in. My thanks also go to Jason (for making this work beautifully with FF3.0) and loner (for making Jason’s instructions copy’n-pastable). Arigatou gozaimasu.

  33. Thanks, eyebex. I will give it a test. Why has the original author stopped working on this? I wish we could post download links on the official Mozilla page for this add-on.

  34. Thanks eyebex. Your fix works brilliantly (once you learn how to load an xpi file into Firefox**). I was beginning to despair with the latest Firefox 3.0.1. We are most appreciative of your work.

    This is a great tool Oymoronical. Congratulations and well done. Keep up the good work.

    ** Open Firefox window and Windows Explorer. Then just drag the xpi file into the Firefox window and it installs. You need to re-enable /Find bar/ as well.

  35. The new version 1.0.1 also contains the fix, so I’m removing my download below. Please download the official version above instead.

  36. I love the extension. It is the same functionality that could be accessed through about:config in earlier versions of Firefox, with one addition and a couple of deletions.

    The addition is “Regular Expression.” Please tell me what that means and when I would or would not want to check the box.

    The two deletions are these. One, I would like to be able to use this add-on in place of what is included in 3.0.1, so that when I type, the whole add-on bar comes up instead of just the find box. Is there a way for me to do that? Two, is there a way to set “Highlight all” as the default?

  37. Excellent! Excellent! Had been waiting for it. I hadn’t given up on you , you know!

  38. I have a problem: before installing /Find Bar/, I could search in the articles of wikipedia also when I was editing them (i.e. in the edit box), and now it’s not possible (as it happened with older versions of Firefox). Any solution?

  39. Hi – fabulous, but one deal-breaker for me is that it doesn’t seem to be able to search inside of text fields. This works with the regular find bar (in FF3) but stops working with the extension. I mention it in case you ever decide to to a new version. :-)

  40. “Highlight all” doesn’t work properly after installing this on 3.1 beta 2; it’s *almost* backwards, but also doesn’t highlight properly when toggling “regular expression”

  41. Just a little note I installed the find add-on

    https://addons.mozilla.org/firefox/addon/6534

    but it seems to have corrupted my firefox “update” function. I reinstalled FF and it was fixed, installed the add-on again, same thing happened. It’s a shame, I really could have used that “or” functionality.

    Screen shots are here

    http://support.mozilla.com/tiki-download_forum_attachment.php?locale=en-US&attId=6110
    http://support.mozilla.com/tiki-download_forum_attachment.php?locale=en-US&attId=6112

    Thanks

  42. hi, it’s work find except for an issue:
    findbar don’t search into textarea and other form items, standard firefox search bar do it

    but thanks anyway :)

  43. What a fantastic idea!

    Unfortunately, it didn’t work on my firefox. It crashes every time with FF cpu percentages of almost 100%.

    Hope you update it one more time :-)

  44. This is elegant and ingenious. I didn’t even know I needed it until it was the only way I’d find what I was looking for. Once I downloaded and used it, I realized that I frequently do the pre-processing for this before I use the search. This is so much easier, and now I use it for all searches.

    Thanks and hope you decide to keep working on this or other extensions. Good job. :-)

  45. It would be so awesome if this plugin was ported to FF 3.5. This was the perfect combination for my crazedlist searches. I was able to search every regional craiglist site for cars and use regex to find the cars for (19)?7[123]

  46. Hey everyone, I’m the same Jason who posted the FF3 fix below, and I’m hoping to do something similar to update this extension to FF3.5. However, it’s *weird* this time. It’s not just a matter of the extension disabling the regular Find bar. This time, it appears to fail to switch to regex find mode. The worst part is that it doesn’t dump any debug info (that I can see, admittedly) when it fails. Also, just as befuddling, it sometimes *does* work properly — most often, after a re-install of the extension.

    If the author (or anyone) could give us a hint, a nudge, anything that could help us find out why it’s not working in FF3.5 anymore, it’d be great! A debug version of the .dll? The source for the .dll? A version of the JS code with debugging output? Anything? I know the author has distanced himself from his extensions, and that’s his right and his choice, but as a last favor to the community it would sure be swell!

    Perhaps, as a result, someone would be able to take the reins of the extension and develop it independently. Just sayin’.

    • Jason,

      Thanks for your willingness to work on this. I would offer to help, but I’m a PERL guy and don’t have a clue how to develop FF extensions. Have you thought about asking for help on the Mozilla Dev Forums? I hope somebody helps you out because I must have this extension!

      Peace,

      Steve

  47. Hi, i just wanted to say that is used this extension a lot and i’d be very happy to see an update for 3.5.!

      • I’m sad. One of my favourite extensions is uselsess with ff 3.5 :-(
        I would be happy, if anyone could adapt this gorgeous feature.

  48. One possible alternative to this extension is the XUL/Migemo extension. It’s not as good, though. The regex syntax is either broken, or it’s using a completely different regex language: “foo.*” can match nothing on the same page that “foo” matches many times (on some pages: other pages it behaves as you’d expect); “\bfoo\b” matches “barfoobar”; etc.

    However it does seem to be the only extension I can find at the moment which supports regex find in 3.5.

    • http://drop.by/user-javascript-regexp-find is a GreaseMonkey script that attempts regex find, but it has even more problems, and looks as user friendly as a double-ended fryingpan.

      There was also “FindFox”, but it doesn’t support FF > 2.0 and anyway, the line in the description that says “Please avoid using ‘*’ in your regular expression.” kinda scares me off that one.

      • It bears mentioning that, while the javascript/xul/etc. sources are available in the xpi (of course), the extension also makes use of compiled, platform-specific dynamic libraries (.dll, .so, .dylib). These are located in ./platform/*, and their source code is *not* provided in the xpi.

        I’m assuming that the OP is referring to these files in his request, since maintaning the extension would undoubtedly be impossible without the source for these components.

        On a related note, it would be incredibly sporting if mossop (aka Mr. Townsend) if the source repository were made available to the new maintainer(s). Anyone who’s maintained a pre-existing software project knows that it’s far easier to determine where you’re going if you can see how you got there.

  49. The install link with text:

    ” /Find Bar/ Install v ”

    doesn’t work. It simply points back to this “http://www.oxymoronical.com/web/firefox/FindBarRX”
    webpage. I can’t even find /Find Bar/ on https://addons.mozilla.org/en-US/firefox using the
    addon search by name. I love /Find Bar/ and would sorely miss the regular expression
    and highlight features. Please point me to a location from which I can directly download
    the xpi file.

    • right click on the above Install link and Save link as, you’ll be prompt to save the *.xpi file.

  50. Here is my workaround:
    download the v1.01 and open with 7-zip. Right click on install.rdf file and then Edit (or press F4). Change all maxVersion to maxVersion=”3.*”. Save and exit. You can install the *.xpi now.

  51. Also, if you use the MR Tech Toolkit add-on, you have the option of overriding the maxVersion param without having to edit the xpi file at all.

Comments are closed.