Posts Tagged ‘Firefox’

Searchable tab switching in Firefox 3.6

As an emacs user, I’ve found iswitchb (interactive-switch-buffers) to be a huge time saver. Basically, to switch files (buffers) you enter a typically byzantine key combination and then type to search through your open files – as less and less files match your search, the choices narrow down, and you can choose between them. This ends up being way faster than switching with a mouse even in tabbed editors, and I’ve managed to set up a similar thing in Eclipse/Aptana. But until recently I didn’t have the same functionality for switching tabs in Firefox.

The good news is that Firefox 3.6 has this feature built in, though it takes a bit of work to enable. Apparently they’ve been trying to get this feature into Firefox since 3.0, but there’s been a lot of different opinions, so even though they finally shipped it with 3.6, it isn’t on by default. You can turn it on by going to about:config (just type that right into your address bar), then searching for “ctrlTab”. Double-click browser.ctrlTab.previews to turn it to “true”. Now, when you hit Ctrl-Tab, you’ll get a tab switcher that looks a bit like the default Windows Alt-Tab window switcher (though with a much lighter glass effect that honestly looks pretty bad compared to Windows’ Alt-Tab). On other platforms you’ll get a similarly system-integrated look. Unfortunately this popup isn’t exactly what we’re looking for – it doesn’t show all your tabs and you can’t search! However, you can navigate down to “show all X tabs” at the bottom and you get a search box and a list of every tab. That’s a real pain to do every time you want to switch tabs, though. Fortunately, there’s a solution. Instead of hitting Ctrl-Tab, use Ctrl-Shift-Tab, and you’ll start out right at the big tab switcher with search. From here you can type to narrow down your selection and hit Enter to choose your tab. I wish there was a preference to make this full search show up when you hit Ctrl-Tab, but it doesn’t look like there is.

Firefox Ctrl-Shift-Tab tab switcher
Switching between tabs (man, that glass effect is a mess)

Visual issues aside, I wish every program with a tab-oriented UI had a feature like this to make their app faster to use for keyboard users. While we’re at it, Windows and OSX should add search to their built-in window switchers – it could really help when I have a lot of windows open and don’t want to reach for the mouse.

Note: There are a couple extensions for Google Chrome that theoretically give a similar searchable tab switcher, but of the few I tried, none of them could appear with a keyboard shortcut – you had to click an icon on the toolbar, which seems to defeat the point. Apparently the Chrome Extensions API has known problems with keyboard shortcuts, so maybe things will get better soon.

JSONView 0.4 with content negotiation

JSONView 0.4 was just approved on addons.mozilla.org. This one is mostly a bugfix release from 0.3, but I couldn’t let it go out without one new feature, so I finally added support for content negotation. This means that you can go to the new JSONView options dialog (in the Addons menu) and enable sending the “application/json” content type with your HTTP Accept header. Some applications (like some Ruby on Rails websites) are set up to return JSON if you ask for it via the HTTP Accept header, and XML or HTML otherwise. This means thay you can now specify a preference for JSON, which should help when you’re in that situation. I specifically made sure it works with CouchDB, which is an exiting document-based database with a JSON API. Before this option, CouchDB would return plain text to browsers, but now you can make it send JSON that’ll be nicely formatted by JSONView. Note that the option to modify the HTTP Accept header isn’t on by default because many people won’t need it, and it has the potential to screw up some websites that don’t expect browsers to ask for JSON. That said, I’m sure this will be helpful in a bunch of situations.

JSONView Options

On the bugfix side, I fixed the issue I mentioned in my post about JSONView 0.3 where values that were 0 or false wouldn’t show up at all as a result of some overzealous error-checking. I also hunted down an infuriating bug where JSON documents would sometimes report as invalid when Firebug was on. This took a while to track down, but apparently Firebug slows down the loading of the document enough to mess with how I was reading a stream (and I had to be careful not to re-trigger an earlier bug that could cause Firefox on OSX to crash.) Anyway, it’s fixed now, and everybody should see more reliable document rendering, Firebug or not. For those living on the edge, JSONView is also marked as compatible up to Firefox 3.7a1pre, so you should have no trouble installing it on Minefield or the upcoming Firefox 3.6 alpha.

One thing that might stand out is that the new options dialog might not be localized for your language. JSONView’s localizations are handled by the generous volunteers at Babelzilla, which is great for me, but not as great when I want to rush out a release with important bugfixes. In this case I chose to ship 0.4 before all the new localizations had arrived, but I’ll add them all in again for the next release once the translators have caught up.

So grab JSONView 0.4 from addons.mozilla.org, or just update your extensions if you’ve already got it installed. As usual, feel free to send me feedback as comments on this post, and file bugs and feature requests at Google Code.

Updates to JSONView, XBList, and TopProcess

I’ve finally gotten around to doing some maintenance updates on three of my most-used bits of software (JSONView, XBList, and TopProcess), all in the last couple weeks. Now that they’re all approved and live, I thought I’d summarize what’s changed.

JSONView 0.3

