Steve Scrimpshire Posted June 1, 2004 Report Share Posted June 1, 2004 (edited) Thought y'all might find this helpful. I use the Googlebar extension in Firefox and it opens a new tab for each search. Eventually, I'll get to where I have several tabs open that I don't need. I wanted to create a new gesture that allowed me to close the other tabs besides the one I as currently viewing. This is how I accomplished it (if you use mozilla instead of mozilla-firefox, it should work the same, only the directory paths would be different): I never use the Open New Document gesture which is Down (D), so I used it. With no browser open: In /usr/lib/mozilla-firefox-0.8/chrome/mozgest/locale/en-US/mozgest: In mozgest.properties: Comment out mgB_OpenNewDocument=Open new document like this: # mgB_OpenNewDocument=Open new document Add: mgB_CloseOther=Close other tabs In /usr/lib/mozilla-firefox-0.8/chrome/mozgest/content: In defaultMappings.rdf: Remove the line that has mgB_OpenNewDocument and add: <RDF:li><RDF:Description MG:code="D" MG:function="mgB_CloseOther"/></RDF:li> In functions.rdf: Remove the line that has mgB_OpenNewDocument and add: <RDF:li><RDF:Description MG:func="mgB_CloseOther"/></RDF:li> In gestimp.js: Remove the function related to OpenNewDocument and add these two sections: function mgB_CloseOther(){ BrowserCloseOtherTabs(); resetRocker(); return "mgB_CloseOther"; } and function BrowserCloseOtherTabs(){ var browser = getBrowser(); browser.removeAllTabsBut(browser.mCurrentTab); return "BrowserCloseOtherTabs"; } Open Firefox. Click Tools -> Options -> Extensions -> Mouse Gestures -> Options -> Edit Mappings -> Browser Check to see if "D Close Other Tabs" is listed under Active Mappings. If it is, you are done. If it's not, then Highlight it under Inactive Mappings and click 'Add'. Edited June 1, 2004 by Steve Scrimpshire Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted June 2, 2004 Author Report Share Posted June 2, 2004 Only ten views??? I can't be the only one that likes this. :P Quote Link to comment Share on other sites More sharing options...
tyme Posted June 2, 2004 Report Share Posted June 2, 2004 I'm using All-in-One Gestures 0.11.1 and it already has one for "Close all other tabs" ;) mind you, if i wanted to use it I'd need to change it's setup since right now it's set to: right-left-down-up-right which i'll never get right... Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted June 2, 2004 Author Report Share Posted June 2, 2004 Hmmmm...I had no idea that All-In-One Gestures actually incorporated Mozgest (or that Close Other Tabs was included). Go figure. Quote Link to comment Share on other sites More sharing options...
tyme Posted June 2, 2004 Report Share Posted June 2, 2004 Hmmmm...I had no idea that All-In-One Gestures actually incorporated Mozgest (or that Close Other Tabs was included). Go figure. I didn't either, until I checked while reading this tip and thinking "that would be great!" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.