[Greasemonkey] New GM_ function request.
christopher.lck at gmail.com
Tue Aug 23 23:32:09 EDT 2005
I think you should write your own extension which can have its own chrome.
I think writing an extension is more difficult than writing a GM script,
but that doesn't mean that GM should extend into an extension-substitute.
What does the One-and-only (Aaron) think?
On 23/08/05, Adam Judson <adamsplugins at gmail.com> wrote:
> On 23/08/05, Nikolas Coukouma <lists at atrus.org> wrote:
> > You'll get a security error if you use window.open . If you didn't you
> > would have access to a chrome window and be able to twiddle it:
> > var chromeWin = window.open("chrome://browser/content/pref/pref.xul",
> > "Preferences", "");
> > var chromeDoc = chromeWin.document;
> > // Insert evil here
> I'm not sure I understand this.
> I know I get a security error if I try to insert
> using GM, that's the problem I'm trying to solve.
> I don't get a security error using the code I suggested. Though I should
> that I'm not passing the "chrome" flag to openDialog.
> > Your suggestion has two noticable features: it doesn't return a
> > reference to the window and it lets you pass in parameters. I will note
> > that GM_openInTab will let you open a chrome URL in a tab and you can
> > use the usual query string mechanism (but not complete objects).
> It's not clear if you are using "feature" in a positive way here...
> I don't need a window handle, as I'd like to open the window modally,
> though I supose
> others might. Which is the problem with using openInTab, I want modal
> behaviour, and
> I want my extension to modify values, so the script can use the modified
> values when the window closes.
> > The more general solution for "I want to use my extension from user
> > scripts" is to allow extensions to export functions to Greasemonkey.
> > I've filed a bug about it, if you're interested.
> >  http://mozdev.org/bugs/show_bug.cgi?id=10969
> I took a look. I'm not sure I understand what you are proposing. How would
> extension see the export_to_GM function? I don't want to introduce a
> dependency on GM
> in my extension.
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
Dr Christopher Lam
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Greasemonkey