[Greasemonkey] New GM_ function request.

Adam Judson adamsplugins at gmail.com
Tue Aug 23 15:51:38 EDT 2005


I intend to deliver it with my extension.

To generalize:

- I have a problem, and I have created a beautiful set of chrome
windows etc. to solve it.
- I want to trigger my solution, but the only way it can be done (or
the only way I can think of) is to modify the DOM of the page to
trigger my extension, which needs to access files which are in
chrome://...
- rather than duplicate a lot of the GM code in my own extension, I'd
prefer to just use GM.

I can also picture someone creating an extension that is nothing but a
set of utility dialogs, that can then be re-used across various
scripts.

In my specific case, I have an extension that does http tracing and
modifications.  I've recieved a lot of request to allow users to
tamper with GET parameters, but I can't do
this without modifying the page to add a submit handler.   I already
have a window that
takes a URL as a parameter, and modifies it, and I'd like to use GM to
re-use it.
e.g. 

      var urlObj = {value : frm.action};
      GM_openDialog("chrome://tamperdata/content/tamperURI.xul", "",
"modal", urlObj);
      if (urlObj.value) {
      etc.


Adam
http://tamperdata.mozdev.org




On 23/08/05, Aaron Boodman <zboogs at gmail.com> wrote:
> But how will you create the chrome window? Or will you use an existing
> one that is part of mozilla?
> 
> On 8/23/05, Adam Judson <adamsplugins at gmail.com> wrote:
> > What are the chances of adding the following:
> >
> > to miscapis.js
> >
> > function GM_openDialog(location, title, settings, otherParams) {
> >  window.openDialog(location, title, settings, otherParams);
> > }
> >
> > to dochandler.js
> > ...
> >  sandbox.GM_openDialog = GM_openDialog;
> > ...
> >
> > Basically I want to use GM to modify the page to open a chrome window
> > when triggered by user events.
> > e.g. form submition - trying to use my extension - tamperdata - to
> > modify GET parameters.
> >
> > Adam Judson
> > adamsplugins at gmail.com
> > _______________________________________________
> > Greasemonkey mailing list
> > Greasemonkey at mozdev.org
> > http://mozdev.org/mailman/listinfo/greasemonkey
> >
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
>


More information about the Greasemonkey mailing list