This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* To enable changing tabs by using the mouse wheel, | |
* enter this code into the browser console (Ctrl+Shift+J) */ | |
var onTabWheel = function(ev) { | |
if (ev.deltaMode == 1 /* DOM_DELTA_LINE */) { | |
var idx = gBrowser.tabContainer.getIndexOfItem(gBrowser.selectedTab); | |
var direction = ev.deltaY > 0 ? 1 : -1; | |
gBrowser.selectTabAtIndex((idx + direction) % gBrowser.tabs.length); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#MaxHotkeysPerInterval 200 | |
shouldFire() | |
{ | |
CoordMode, Mouse, Screen | |
MouseGetPos, mouseX, mouseY, MouseHoverWin | |
WinGetPos, winX, winY, width, height, ahk_id %MouseHoverWin% | |
WinGetClass, class, ahk_id %MouseHoverWin% | |
if (mouseY - winY >= 0 && mouseY - winY < 40 && class == "MozillaWindowClass") { | |
return 1 | |
} |