Deprecated: Assigning the return value of new by reference is deprecated in /home/martingo/martingordon.org/blog/wp-settings.php on line 512

Deprecated: Assigning the return value of new by reference is deprecated in /home/martingo/martingordon.org/blog/wp-settings.php on line 527

Deprecated: Assigning the return value of new by reference is deprecated in /home/martingo/martingordon.org/blog/wp-settings.php on line 534

Deprecated: Assigning the return value of new by reference is deprecated in /home/martingo/martingordon.org/blog/wp-settings.php on line 570

Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/martingo/martingordon.org/blog/wp-includes/classes.php on line 1199

Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/martingo/martingordon.org/blog/wp-includes/classes.php on line 1199

Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el(&$output) in /home/martingo/martingordon.org/blog/wp-includes/classes.php on line 1199

Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el(&$output) in /home/martingo/martingordon.org/blog/wp-includes/classes.php on line 1199

Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el(&$output) in /home/martingo/martingordon.org/blog/wp-includes/classes.php on line 1244

Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/martingo/martingordon.org/blog/wp-includes/classes.php on line 1391

Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/martingo/martingordon.org/blog/wp-includes/classes.php on line 1391

Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el(&$output) in /home/martingo/martingordon.org/blog/wp-includes/classes.php on line 1391

Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el(&$output) in /home/martingo/martingordon.org/blog/wp-includes/classes.php on line 1391

Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el(&$output) in /home/martingo/martingordon.org/blog/wp-includes/classes.php on line 1442

Strict Standards: Redefining already defined constructor for class wpdb in /home/martingo/martingordon.org/blog/wp-includes/wp-db.php on line 306

Deprecated: Assigning the return value of new by reference is deprecated in /home/martingo/martingordon.org/blog/wp-includes/cache.php on line 103

Strict Standards: Redefining already defined constructor for class WP_Object_Cache in /home/martingo/martingordon.org/blog/wp-includes/cache.php on line 431

Deprecated: Assigning the return value of new by reference is deprecated in /home/martingo/martingordon.org/blog/wp-includes/query.php on line 61

Deprecated: Assigning the return value of new by reference is deprecated in /home/martingo/martingordon.org/blog/wp-includes/theme.php on line 1109

Strict Standards: Declaration of Walker_Comment::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/martingo/martingordon.org/blog/wp-includes/comment-template.php on line 1266

Strict Standards: Declaration of Walker_Comment::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/martingo/martingordon.org/blog/wp-includes/comment-template.php on line 1266

Strict Standards: Declaration of Walker_Comment::start_el() should be compatible with Walker::start_el(&$output) in /home/martingo/martingordon.org/blog/wp-includes/comment-template.php on line 1266

Strict Standards: Declaration of Walker_Comment::end_el() should be compatible with Walker::end_el(&$output) in /home/martingo/martingordon.org/blog/wp-includes/comment-template.php on line 1266

Strict Standards: Redefining already defined constructor for class WP_Dependencies in /home/martingo/martingordon.org/blog/wp-includes/class.wp-dependencies.php on line 31

Strict Standards: Redefining already defined constructor for class WP_Http in /home/martingo/martingordon.org/blog/wp-includes/http.php on line 61

Strict Standards: Non-static method unfancy_quote::init() should not be called statically in /home/martingo/martingordon.org/blog/wp-content/plugins/sem-unfancy-quote/sem-unfancy-quote.php on line 55
<br /> <b>Strict Standards</b>: call_user_func_array() expects parameter 1 to be a valid callback, non-static method unfancy_quote::strip_quotes() should not be called statically in <b>/home/martingo/martingordon.org/blog/wp-includes/plugin.php</b> on line <b>166</b><br /> Martin Gordon's Blog <br /> <b>Strict Standards</b>: call_user_func_array() expects parameter 1 to be a valid callback, non-static method unfancy_quote::strip_quotes() should not be called statically in <b>/home/martingo/martingordon.org/blog/wp-includes/plugin.php</b> on line <b>166</b><br /> / Firefox 1.5 and Tabbed Browsing on OS X

Firefox 1.5 and Tabbed Browsing on OS X

Firefox 1.5, released yesterday, breaks the Cmd+Tab/Cmd+Shift+Tab shortcut for switching tabs that I had grown to love so much and was one of the primary reasons I've stuck with Firefox over Camino and Safari. Instead, Firefox now uses Cmd+Option+Left/Right, which requires use two hands and some hunting around.

Enter keyconfig, an extension designed to allow users to add and modify keyboard shortcuts. A comment on the extention page details how to add next/previous tab functionality to keyconfig using gBrowser.mTabContainer.advanceSelectedTab(±1); Unfortunately, that command didn't allow for looping through tabs, so I modified the code a bit to allow for that functionality. Here it is:

Next Tab

if (gBrowser.mCurrentTab.nextSibling)
     gBrowser.mTabContainer.advanceSelectedTab(1);
else
     gBrowser.mTabContainer.selectedIndex = 0;

Previous Tab
if (gBrowser.mCurrentTab.previousSibling)
     gBrowser.mTabContainer.advanceSelectedTab(-1);
else
     while (gBrowser.mCurrentTab.nextSibling)
          gBrowser.mTabContainer.selectedIndex++;

Technorati Tags: , , , , , , , , , , ,

Comments (2) left to “Firefox 1.5 and Tabbed Browsing on OS X”

  1. Thom Brooks wrote:

    Your 'next tab' code and mine were pretty much word for word, but here's a slight improvement on the 'previous' code. HTH.

    // previous tab, cycle to last one if at beginning
    if(gBrowser.mCurrentTab.previousSibling)
    {
    gBrowser.mTabContainer.advanceSelectedTab(-1);
    }
    else
    {
    // call method to go to tab:
    gBrowser.mTabContainer.selectedIndex = gBrowser.mTabContainer.childNodes.length-1;
    }

    Thom Brooks
    Chicago, IL

  2. Thom Brooks wrote:

    Darnit, there's an even simpler solution:

    gBrowser.mTabContainer.advanceSelectedTab(1,true);
    gBrowser.mTabContainer.advanceSelectedTab(-1,true);

    The second argument to the function, which defaults to false, specifies that you want to loop back and forth when you cycle through tabs.

    Still, it was a fun programming exercise and taught me about using the DOM Inspector to look at xbl bindings. Firefox is a pretty cool app.