Re:Implementing bookmarklets in JavaScript
by buddydvd on Saturday June 11, 2011 @03:13AM
(#2643395)
Instead of polling, you can define event handlers for <script>'s onload and onreadystatechange event to detect when jQuery gets loaded. See Ben Alman's jQuery bookmarklet generator for an example: http://benalman.com/code/test/jquery-run-code-bookmarklet/
essentially, it gives you two-way communication to your server on any arbitrary domain- that's pretty powerful!
[1] https://gist.github.com/1020251