Mach-II/Mach-II-Framework — Issue #26: Document reloading application via a keyboard shortcut
Author: mpwoodward
Created: 2012-03-01 01:08:42+00:00
State: open
Labels: documentation

(Moved from http://trac.mach-ii.com/machii/ticket/788)

Getting tired of manually moving around browser tabs to refresh, I
wrote a tiny KeyConfig (http://kb.mozillazine.org/Keyconfig_extension)
script for firefox which reloads the left-most tab, which is where I
leave the application /?reinit page.

`var curTabIndex = gBrowser.tabContainer.selectedIndex;`
`gBrowser.selectTabAtIndex(0, event);`
`gBrowser.reloadTab(gBrowser.mCurrentTab);`
`gBrowser.selectTabAtIndex(curTabIndex, event);`

So I can keep my FF tab set to tab 2 (my work-in-progress tab) and hit
SHIFT-CTRL-1 to reload the first tab, and and CTRL-R or F5 to reload
the current tab without having to manually select a tab. I could even
add sleep timer to auto-reload the current tab after a couple of
seconds of app reload time.