Permalink
Browse files

Reverse menu command order.

Since .withAllMenuCommandsForWindowId() gives us the items in reverse order (in case we remove them), add each item as we get it to the top instead.

Fixes #1347
  • Loading branch information...
1 parent a281c6e commit d58e50c20ec28c91a6a5cfd22ad7fc527a934a59 @arantius committed Apr 27, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 content/menucommander.js
View
@@ -21,7 +21,9 @@ GM_MenuCommander.onPopupShowing = function(aMenuPopup) {
GM_windowId(gBrowser.contentWindow),
function(index, command) {
if (command.frozen) return;
- aMenuPopup.appendChild(GM_MenuCommander.createMenuItem(command));
+ aMenuPopup.insertBefore(
+ GM_MenuCommander.createMenuItem(command),
+ aMenuPopup.firstChild);
haveCommands = true;
});
aMenuPopup.parentNode.disabled = !haveCommands;

0 comments on commit d58e50c

Please sign in to comment.