Old Proxomitron Forums

Proxomitron Filters - Discussions welcome => Other => Topic started by: Arne on September 25, 2001, 01:18:20 PM

Title: Refresh Pages in a blocklist
Post by: Arne on September 25, 2001, 01:18:20 PM
I have made a filter set that refreshes pages which are in a list. It
adds a countdown timer at the bottom of the page, and counts down from
180 seconds to 0 - at which it reloads the page. There is also a
button which "reloads now" and one button to stop the timer. Since it
conflicts with "Stop JavaScript Timers" this must be turned off. It
also conflicts with "Arne Scroller menu" and therefore I have made
filter #2 here "Allowed for mulitple matches"

My refresh.txt contains links like:
*groups.yahoo.com/group/prox-list/

[Blocklists]
List.Refresh = "..efresh.txt"

[Patterns]
Name = "Arne Refresh Pages in List 1 of 3"
Active = TRUE
URL = "$LST(Refresh)"
Limit = 265
Match = "<start>"
Replace = "<SCRIPT>"
          "var Interval = 180;"
          "function startClock() {"
          "Interval = Interval - 1;"
          "if (Interval == -1) {"
          "window.location.reload();"
          "}"
          "else {"
          "document.clock.time.value = Interval;"
          "timerID = setTimeout("startClock()", 1000);"
          "}"
          "}"
          "</SCRIPT>"

Name = "Arne Refresh Pages in list 2 of 3"
Active = TRUE
Multi = TRUE
URL = "$LST(Refresh)"
Limit = 256
Match = "<body 1>"
Replace = "<body onload="startClock()" 1>"

Name = "Arne Refresh Pages in List 3 of 3"
Active = TRUE
URL = "$LST(Refresh)"
Limit = 265
Match = "</body>"
Replace = "<DIV align="center">"
          "<FORM NAME="clock">"
          "<font face="Arial, Helvetica" color="#0099FF">Reloads in"
          "<INPUT TYPE="text" NAME="time" SIZE="3" VALUE=""> Seconds.</font><br>"
          "<INPUT TYPE="button" VALUE="Reload Now"   onClick="window.location.reload()"><br>"
          "<INPUT TYPE="button" VALUE="Stop"   onClick="window.clearTimeout(timerID)">"
          "</FORM>"
"<script>"
"window.scroll(0,200);"
"</script>"

          "<br></DIV></BODY>"


Text in red is optional
Best wishes
Arne
Imici username: Arne