But i was wondering how greasemonkey works. Does it insert the javascript
code into the page source? If so where in the page source?
--
View this message in context: http://old.nabble.com/Newbie-question-tp32309372p32309372.html
Sent from the GreaseMonkey List mailing list archive at Nabble.com.
You might want to read this:
http://en.wikipedia.org/wiki/Greasemonkey#Technical_details
Chris
> --
> You received this message because you are subscribed to the Google Groups
> "greasemonkey-users" group.
> To post to this group, send email to greasemon...@googlegroups.com.
> To unsubscribe from this group, send email to
> greasemonkey-us...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/greasemonkey-users?hl=en.
>
>
>
--
View this message in context: http://old.nabble.com/Newbie-question-tp32309372p32315767.html
Hm, okay, I know this article isn't so much about the technical details,
but the main thing "invokes the script" is mentioned. For more detailed
answers, your question is maybe better addressed to greasemonkey-dev
group. In that group you can also find a lot of messages to technical
details and links to the code repository at github.
Chris
Is there a way to delay when the code fires?
I wrote an automation script that works perfectly IF i run it using firebug
after the window fully loads.
i guess i could run some junk loop for 5 seconds, but depending on the code
it might jam up my firefox/pc.
--
View this message in context: http://old.nabble.com/Newbie-question-tp32309372p32350632.html
--
i will dl a few script and take a look
--
View this message in context: http://old.nabble.com/Newbie-question-tp32309372p32350799.html
For the facebook games, IIRC they run on non-facebook servers via an
iframe and many make use of AJAXy code - in other words, clicking a
link won't necessarily load another page and consequently won't
trigger the user-script to be executed. As suggested in another reply,
you will likely need to listen for other events like node inserted
etc.
Actually, @includes are probably the issue - the game's page isn't run
on a facebook.com page.
I am using the site's domain name in the @include. I dont know what else to
include since it works across several pages including domain/sub-domain.
Unless i learn to use AJAX. Or just use a more specific trigger?
Time to read up on AjAX and DOM
--
View this message in context: http://old.nabble.com/Newbie-question-tp32309372p32354707.html
Common ways to delay / customize the execution of a function:
> hello = function () {
> document.title="Hello World";
> }
+ one of these methodes (one per line):
> window.addEventListener("load", hello, false); // Waits for all
> contents, not only for DOM content to be loaded before the function is
> called
> GM_registerMenuCommand("Say hello", hello); // Puts a clickable item
> "Say hello" into the Greasemonkey menu to execute the function manually
> setTimeout(hello, 5000); // Waits five seconds before it calls the
> function
Chris