Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Hey, don't blame me...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Hey, don't blame me...
Authored by: Thom on Jan 17, '06 04:31:00PM

...I voted for Kodos! Er, wait, nevermind.

Did the version you came up with, look something like what I posted over here?

// 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;
}

I also spent a lot of time poring through the technical documentation for firefox, exploring in the DOM inspector, and so forth, and that's what I came up with. Then I posted it to the mozillazine and Dorando, the author of keyconfig, pointed out the second argument to the method. Heh.



[ Reply to This | # ]
Hey, don't blame me...
Authored by: n8gray on Jan 18, '06 02:11:30PM
Did the version you came up with, look something like what I posted over here?

No, it was much worse. I wish I still had it around so I could post it for your amusement. I didn't know about the advanceSelectedTab method so I was first manually walking the array of tabs to find one that was == to the current tab, then changing focus to tab (i+1)%length. I don't know jack about javascript or Firefox, so I was pretty happy to have made it that far!

[ Reply to This | # ]