N3r0_H4x0r_EvilSec

Matrix.html

Sep 22nd, 2013
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 6.29 KB | None | 0 0
  1. Matrix HTML By Phobos Just A Share From Me
  2.  
  3. <script type="text/javascript">
  4. // ------------------------------------------------------------------------------------
  5. //
  6. // ------------------------------------------------------------------------------------
  7. var theinHTML;
  8. var thelessstr;
  9. var ascSt=22;
  10. var ascEnd=126;
  11. var numoflines = 28;
  12. var lines = new Array();
  13. var intervalID = new Array();
  14. var subIntervalID = new Array();
  15. var subIntervalID2 = new Array();
  16. var scH = screen.height-220;
  17. var scW = screen.width-50;
  18. window.onload = createlines;
  19. // -------------------------------------------------------------------------------------
  20. //
  21. var hD="0123456789ABCDEF";
  22. function d2h(d)
  23. {
  24. var h = hD.substr(d&15,1);
  25. while(d > 15)
  26. {
  27. d >>= 4;
  28. h = hD.substr(d&15,1)+h;
  29. }
  30. return h;
  31. }
  32. // -------------------------------------------------------------------------------------
  33. // Coded by Phobos
  34. function line(length, maxlength, chars, speed, x)
  35. {
  36. this.length = length;
  37. this.maxlength = maxlength;
  38. this.chars = chars;
  39. this.speed = speed;
  40. this.x = x;
  41. }
  42. // -------------------------------------------------------------------------------------
  43. // Coded by Phobos
  44. function createlines()
  45. {
  46. // Coded by Phobos
  47. for(var eachline = 0; eachline < numoflines; eachline++)
  48. {
  49. lines[eachline] = new line(0, Math.round(Math.random()*15+5), String.fromCharCode(Math.round(Math.random()*(ascEnd-ascSt)+ascSt)), Math.round(Math.random()*400+100), eachline*61);
  50. }
  51. // write the lines
  52. for(var writelines = 0; writelines < numoflines; writelines++)
  53. {
  54. var newline = document.createElement("div");
  55. newline.id = "char" + writelines;
  56. newline.style.position = "absolute";
  57. newline.style.top = "5px";
  58. newline.style.left = lines[writelines].x + "px";
  59. var firstchar = document.createElement("div");
  60. var newcolor = d2h(Math.round(1/(lines[writelines].maxlength+1)*255));
  61. if(newcolor.length == 1)
  62. newcolor = "0" + newcolor;
  63. firstchar.style.color = "#00"+newcolor+"00"
  64. firstchar.innerHTML = lines[writelines].chars
  65. newline.appendChild(firstchar);
  66. document.body.appendChild(newline);
  67. }
  68. start();
  69. }
  70. // -------------------------------------------------------------------------------------
  71. // Coded by Phobos
  72. function start()
  73. {
  74. for(var pickastring = 0; pickastring < numoflines; pickastring++)
  75. {
  76. intervalID[pickastring] = setInterval("addchars("+pickastring+")", lines[pickastring].speed);
  77. }
  78. }
  79. // -------------------------------------------------------------------------------------
  80. // Coded by Phobos
  81. function addchars(theline)
  82. {
  83. if(lines[theline].length >= lines[theline].maxlength)
  84. {
  85. clearInterval(intervalID[theline]);
  86. subIntervalID[theline] = setInterval("movethestring("+theline+")", lines[theline].speed);
  87. }
  88. else
  89. {
  90. // Coded by Phobos
  91. myRandomChar = String.fromCharCode(Math.round(Math.random()*(ascEnd-ascSt)+ascSt));
  92. while(myRandomChar == "'" || myRandomChar == '"' || myRandomChar == "\\")
  93. myRandomChar = String.fromCharCode(Math.round(Math.random()*(ascEnd-ascSt)+ascSt));
  94. // Coded by Phobos
  95. var newchar = document.createElement("div");
  96. newchar.innerHTML = myRandomChar;
  97. document.getElementById("char"+theline).appendChild(newchar);
  98. // Coded by Phobos
  99. var i;
  100. for(i = 0; i <= lines[theline].length; i++)
  101. {
  102. var newcolor = d2h(Math.round((i+1)/(lines[theline].maxlength+1)*255));
  103. newcolor = "" + newcolor;
  104. if(newcolor.length == 1)
  105. newcolor = "0" + newcolor;
  106. document.getElementById("char"+theline).childNodes[i].style.color = "#00" + newcolor + "00";
  107. document.getElementById("char"+theline).childNodes[i].style.fontWeight = "normal";
  108. }
  109. document.getElementById("char"+theline).childNodes[i].style.color = "#99FF99";
  110. document.getElementById("char"+theline).childNodes[i].style.fontWeight = "bold";
  111. // Coded by Phobos
  112. lines[theline].length++;
  113. }
  114. }
  115. // -------------------------------------------------------------------------------------
  116. // Coded by Phobos
  117. function movethestring(theline)
  118. {
  119. var topstringnum = document.getElementById("char"+theline).offsetTop;
  120. if((topstringnum + (lines[theline].maxlength * 15)) >= scH)
  121. {
  122. clearInterval(subIntervalID[theline]);
  123. subIntervalID2[theline] = setInterval("clearletters("+theline+")", lines[theline].speed);
  124. }
  125. else
  126. {
  127. // Coded by Phobos
  128. myRandomChar = String.fromCharCode(Math.round(Math.random()*(ascEnd-ascSt)+ascSt));
  129. while(myRandomChar=="'" || myRandomChar=='"' || myRandomChar=="\\")
  130. myRandomChar = String.fromCharCode(Math.round(Math.random()*(ascEnd-ascSt)+ascSt));
  131. var newchar = document.createElement("div");
  132. newchar.innerHTML = myRandomChar;
  133. document.getElementById("char"+theline).appendChild(newchar);
  134. // Coded by Phobos
  135. document.getElementById("char"+theline).removeChild(document.getElementById("char"+theline).childNodes[0]);
  136. // Coded by Phobos
  137. var i;
  138. for(i = 0; i < lines[theline].length; i++)
  139. {
  140. var newcolor = d2h(Math.round((i+1)/(lines[theline].maxlength+1)*255));
  141. newcolor = "" + newcolor;
  142. if(newcolor.length == 1)
  143. newcolor = "0" + newcolor;
  144. document.getElementById("char"+theline).childNodes[i].style.color = "#00" + newcolor + "00";
  145. document.getElementById("char"+theline).childNodes[i].style.fontWeight = "normal";
  146. }
  147. document.getElementById("char"+theline).childNodes[i].style.color = "#99FF99";
  148. document.getElementById("char"+theline).childNodes[i].style.fontWeight = "bold";
  149. // move
  150. document.getElementById("char"+theline).style.top = (topstringnum+15) + "px";
  151. }
  152. }
  153. // -------------------------------------------------------------------------------------
  154. // Coded by Phobos
  155. function clearletters(theline)
  156. {
  157. if(lines[theline].length <= -1)
  158. {
  159. clearInterval(subIntervalID2[theline]);
  160. document.getElementById("char"+theline).style.top = 0;
  161. intervalID[theline] = setInterval("addchars("+theline+")", lines[theline].speed);
  162. }
  163. else
  164. {
  165. // Coded by Phobos
  166. document.getElementById("char"+theline).removeChild(document.getElementById("char"+theline).childNodes[document.getElementById("char"+theline).childNodes.length-1]);
  167. // Coded by Phobos
  168. var topstringnum = document.getElementById("char"+theline).offsetTop;
  169. document.getElementById("char"+theline).style.top = topstringnum+15 + "px";
  170. // Coded by Phobos
  171. lines[theline].length--;
  172. }
  173. }
  174. </script>
  175.  
  176. <style type="text/css">
  177. body {
  178. font: normal normal normal 10px/15px symbol,Rockwell;
  179. color:#FFFFFF;
  180. background-color:black;
  181. margin:0;
  182. padding:0;
  183. }
  184. body div {
  185. text-align: center;
  186. }
  187. </style>
  188.  
  189. </body>
  190. </html>
Advertisement
Add Comment
Please, Sign In to add comment