Menu commands for all scripts show at file:/// URLs #1424

arantius opened this Issue Sep 23, 2011 · 2 comments


None yet

2 participants



  1. None of the scripts run on file:/// urls
  2. All the User Script Commands from other http:// and/or https:// tabs get merged in file:/// tab menu. See image :

Script I tested in above image :
. This script creates menu with location as label for every page.


In case it disappears: the linked image shows two different scripts, running individually on different URLs each appropriately displaying their own (and not the other) registered menu command. Then a file:/// URL on which no script runs, but offering both menu commands.


This branch contains a simple fix for this issue. I've also modified gmIGreasemonkeyService#withAllMenuCommandsForWindowId to use a third parameter to indicate execution of the callback for each command, instead of relying on the first parameter being null (to prevent future, similar bugs).

Edit: To reproduce the initial issue, make sure either greasemonkey.fileIsGreasable is set to false, or use an about:-URI such as about:addons.

@arantius arantius added a commit that closed this issue Sep 26, 2011
@Ventero Ventero Add missing null check in GM_menuCommander.onPopupShowing.
This prevents the popup from showing all registered menu commands in windows with file://- and about:-URIs.
Fixes #1424
@arantius arantius closed this in d3ce489 Sep 26, 2011
@arantius arantius added a commit that referenced this issue Sep 26, 2011
@Ventero Ventero Add "force" parameter to withAllMenuCommandsForWindowId.
Instead of using windowId == null to indicate callback execution for every command, use an additional parameter.
Refs #1424
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment