Hello again,
cc escribió:
On 2010-08-04 08:57, Mr Warper wrote:
...
I _want_ to run a GM script against pages that I have saved to disk
and edited previously to tweak them up a bit (hence the 'file://' bit
of the error), so I'm pretty sure I'm safe since I'm not exposing my
ProfD location or anything to something I haven't cleaned up before.
And so remains my original question :)
Anthony's suggestion, actually, was intended to help with that -- have
you tried using the location hack as linked to eliminate the usage of
unsafeWindow?
I don't think it can be done that way. Let's give a bit more background and see
what you guys think:
I have this cross-browser javascript application (a 60kb javascript file, bits
of HTML, and CSSs) to do stuff on local HTML files. I want to keep it
cross-browser, so I'm not making it into a Gecko extension (yet). For it to work
all I need is to insert a <script> tag in the local file I want to process with
it and then I can use it.
I only intend to use a small GM stub to ask me if I want to attach the
application to local files loaded in the browser, and start it in such case, to
avoid manually the need to edit every HTML file I might generate or save to disk.
It is this GM stub loader what uses unsafeWindow to find out where my ProfD is
via XPCComponents, adds a <script> element pointing to the file via its src
attribute. The application then does its stuff just like if I had manually
edited the file to add that <script> element.
These are my problems here, in order of importance:
2) I don't like using unsafeWindow so any more 'polite' methods are welcome,
even if that implies popping up some mozilla dialog warning me about what I know.
1) My current code works OK in GM 0.8.6 on FX 2.0.0.17 but throws this message
error about permissions in FX 3.6.8 (didn't see the error message on FX 3.0.6)
so I expect it to stop working at all in the near future unless something can be
done.
So what do you guys think?
Regards,
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/greasemonkey-users?hl=en.