[Pkg-mozext-commits] [greasemonkey] 04/43: [WIP] Remove aForce from withAllMenuCommandsForWindowId
David Prévot
taffit at moszumanska.debian.org
Sun Feb 22 21:56:09 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository greasemonkey.
commit 3d0afc2fba6a7c42d07929c80c88b51bf078c901
Author: Ventero <ventero at ventero.de>
Date: Sat Sep 27 05:21:17 2014 +0200
[WIP] Remove aForce from withAllMenuCommandsForWindowId
---
content/menucommander.js | 24 +++++++-----------------
1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/content/menucommander.js b/content/menucommander.js
index dfd1d9d..726a1d0 100644
--- a/content/menucommander.js
+++ b/content/menucommander.js
@@ -105,24 +105,14 @@ GM_MenuCommander.onPopupShowing = function(aMenuPopup) {
};
GM_MenuCommander.withAllMenuCommandsForWindowId = function(
- aContentWindowId, aCallback, aForce) {
+ aContentWindowId, aCallback) {
+ if (!aContentWindowId) return;
- var targetWindowIds = null;
- if (aForce) {
- targetWindowIds = Object.keys(GM_MenuCommander.menuCommands);
- } else if (aContentWindowId) {
- targetWindowIds = [aContentWindowId];
- } else {
- return;
- }
-
- for each (var windowId in targetWindowIds) {
- var commands = GM_MenuCommander.menuCommands[windowId];
- if (!commands) return;
+ var commands = GM_MenuCommander.menuCommands[aContentWindowId];
+ if (!commands) return;
- var l = commands.length - 1;
- for (var i = l, command = null; command = commands[i]; i--) {
- aCallback(i, command);
- }
+ var l = commands.length - 1;
+ for (var i = l, command = null; command = commands[i]; i--) {
+ aCallback(i, command);
}
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git
More information about the Pkg-mozext-commits
mailing list