On Wed, Sep 9, 2009 at 9:00 PM, Trevor Bramble<[email protected]> wrote:
> function refreshTimeline(){
>        setTimeout("$('#primary_nav>li.active>a').click();",60000);
>        refreshTimeline();
> }
> refreshTimeline();

This is going to infinitely recurse. You need to delay the call to
refreshTimeline as well. Unfortunately, doing the obvious thing --
moving refreshTimeline into the string passed to setTimeout() isn't
going to work because of isolated worlds [1].

So you're going to need the other form of setTimeout that takes a
function [2]. Inside the function, you can put the code you have now,
plus a call to call refreshTimeline() again.

[1] 
http://code.google.com/chrome/extensions/content_scripts.html#extecution-environment
[2] https://developer.mozilla.org/en/DOM/window.setTimeout

- a

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" 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/chromium-extensions?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to