-
-
Save mgedmin/4174803 to your computer and use it in GitHub Desktop.
Ctrl+Shift+PageUp/Down reorder tabs (try #3, this one works and seems to be in the right place) | |
https://bugzilla.mozilla.org/show_bug.cgi?id=702960 | |
diff -r d2fbc67f69f5 browser/base/content/tabbrowser.xml | |
--- a/browser/base/content/tabbrowser.xml Fri Nov 30 13:51:45 2012 +0000 | |
+++ b/browser/base/content/tabbrowser.xml Mon Dec 03 14:35:29 2012 +0200 | |
@@ -2504,6 +2504,25 @@ | |
return; | |
} | |
+ switch (aEvent.keyCode) { | |
+ case aEvent.DOM_VK_PAGE_UP: | |
+ if (aEvent.ctrlKey && aEvent.shiftKey && !aEvent.altKey && !aEvent.metaKey) { | |
+ this.moveTabBackward(); | |
+ aEvent.stopPropagation(); | |
+ aEvent.preventDefault(); | |
+ return; | |
+ } | |
+ break; | |
+ case aEvent.DOM_VK_PAGE_DOWN: | |
+ if (aEvent.ctrlKey && aEvent.shiftKey && !aEvent.altKey && !aEvent.metaKey) { | |
+ this.moveTabForward(); | |
+ aEvent.stopPropagation(); | |
+ aEvent.preventDefault(); | |
+ return; | |
+ } | |
+ break; | |
+ } | |
+ | |
if (aEvent.altKey) | |
return; | |
Credit where it's due: http://blog.yjl.im/2010/11/ctrlshiftpageup-to-move-tab-in-firefox.html hinted at the names moveTabForward/Backward
which I then found with a recursive grep. I found the place to change with a recursive grep for PAGE_DOWN
, although now I'm beginning to think it might be the wrong place to make this change.
Let's have a clickable link to the bug, shall we? https://bugzilla.mozilla.org/show_bug.cgi?id=702960
Ok, patch #2 caused the ctrl+shift+pgup/down code to be run even in places like the Preferences dialog, with errors appearing in the error console ('tabbrowser is undefined').
Patch #3 modifies tabbrowser.xml instead of tabbox.xml and (a) works, and (b) seems to be in the right place.
Continued via attachments on the original mozilla bug, and then (when it was closed as a duplicate), on https://bugzilla.mozilla.org/show_bug.cgi?id=364845
Updated to version #2, which actually works (but feels like a horrible hack).
https://developer.mozilla.org/en-US/docs/Simple_Firefox_build is a useful page and works much better -- faster builds! --than
apt-get source firefox && fakeroot debian/rules binary
.