Pause after the rate limit
|
|
Can anyone who has the know-how make it so the script un-checks the aggressive refresh box after the "rate limit" message pops up? And by "make it" i mean provide the code changes. If not the un-check, i have seen posting about a delay in refresh, perhaps adding a 5 minute pause in action after this message pops up. Thank you. |
|
|
This is the code section for heavy rate limiting:
This is a section whick i believe returns the script to normal refresh
Is where can the code be changed to make the normal refresh possible? |
|
|
// The [Heavily Rate Limited] page
else if (document.body.innerHTML.match(/This page is being heavily rate limited. Please avoid constantly refreshing this page./))
{
window.setTimeout(function() {window.location.href='http://apps.facebook.com/mobwars/'}, norm_refresh);
}
I think norm_refresh is 60 seconds long. You only need to wait 20 seconds after the rate limited warning. If you want to come back faster you can do this instead.
// The [Heavily Rate Limited] page
else if (document.body.innerHTML.match(/This page is being heavily rate limited. Please avoid constantly refreshing this page./))
{
window.setTimeout(function() {window.location.href='http://apps.facebook.com/mobwars/'}, 20000);
}
|
|
|
I added the code you suggested for stopping aggressive refresh. It didnt work. Then i tried this:
it just resulted in refreshing the hitlist page, with no turn off of the agg refresh. |
|
|
This is what I personally use then. It turns off the hitlist and puts you on the home page.
// The [Heavily Rate Limited] page
if (/This page is being heavily rate limited/.test(document.body.innerHTML))
{
document.getElementById('hurl').checked = false;
boss.preferences.hurl = false;
GM_setValue('boss', boss.toSource());
setTimeout('document.location.href="http://apps.facebook.com/mobwars/"', 15000);
}
|
|
|
It didnt work, thanks anyway |
|
|
Anyone have any other suggestions? So far no solution has been posted. |
|
|
remarkable, I have played around with this a bit and haven't found a solution yet that I like. I have put in a "pause" function:
function pausecomp(millis)
{
var date = new Date();
var curDate = null;
do { curDate = new Date(); }
while(curDate-date < millis);
}
and then called this from just before the page reload. However, because of the use of the loop, it will consume a lot of resources during the pause. |
|
|
not sure what you mean by that, Does it work and where is that implemented? |
|
|
Put the function somewhere in the script, below the other functions perhaps. Then, within the error handler (your second post) just above the window.location.href line, call the function using something like: pausecomp(100000); Seems to work but the browswer essentially freezes during the pause. Kinda ugly if you ask me. |
|
|
Yeah, my computer has enough freezing problems with firefox as it is. Safari used to work a lot better for the hitlist before i found this script - which is why i tried to install this script using greasekit for safari. It didnt work though. I think i will wait til someone solves this before i change any pause codes. |