Skip to content
This repository

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

Closed
arantius opened this Issue September 23, 2011 · 2 comments

2 participants

arantius Ventero
arantius
Collaborator

From: http://groups.google.com/group/greasemonkey-dev/t/f77c1823a9a923e2?hl=en

  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 :

http://i53.tinypic.com/6r3v4z.png

Script I tested in above image : http://userscripts.org/scripts/show/111998
. This script creates menu with location as label for every page.

arantius
Collaborator

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.

Ventero Ventero referenced this issue from a commit September 23, 2011
Commit has since been removed from the repository and is no longer available.
Ventero Ventero referenced this issue from a commit September 23, 2011
Commit has since been removed from the repository and is no longer available.
Ventero

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 closed this issue from a commit September 24, 2011
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
d3ce489
arantius arantius closed this in d3ce489 September 26, 2011
arantius arantius referenced this issue from a commit September 24, 2011
Ventero Add "force" parameter to withAllMenuCommandsForWindowId.
Instead of using windowId == null to indicate callback execution for every command, use an additional parameter.
Refs #1424
72688dc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.