[Greasemonkey] Alternative script injection technique proof of
concept
Jacob Scherrer
scherrer at gmail.com
Mon Jul 18 18:02:10 EDT 2005
Yes, the user script does create the file. Oh well, back to the drawing board.
Thanks for the feed back.
-Jacob Scherrer
On 7/18/05, Aaron Boodman <zboogs at gmail.com> wrote:
> I believe that this approach will allow user scripts to access any
> XPCOM interface.
>
> Try, for instance, putting this in a user script:
>
> var file = Components.classes["@mozilla.org/file/directory_service;1"]
> .getService(Components.interfaces.nsIProperties)
> .get("TmpD", Components.interfaces.nsIFile);
> file.append("suggestedName.tmp");
> file.createUnique(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 0664);
> alert(file.path);
>
> --
> Aaron
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
>
More information about the Greasemonkey
mailing list