22 September 2010 - 10:45Speak Words to the Location Bar

For those that already “speak words” to the location bar, you probably already know that you can find pages by their title or use multiple words to help find the exact page that you want. This is as opposed to typing in a url or a domain to first load a page to get to the page you want.

Finding a page by matching the title

To help people speak words and get to the pages even faster, I’ve written an add-on, Speak Words, that will fill in the rest of the word as you type in the location bar. Similar to how Find Suggest uses words from the current page as suggestions, this add-on will look for words that you’ve previously typed into the location bar for its dictionary.

In the example above, I’ve typed “r” and the add-on has filled in the rest of the word for “reader” and searched for that word in the location bar. I can now just press <Return> to go to that page. Just 2 key strokes, and I’m where I want to be! 🙂

Immediate suggestions for new words as you type

Because the add-on gives immediate feedback on what word it’s using, you can figure out what’s the fewest number of keys you need to press to get to the site you want. Before, I would probably type “bank” or “bugz,” but now I see that I can just type “b” and “bu” instead. Also if you do type words from a site’s domain, the add-on will also help fill in the rest of the word for you as shown above.

The suggested words are based on the adaptive learning of the location bar and previously-typed domains. So your suggestions will be different from mine, and instead it’ll show you the words that you’ll likely to type in anyway, except now you don’t need to type out the whole word.

Try out Speak Words if you’re running a recent Firefox 4 beta [mozilla.com]. It’s a restartless add-on, so you can make Firefox even snappier immediately!

Looking forwards in terms of improving search in Firefox, there’s now dictionaries for word suggestions for each type of search: search engine suggestions for the search bar, in-page words for find, and key words for history. While the actual dictionary for each might need to be tweaked, it’ll be interesting to see if the search interfaces can be combined and streamlined while still helping the user with relevant suggestions and results.

8 Comments | Tags: Add-on, AwesomeBar, Labs, Mozilla, Search

16 September 2010 - 18:55Find Suggest: Words from the Page

There’s a few main ways to do search in Firefox. You can use the location bar to search for pages that you’ve visited or bookmarked. You can use the find bar to search for words on the page that you’re currently looking at. You can use the search bar to find new pages on the internet. As I mentioned last week, I’m taking a look into ways to improve searches in Firefox as part of Mozilla Labs, so this covers all of these types of searching.

Today I’ve quickly hacked together an initial prototype that helps you find words on a page. Instead of typing letters into the find box only to end up getting a “Phrase not found” message, the find bar will now show suggestions of words that will match on the page as you type. The find bar will only let you find words that are on the page anyway, so why not use those available words to guide the user?

Suggestion of words from the current page (buttons removed to fit screenshot)

This is similar to how mobile phones will suggest words based on the letters you’ve entered so far. Except instead of showing possible words from the dictionary, the find bar will only show words from a custom dictionary.

You can try out this feature by installing Find Suggest. It’s a restartless add-on that runs on recent Firefox 4 betas [mozilla.com], so you can start playing around with it immediately.

This is a quick prototype, so you can only fill in the suggestions by clicking on them. Ideally there would be some keyboard mechanism to fill in the suggestion such as hitting <Tab> to fill in the common prefix like on the command line. But even with the limited functionality, it’s a useful guide to quickly see what words will match on the page without having to type them out.

13 Comments | Tags: Add-on, Labs, Mozilla, Search

10 September 2010 - 14:34Running Code Without Error Console

Being able to run chrome-privileged code from the Error Console has been very convenient for me to help users debug issues with Firefox or an add-on when they get stuck in some strange state. I can quickly test an idea or a snippet of code and have the user run it to track down where things are going wrong. However, there’s some issues that make it tricky to use:

  • Users get confused doing Tools -> Error Console -> Paste -> Evaluate
  • Users might not copy/paste correctly or perhaps the code got wrapped oddly
  • Javascript version seems to be 1.6, so let needs to be replaced with var, etc.
  • Scripts are heavily GCed, so modules are imported to attach objects to keep them alive
  • Everything needs to be on one line, so beware of any lines with // comments!
  • Console output is html-like and strips tags and empty output leading to confusion

One additional drawback in Firefox 4 is the Error Console is now disabled by default, so having users first go to about:config and toggling devtools.errorconsole.enabled to true is an extra step where users can get lost. (Don’t forget about the click-through warning page! ;)) Additionally, I believe enabling the Error Console requires a restart, so debugging a live instance is troublesome unless the problem is easily reproduced.

New preference to enable the Error Console (under the Tools menu)

Fortunately, Firefox 4 comes with restartless add-ons! You can just package up an add-on with two files: bootstrap.js and install.rdf, with the relevant code running from the startup() function. It’s simpler for users to try out as it looks like any other add-on install, so just point to the .xpi and click Install.

Just make sure that if you want the code to only run once, have the add-on uninstall itself after running. Otherwise it’ll be like any other add-on that runs when Firefox starts.

Code snippets to for one-time scripts and easy reloading of scripts

Another neat trick for reloading or running an updated script is having the add-on auto-enable itself when it’s disabled. I can now just make changes to the files and click Disable once from about:addons, and it’ll automatically reload itself instead of needing to click Enable. Also because now I can just edit the file and not need to copy/paste into Error Console, I can easily track my changes with revision control software. 🙂

I’ve provided the bootstrap.js and install.rdf files needed for this simple restartless add-on. From there you just need to:

  1. Delete one of the auto-uninstall or auto-enable snippets from bootstrap.js
  2. Add in the code you want to run inside startup() of bootstrap.js
  3. Package up the files into an xpi: zip restartless.xpi bootstrap.js install.rdf
  4. Distribute/install restartless.xpi

4 Comments | Tags: Add-on, Development, Mozilla

9 September 2010 - 17:04What’s in your Searchbar?

I’m looking into ways to improve how people search in Firefox. My previous contributions focused on getting useful pages to show up in the AwesomeBar when searching history, and I collected plenty of useful feedback to see what users wanted or didn’t want in the results.

I’ve written a restartless add-on that lets you see how you use the searchbar in Firefox. It scans through what you’ve previously typed into the searchbar and groups your searches by the words you’ve typed. The first set of results shows words that you frequently use across different searches, and the second set shows searches that you repeat multiple times.

If you’re running a recent Firefox 4 beta [mozilla.com], install the add-on, and it’ll open a new tab with your results (without sending that data anywhere). This is a restartless add-on that will also uninstall itself after it runs.

If you feel like sharing your results, please leave a comment or send me an email: edilee@gmail.com.

Unique and repeated search queries from my own searchbar history data

From my personal usage, the unique search queries set has many searches that I only do once to find out information on some topic like “mozilla” or “starcraft”. This contrasts with my repeated searches where I have terms like “time” or “movie”. I do make heavy use of keyword searches and smart bookmarks, but I happen to not have set any for these repeated searches probably because search engines like Google and Bing provide useful information on the results page.

Are your results like mine? Do you have a totally different search behavior? Any suggestions for how you would improve searching?

4 Comments | Tags: Add-on, AwesomeBar, Labs, Mozilla, Search