On Fri, Jul 17, 2009 at 07:36, daremind<[email protected]> wrote:
> In the web app, I will have a portion of the web page that acts like a
> web browser. in the web browser, I can load any web page from another
> site. And then I'll add some javascript effects onto this web page.
>
> What i'm doing inside this browser-like portion of the page can be
> done with grease monkey user script. however, the issue is whether
> this doable at all. More specifically:
>
> What is this portion of the page? if I use an Iframe, i have domain
> permission issue so javascript can't modify it's content. If i use
> some div's, i need to parse like a browser to pull over js, css, etc.
> which is a mess.
If it's an iframe, and your GM script can do its work inside of the
iframe without access to anything outside of that iframe, it's a piece
of cake; just make the iframe, point it to the url you want to show
and augment and make a GM script that @include:s that url (or perhaps
all URLs). Also, I'd suggest putting a name=mybrowser attribute on
that iframe.
In the GM script, start with an "if ('mybrowser' != window.name)
return;" to make sure you're executing in the iframe context and
nowhere else.
Then modify its DOM any way you please.
> Is there some type of plugin that I can use to create such as area
> inside a web page so that i can use grease monkey user script on its
> content? or am i trying to do something grease monkey already did.
>
> and did i make any sense to you?
It's admittedly very, very fuzzy, and might clarify if you describe
one thing your greasemonkeying would do to the browse area.
--
/ Johan Sundström, http://ecmanaut.blogspot.com/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---