|
|
#1 |
|
Applescript to reload a Safari page
Would anyone happen to know what the applescript script would be to reload a page on Safari at intervals - Say, reload it every 10 minutes, for example?
Thanks!
__________________
How to Prevent your Mac from Overheating |
|
|
|
0
|
|
|
#2 | |
|
Quote:
Save this as a bookmark, name it reload or so, the if you want to reload a page click this bookmark(in Bookmark Bar) and it will ask you the time to reload. javascript:(function(p){open('','',p).document.write('%3Cbody%20id=1%3E%3Cnobr%20id=2%3E%3C/nobr%3E%3Chr%3E%3Cnobr%20id=3%3E%3C/nobr%3E%3Chr%3E%3Ca%20href=%22#%22onclick=%22return!(c=t)%22%3EForce%3C/a%3E%3Cscript%3Efunction%20i(n){return%20d.getElementById(n)}function%20z(){c+=0.2;if(c%3E=t){c=0;e. location=u;r++}x()}function%20x(){s=t-Math.floor(c);m=Math.floor(s/60);s-=m*60;i(1).style.backgroundColor=(r==0||c/t%3E2/3?%22fcc%22:c/t%3C1/3?%22cfc%22:%22ffc%22);i(2).innerHTML=%22Reloads:%20%22+r;i(3).innerHTML=%22Time:%20%22+m+%22:%22+(s %3C10?%220%22+s:s)}c=r=0;d=document;e=opener.top;u=prompt(%22URL%22,e.location.href);t=u?prompt(%22S econds%22,60):0;setInterval(%22z()%22,200);if(!t){window.close()}%3C/script%3E%3C/body%3E')})('status=0,scrollbars=0,width=100,height=115,left=1,top=1') Last edited by justperry; Feb 2, 2013 at 07:36 AM. Reason: Disabled smilies in text. |
||
|
|
0
|
|
|
#3 | |
|
Quote:
Thanks a ton!
__________________
How to Prevent your Mac from Overheating |
||
|
|
0
|
|
|
#4 |
|
This code seems to mess with MR's page formatting (this thread).
![]() The only problem with this is you get another tab and it needs to be open afaik, I just tested to drag the Tab off so it opens in another window but then it does not work anymore, probably lost connection with the other tab, might be sandboxed. Cheers Perry |
|
|
|
0
|
|
|
#5 | |
|
Quote:
__________________
How to Prevent your Mac from Overheating |
||
|
|
0
|
|
|
#6 |
|
|
0
|
|
|
#7 |
|
Haha, probably... I’m on ML with the latest version of Safari. Thanks again for the script, btw!
__________________
How to Prevent your Mac from Overheating |
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 02:52 PM.







function(p){open('','',p).document.write('%3Cbody%20id=1%3E%3Cnobr%20id=2%3E%3C/nobr%3E%3Chr%3E%3Cnobr%20id=3%3E%3C/nobr%3E%3Chr%3E%3Ca%20href=%22#%22onclick=%22return!(c=t)%22%3EForce%3C/a%3E%3Cscript%3Efunction%20i(n){return%20d.getElementById(n)}function%20z(){c+=0.2;if(c%3E=t){c=0;e. location=u;r++}x()}function%20x(){s=t-Math.floor(c);m=Math.floor(s/60);s-=m*60;i(1).style.backgroundColor=(r==0||c/t%3E2/3?%22fcc%22:c/t%3C1/3?%22cfc%22:%22ffc%22);i(2).innerHTML=%22Reloads:%20%22+r;i(3).innerHTML=%22Time:%20%22+m+%22:%22+(s %3C10?%220%22+s:s)}c=r=0;d=document;e=opener.top;u=prompt(%22URL%22,e.location.href);t=u?prompt(%22S econds%22,60):0;setInterval(%22z()%22,200);if(!t){window.close()}%3C/script%3E%3C/body%3E')})('status=0,scrollbars=0,width=100,height=115,left=1,top=1')
Thanks a ton!

Linear Mode