JSONView 0.3 is now available at addons.mozilla.org. This fixes an error that was showing up when really large JSON files were being displayed, and adds a feature that displays empty arrays and object on one line instead of on two (and doesn’t display the expand/collapse button for them). I also put in some preliminary support for JSONP, based on a patch submitted by Gabriel Barros. The catch is that it only works with content served with the “application/json” MIME type, which is actually not the correct MIME type for JSONP – it should be “text/javascript” or another JavaScript type. Unfortunately I haven’t been able to figure out how to get Firefox to let me handle “text/javascript” the way I do with “application/json” – it seems to be special-cased or something. If any Firefox gurus are reading and know a solution, please let me know! I was holding onto this release for a while hoping to fix that, but I decided that releasing something was better than nothing, so it’s out there and you can play with it. You can see an example JSONP response with the callback highlighted here. I did notice a bug with the 0.3 release right after it was approved – if a value is 0 or false, it shows up as blank. I’ll have that bug fixed with the next release, which should be very soon. It’s great to see that JSONView has become so popular, with over 50,000 downloads and about 12,000 regular users.

XBList 3.2.4

Halo 3: ODST was released a couple weeks ago, and Bungie redesigned their site a bit to include ODST info in your Service Record. This included changing the pages just enough that XBList got confused trying to figure out emblems for people who had never played Halo, and started showing the wrong emblems for those people (only if you prefer Halo emblems to Xbox emblems, which isn’t the default). Not a huge bug, but I took the opportunity to clean up a bunch of stuff in XBList and put out a little release. In addition to the Halo emblem fix, I fixed a bug where your settings could get corrupted and you wouldn’t be able to start XBList. I also cleaned up the menus and settings, consolidating the Halo links into one item, and removing the option to choose a custom notification sound or turn off debug logging. The debug log is much easier to get to if you’re having trouble – previously I had people dig through their Application Data folders for the log, but now there’s an item in the Help menu that opens the debug log directly. Paired with some much more detailed logging, I should be able to fix future problems much more easily. I also changed the system tray icon to bring XBList to the front on a single click rather than a double click, since that feels much more natural in Windows 7. Lastly (and probably not too importantly for most people), I’m storing emblems in your local Windows profile now, instead of the roaming profile. For the few people who use XBList and have roaming profiles enabled, this should save you some sync time. Anyway, you should have been prompted to update when I pushed the update two weeks ago, but if you haven’t gotten it yet you should download and install it now. I still have plans for a major overhaul of XBList, but it’s low on my list of priorities – XBList is still pretty popular, but not as much as it used to be, with maybe 5,000 active users.

TopProcess 1.4

This last update has been a long time coming. Ever since I installed Internet Explorer 8, the TopProcess sidebar gadget has been randomly crashing. I’m not sure what changed in Internet Explorer to make it screw up every so often, but it does. However, it only crashes after running for a few days, so for months I’ve been tweaking the code a bit, then waiting until it crashes, then tweaking some more, rinse, repeat. I’ve finally nailed it down to the point where crashes are very rare, and then I added some code that automatically resets the gadget when it crashes. So you should never see it mess up again. There is also a gadget log file in the gadget’s install directory that I’m using to store errors, so it should be easier to troubleshoot in the future. Lastly, Jean-Pierre van Riel contributed a patch that added IO tracking to TopProcess, so there is now a third way to view your processes. This view shows you the total IO usage (combined bytes in and out, per second) which seems to cover both disk and network access. Get the update from me or from Windows Live Gallery and be sure to rate the gadget. I’m excited to see that it’s been downloaded over 100,000 times from WLG (plus who knows how many downloads from my site).

JSONView 0.2 adds support for opening local .json files

Just a quick update on JSONView – I’ve submitted version 0.2 to addons.mozilla.org. This new version doesn’t have a lot of changes, but it adds some new translations (Hungarian, Bulgarian, German, and some Turkish), and you can now open “.json” files saved on your computer, enabling offline JSON viewing. This new version is also compatible with the latest Firefox 3.5 betas.

Of course, the extension must be reviewed before this new version can be released from the sandbox, but if you want to try it out you can download version 0.2 from the sandbox. Hopefully it’ll be approved soon and will show up on the main extension listing. Please give it a look and rate and review the extension on addons.mozilla.org.

I’ll be out of the US on vacation until next month, but after that I intend to do some more work on the feature backlog for JSONView, as well some updates to other projects. Remember you can vote on features or file new ones at the Google Code issue tracker for JSONView.

JSONView Updated to 0.1b3

Today I uploaded a new version of JSONView to addons.mozilla.org. I’m sticking with the wimpy version number for now, but I think JSONView has been proving itself out in the wild. One major bug was uncovered that caused JSON documents larger than 8KB to render incorrectly, and that’s fixed in this new version. I’ve also added three new translations of the extension (French, Dutch, and Czech) courtesy of the folks at BabelZilla.org – if you want to help out you can check out the available translations and add yours. Lastly, the extension is now compatible with Firefox 3.1b3. I’ve been trying to keep things tested on the beta browsers within a day or two of their release. If you have an older version of the extension you’ll need to go back to AMO and install it again – automatic updates won’t work until JSONView is out of the sandbox.

JSONView has gotten a bit of coverage on the blogs, too, which I’ve enjoyed. It made it onto the front page of Delicious and reddit programming, and Ars Technica wrote an article in their journals. Also, I was interviewed on OpenSource Release Feed, which was fun. I’m glad that people are getting to use the extension and find it helpful. Hopefully when it gets released from the sandbox it’ll get even broader exposure.