Advertisement
Guest User

Untitled

a guest
May 23rd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.49 KB | None | 0 0
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <SCRIPT TYPE="text/javascript">
  5. <!--
  6. function clickIE() {if (document.all) {(message);return false;}}
  7. function clickNS(e) {if
  8. (document.layers||(document.getElementById&&!document.all)) {
  9. if (e.which==2||e.which==3) {(message);return false;}}}
  10. if (document.layers)
  11. {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
  12. else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
  13. document.oncontextmenu=new Function("return false")
  14. // -->
  15. </SCRIPT>
  16. <script language=JavaScript>
  17. var TxtType = function(el, toRotate, period) {
  18. this.toRotate = toRotate;
  19. this.el = el;
  20. this.loopNum = 0;
  21. this.period = parseInt(period, 10) || 2000;
  22. this.txt = '';
  23. this.tick();
  24. this.isDeleting = false;
  25. };
  26.  
  27. TxtType.prototype.tick = function() {
  28. var i = this.loopNum % this.toRotate.length;
  29. var fullTxt = this.toRotate[i];
  30.  
  31. if (this.isDeleting) {
  32. this.txt = fullTxt.substring(0, this.txt.length - 1);
  33. } else {
  34. this.txt = fullTxt.substring(0, this.txt.length + 1);
  35. }
  36.  
  37. this.el.innerHTML = '<span class="wrap">'+this.txt+'</span>';
  38.  
  39. var that = this;
  40. var delta = 200 - Math.random() * 100;
  41.  
  42. if (this.isDeleting) { delta /= 2; }
  43.  
  44. if (!this.isDeleting && this.txt === fullTxt) {
  45. delta = this.period;
  46. this.isDeleting = true;
  47. } else if (this.isDeleting && this.txt === '') {
  48. this.isDeleting = false;
  49. this.loopNum++;
  50. delta = 500;
  51. }
  52.  
  53. setTimeout(function() {
  54. that.tick();
  55. }, delta);
  56. };
  57.  
  58. window.onload = function() {
  59. var elements = document.getElementsByClassName('typewrite');
  60. for (var i=0; i<elements.length; i++) {
  61. var toRotate = elements[i].getAttribute('data-type');
  62. var period = elements[i].getAttribute('data-period');
  63. if (toRotate) {
  64. new TxtType(elements[i], JSON.parse(toRotate), period);
  65. }
  66. }
  67. // INJECT CSS
  68. var css = document.createElement("style");
  69. css.type = "text/css";
  70. css.innerHTML = ".typewrite > .wrap { border-right: 0.08em solid #fff}";
  71. document.body.appendChild(css);
  72. };
  73. </script>
  74.  
  75. </head>
  76. <style>
  77. ::-moz-selection {
  78. background-color: #191914;
  79. color: #3967e7;
  80. }
  81. ::selection {
  82. background:rgba(25, 25, 20, 0.99);
  83. color: #3967e7;
  84. }
  85.  
  86. /* unvisited link */
  87. a:link {
  88. color:#aab7b7;
  89. text-decoration:none;
  90. transition: all 0.8s ease;
  91. -webkit-transition: all 0.8s ease;
  92. -moz-transition: all 0.8s ease;
  93. -o-transition: all 0.8s ease;
  94. }
  95.  
  96. /* visited link */
  97. a:visited {
  98. color: #aab7b7;
  99. border-bottom: dashed 1px #ab1352;
  100. transition: all 0.8s ease;
  101. -webkit-transition: all 0.8s ease;
  102. -moz-transition: all 0.8s ease;
  103. -o-transition: all 0.8s ease;
  104. }
  105.  
  106. /* mouse over link */
  107. a:hover {
  108. color:#000000;
  109. background-color:#cf3636;
  110. transition: all 0.8s ease;
  111. -webkit-transition: all 0.8s ease;
  112. -moz-transition: all 0.8s ease;
  113. -o-transition: all 0.8s ease;
  114. }
  115.  
  116. /* selected link */
  117. a:active {
  118. color: #cf3636;
  119. }
  120.  
  121. ::-webkit-scrollbar {width: 4px; height: 1px; background: #; border: solid 1px #000;
  122. }
  123. ::-webkit-scrollbar-thumb { background-color: #191914; -webkit-border-radius: 0ex; border: solid 1px #3967e7;
  124. }
  125.  
  126. body{
  127. top:0px;
  128. left:0px;
  129. height:495px;
  130. width:550px;
  131. font-family:lucida console;
  132. text-transform:uppercase;
  133. color:#6bb8ff;
  134. font-size:10px;
  135. text-align:center;
  136. background-image:url('https://s20.postimg.cc/68z5rvy0t/fearbtm.gif');
  137. background-repeat:no-repeat;
  138. padding:0px;
  139. }
  140.  
  141. #null{
  142. top:60px;
  143. left:75px;
  144. height:175px;
  145. width:266px;
  146. background:#191914;
  147. position:absolute;
  148. padding:0px;
  149. overflow:auto;
  150. }
  151.  
  152.  
  153. #div1 {
  154. background-color: transparent;
  155. text-align: center;
  156. color:#2e2e2e;
  157. position: absolute;
  158. height:175px;
  159. width:266px;
  160. top:60px;
  161. left:75px;
  162. }
  163.  
  164. * { color:#fff; text-decoration: none;}
  165.  
  166. </style>
  167. <body>
  168. <div id="div1">
  169. <a href="" class="typewrite" data-period="2000" data-type='[ "ERROR 404", "SUCK MY ASS JAVASCRIPT", "I Love Design.", "I Love to Develop." ]'>
  170. <span class="wrap"></span>
  171. </a>
  172. <div id="null">
  173. <br><br>error 504 data corrupted.<br><br>i want to try and get this animated so that it looks like its being typed but i fucking hate javascript and i dont know another way @ god please fucking help.
  174. </div>
  175. <span id="typed"></span>
  176. </div>
  177.  
  178. </body>
  179. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement