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
GM_registerMenuCommand - errors vs. invalid link, frames; GM_getResourceURL - no resource with name #2434
Closed
janekptacijarabaci
wants to merge
2,295
commits into
greasemonkey:master
from
janekptacijarabaci:fix
Closed
GM_registerMenuCommand - errors vs. invalid link, frames; GM_getResourceURL - no resource with name #2434
janekptacijarabaci
wants to merge
2,295
commits into
greasemonkey:master
from
janekptacijarabaci:fix
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Content can see resource: but not chrome: URLs. And chrome: works fine for JSM import. Fixes greasemonkey#1787
JsDev is incapable of understanding it. See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=326842
Start much smaller, allow the user to change the size, remember the size. Fixes greasemonkey#2191
1) Store menu commmands' data in a private closure, *in the sandbox*. 2) To list registered commands: a) Parent/chrome passes a message to child/frame. b) Frame passes an event (visible to content) into the sandbox. c) Sandbox passes private-closure-scoped commands' data to a frame-scoped callback. d) Frame passes data up to parent as a message. e) Chrome uses this data to populate the menu, at popupshowing time. 3) To run a command: a) User clicks on the menu item. b) Chrome sends a message to the frame. c) Frame sends an event to the sandbox. d) Sandbox finds the related registered command, calls its callback. Phew! But no references to documents/windows/browsers are ever stored anywhere, so they can't possibly leak anymore. Along the way, simplify frame script by moving object methods to standalone functions; less state, less binding to fix "this" references. The ContentObserver object is now really just there for `.observe()`. TODO: Restore "delayed execution" feature, the only other usage of the (removed) ScriptRunner structure. Refs: greasemonkey#2200 Refs: greasemonkey#2067
Just in case, so the command object cannot be changed.
Prevent event propagation when appropriate. Add a random suffix to the event names, so content cannot predict the event name, and thus cannot listen for it.
I.e. from an old Sync record which did not specify user matches. Default to nothing. Fixes greasemonkey#2188
It's too late. IDs are set. Changing them would be a giant mess.
Ad greasemonkey#2107, greasemonkey#2234 The suggestion (for example).
This reverts commit 5a094c5.
By optimizing for speed over reliability. Generally by moving things from disk to memory. Fixes greasemonkey#2197
Un-translated English for new strings, at least.
… no resource with name
janekptacijarabaci
changed the title
GM_registerMenuCommand - errors vs. invalid link; GM_getResourceURL - no resource with name
GM_registerMenuCommand - errors vs. invalid link; GM_getResourceURL - no resource with name; GM_registerMenuCommand - frames
May 24, 2017
janekptacijarabaci
changed the title
GM_registerMenuCommand - errors vs. invalid link; GM_getResourceURL - no resource with name; GM_registerMenuCommand - frames
GM_registerMenuCommand - errors vs. invalid link, frames; GM_getResourceURL - no resource with name
May 24, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1)
GM_registerMenuCommand
For example:
Firefox throws an errors in the Error Console:
The link leads to a meaningless line in source file.
I propose to add a translation.
2)
GM_getResourceURL
The "No resource with name" - this does not work.
3)
GM_registerMenuCommand
Ad #2509
Frames - it won't add any menu commands.
The suggestion (for example).
It is necessary to test all options!