On Feb 26, 6:19 pm, Anthony Lieuallen <[email protected]> wrote:
> I do have a
> backup of the devjavu data if it is extremely important, but I'd be
> surprised if it really is.

No, it probably is not. I was hoping to learn the current status of
these tickets, but you already answered that.

Unless of course the tickets contain a 90% complete solution that I
could adapt :)

> > - Is there an alternative to overwriting setInterval?
>
> I don't know enough about your specifics to be able to say.  I doubt it.
>   It depends a lot about what is really happening in the page, and you
> haven't provided this information.  You could probably intercept the
> functions getting called (assuming the site isn't passing strings to
> setinterval, ick) to check your own timer and pass the call on only
> sometimes.

I want to make a general "pause" userscript. When there is no user
activity, all setintervals and settimeouts should run at greatly
reduced frequency. For setTimeout this works, but setInterval is
usually called only once during page load, too early for me to catch.
Since the script should work on as many sites as possible, I cannot
assume which functions are called by setInterval. So there is probably
no alternative.

Just a thought, can I realiably inject javascript into child frames
before they have finished loading?
If so, a horrible hack would be:

if (window.setInterval is original function) {
  remove document body
  create frameset with one frame,
  frame.location.href = window.location.href
  overwrite frame.setInterval
}

This would double the loading time, cause horrible refresh issues,
trip up framebuster scripts etc. so probably a bad idea.

-- 
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.

Reply via email to