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

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

Comments

Projects
None yet
2 participants
@arantius
Collaborator

arantius commented Sep 23, 2011

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

This comment has been minimized.

Show comment
Hide comment
@arantius

arantius Sep 23, 2011

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.

Collaborator

arantius commented Sep 23, 2011

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

This comment has been minimized.

Show comment
Hide comment
@Ventero

Ventero Sep 23, 2011

Contributor

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.

Contributor

Ventero commented Sep 23, 2011

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 in d3ce489 Sep 26, 2011

arantius added a commit that referenced this issue Sep 26, 2011

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