Geeks With Blogs

News

Locations of visitors to this page

View ► Sanjay Uttam [sanjay.uttam@gmail.com]'s profile on LinkedIn


Add to Google Reader or Homepage




Sanjay Uttam Predominantly .NET

I usually don’t stray off the .NET path too much but…I listen to Pandora a lot.  I also happen to be a nutcase that listens to music throughout the entire night.  Well, if you ever listen to Pandora you know that after an hour it times out…and that can be pretty damn annoying even if all you have to do is go find the tab within FireFox that Pandora is living in and click a button.

In any case, I created a really old-skool workaround for this.  There are probably 900 ways to do this (another one that comes to mind that is probably easier is just using a META-REFRESH)…all I did was create a local HTML document with a frame src=”pandora.com” and a JavaScript SetTimeOut function call.  Basically, it will refresh the page after 60 minutes.  Just copy and paste the code below, call it something.html (Ex: Pandora.html) and double-click.  After an hour, it will refresh…the end.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
   "http://www.w3.org/TR/html4/frameset.dtd">
<HTML>
<HEAD>
<TITLE></TITLE>
<script type="text/JavaScript">
   1:  
   2: <!--
   3: function timedRefresh(timeoutPeriod) {
   4:     setTimeout("location.reload(true);",timeoutPeriod);
   5: }
   6: //   -->
</script>
</HEAD>
<!--
3600000 = 60 min in milliseconds    
 --> 
<FRAMESET cols="99%, 1%" onload="timedRefresh(3600000);">
  <FRAMESET rows="500, 1">
      <FRAME src="http://pandora.com/">
  </FRAMESET>
</FRAMESET>
</HTML>

Share this post :

 

Posted on Wednesday, May 20, 2009 1:44 PM | Back to top

Copyright © Sanjay Uttam | Powered by: GeeksWithBlogs.net