Last active
March 1, 2019 18:11
-
-
Save ChristianKurz/839241c63dc70a454cae68ce000fb985 to your computer and use it in GitHub Desktop.
Firefox 57+: scroll through tabs with mouse wheel, adapted from here: https://forum.manjaro.org/t/howto-enable-tab-switching-in-firefox-using-mouse-wheel/39954
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE bindings> | |
<bindings xmlns="http://www.mozilla.org/xbl"> | |
<binding id="tabs-scroll" extends="chrome://global/content/bindings/scrollbox.xml#scrollbox"> | |
<handlers> | |
<handler event="wheel"><![CDATA[ | |
// Preserve original behaviour if meta (Windows) key is held | |
if (event.metaKey) return; | |
currentindex = gBrowser.tabContainer.selectedIndex; | |
if (event.deltaY < 0 && currentindex != 0) { | |
gBrowser.tabContainer.advanceSelectedTab(-1, true); | |
} | |
if (event.deltaY > 0 && currentindex + 1 != gBrowser.tabs.length) { | |
gBrowser.tabContainer.advanceSelectedTab(1, true); | |
} | |
event.stopPropagation(); | |
event.preventDefault(); | |
]]></handler> | |
</handlers> | |
</binding> | |
</bindings> |
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
.tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox { | |
/* Place bindings.xml in the same folder as userChrome.css */ | |
-moz-binding: url("bindings.xml#tabs-scroll") !important; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now without wrap around