Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

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

arantius opened this issue Sep 23, 2011 · 2 comments
Milestone

Comments

@arantius
Copy link
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
Copy link
Collaborator Author

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
Copy link
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 pushed a commit that referenced this issue Sep 26, 2011
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants