frozenLake

version INSANITY

Mar 26th, 2014
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html><head><meta content="text/html; charset=windows-1252" http-equiv="content-type">
  3. <title>Timey things</title>
  4. <link href="Timey%20things_files/sbi.css" rel="stylesheet" type="text/css" id="sbi-style"></head>
  5. <body>
  6. <style type="text/css"> /* I got some /style/ */
  7. body {background-color:#BACAFE;} /* Do I need to explain this one? */
  8. p {color:#010101; /* Well I can't just leave BACAFE by itself, now can I? */
  9. text-align:center; /* This aligns the text in the center of whatever box it is in. */
  10. }
  11. #splanet_block
  12. { /* This is the CSS for the Starter Planet Clock. */
  13. width:200px;
  14. border:4px solid #FFC000; /* Attempt at making a shade of gold */
  15. margin:auto; /* This centers the block in the screen, might change this later. */
  16. background-color:#DCC57F; /* Halfway Blend between gold and BACAFE. */
  17. }
  18. #splanet_village
  19. {
  20. text-align:left; /* you forgot a semicolon :b */
  21. margin:left;
  22. padding: 12px;
  23. }
  24. #v0earth_block
  25. { /* This is the CSS for the Earth Clock... with timing to events on other planets */
  26. width:650px;
  27. border:4px solid #0000FF; /* Blue. */
  28. margin:auto; /* This centers the block in the screen, might change this later. */
  29. background-color:#5D65FF; /* Halfway Blend between Blue and BACAFE. */
  30. }
  31. #unix_block
  32. { /* This is the CSS for the Unix Clock. */
  33. width:200px;
  34. border:4px solid #000000; /* Black. */
  35. margin:auto; /* This centers the block in the screen, might change this later. */
  36. background-color:#5D657F; /* Halfway Blend between Black and BACAFE. */
  37. }
  38.  
  39. </style>
  40. <script>var myVar=setInterval(function(){univeral_loop()},1000); // It actually would check every millisecond if that 1000 was not there. //
  41.  
  42. function univeral_loop()
  43. {
  44. var unix = Math.round(+new Date() / 1000);
  45. var splanet_year = Math.floor((unix-1387670400)/38750400); // splanet stands for Starter Planet, obviously. //
  46. var splanet_yrem = ((unix-1387670400) % 38750400);
  47. var splanet_day = Math.floor(splanet_yrem / 93600);
  48. var splanet_drem = splanet_yrem % 93600;
  49. var splanet_hour = Math.floor(splanet_drem / 3600);
  50. var splanet_hrem = splanet_drem % 3600;
  51. var splanet_min = Math.floor(splanet_hrem / 60);
  52. var splanet_sec = splanet_hrem % 60;
  53. if (splanet_sec<10)
  54. {
  55. splanet_secmin=":0";
  56. }
  57. else
  58. {
  59. splanet_secmin=":";
  60. }
  61.  
  62. if (splanet_min<10)
  63. {
  64. splanet_hourmin=":0";
  65. }
  66. else
  67. {
  68. splanet_hourmin=":";
  69. }
  70.  
  71. if (splanet_day>13) //if the day amount is larger than 13
  72. {var dcal=splanet_day%10 }//modulo by 10 to get a base number
  73. else
  74. {var dcal=splanet_day} //if no, just keep it straight.
  75.  
  76. if (dcal==1) //if it modulo'd to 1
  77. {var nend="st" }//it is the 1st
  78. else if (dcal==2)
  79. {var nend="nd"}
  80. else if (dcal==3)
  81. {var nend="rd"}
  82. else
  83. {var nend="th"} //it works now
  84.  
  85. if (splanet_hour < 5) //if hour is smaller than 5
  86. {var splanet_light = "really late night (go to bed >_>)"}
  87. else if (splanet_hour == 13)
  88. {var splanet_light = "noooooon"}
  89. else if (splanet_hour > 26) //if the our is bigger than 26
  90. {var splanet_light = "late night"}
  91. else if (splanet_hour == 26)
  92. {var splanet_light = "midnight (watch out for werewolves-owait that's just kimura)"}
  93. else if (splanet_hour > 20)
  94. {var splanet_light = "night"}
  95. else if (splanet_hour > 18)
  96. {var splanet_light = "evening"}
  97. else if (splanet_hour > 13)
  98. {var splanet_light = "afternoon"}
  99. else if (splanet_hour > 8)
  100. {var splanet_light = "morning (EGGS AND BACON)"}
  101. else if (splanet_hour > 5) //if hour is larger than 5
  102. {var splanet_light = "dawn (which sun tho)"}
  103. else
  104. {var splanet_light = "I DON'T KNOW, OKAY?"} //if all else fails, I have no idea
  105. //Sunrise: 6 to 7
  106. //Noon: 13
  107. //Sunset: 19 to 20
  108. //Midnight: 26
  109.  
  110. document.getElementById('splanet_dayname').innerHTML = "It is currently the " + splanet_day + nend + " day of the Year " + splanet_year;
  111. document.getElementById('splanet_clock').innerHTML = "The time is " + splanet_hour + splanet_hourmin + splanet_min + splanet_secmin + splanet_sec + ", " + splanet_light ;
  112.  
  113. var UTCdate = new Date();
  114. var earthdate = UTCdate.toUTCString();
  115. document.getElementById('v0earth_gmt').innerHTML = earthdate;
  116.  
  117.  
  118. var splanet_vanyear = Math.floor((unix-1387670400)/38750400);
  119. var splanet_vanyear2 = Math.floor(38750400+38750400*splanet_vanyear);
  120. var splanet_vanyear3 = Math.floor(splanet_vanyear2-(unix-1387670400));
  121. var vanyear_day = Math.floor(splanet_vanyear3 / 86400);
  122. var vanyear_drem = splanet_vanyear3 % 86400;
  123. var vanyear_hour = Math.floor(vanyear_drem / 3600);
  124. var vanyear_hrem = vanyear_drem % 3600;
  125. var vanyear_min = Math.floor(vanyear_hrem / 60);
  126. var vanyear_sec = vanyear_hrem % 60;
  127. document.getElementById('splanet_newyear').innerHTML = vanyear_day + " Days, " + vanyear_hour + " Hours, " + vanyear_min + " Minutes, and " + vanyear_sec + " Seconds " + "until Year " + (splanet_year+1) + " on Starter Planet.";
  128. document.getElementById('unix_clock').innerHTML = unix;
  129. }</script>
  130.  
  131. <!-- you're welcome -->
  132. <div id="v0earth_block">
  133. <p><b>Vanilla Earth</b></p>
  134. <p id="v0earth_gmt"></p>
  135. <p id="splanet_newyear"></p>
  136. </div>
  137. <p>
  138. </p><div id="splanet_block">
  139. <p><b>Starter Planet</b></p>
  140. <p id="splanet_dayname"></p>
  141. <p id="splanet_clock"></p>
  142. <p id="splanet_village">Quick guide:<br>Sunrise: 6 to 7<br>Noon: 13<br>Sunset: 19 to 20<br>Midnight: 26
  143. </p>
  144. </div>
  145. <p>
  146. </p><div id="unix_block">
  147. <p><b>Unix Time</b></p>
  148. <p id="unix_clock"></p>
  149. </div>
  150. <div id="swiffout"></div><div style="left: 0px; top: 0px; position: absolute; width: 29px; height: 27px; border: medium none; margin: 0px; padding: 0px; z-index: 2147483647; display: none;" class="sbi_search" id="sbi_camera_button"></div></body></html>
Advertisement
Add Comment
Please, Sign In to add comment