Advertisement
Guest User

Untitled

a guest
Dec 10th, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.97 KB | None | 0 0
  1. <style type="text/css">
  2. <!--
  3. .ahgcrewstyle {
  4. color: #F00;
  5. }
  6. .ahg {
  7. color: #0F0;
  8. }
  9. #message font strong {
  10. font-family: Tahoma, Geneva, sans-serif;
  11. font-size: 18px;
  12. }
  13. .gre {
  14. color: #9F3;
  15. font-size: 36px;
  16. }
  17. #message font {
  18. font-size: 16px;
  19. }
  20. -->
  21. </style>
  22. </head><body alink="gray" bgcolor="black" vlink="gray" link="gray" text="gray">
  23. <p></p><center>
  24. <center></center>
  25. <script type="text/javascript">
  26. TypingText = function(element, interval, cursor, finishedCallback) {
  27. if((typeof document.getElementById == "undefined") || (typeof element.innerHTML == "undefined")) {
  28. this.running = true;
  29. return;
  30. }
  31. this.element = element;
  32. this.finishedCallback = (finishedCallback ? finishedCallback : function() { return; });
  33. this.interval = (typeof interval == "undefined" ? 100 : interval);
  34. this.origText = this.element.innerHTML;
  35. this.unparsedOrigText = this.origText;
  36. this.cursor = (cursor ? cursor : "");
  37. this.currentText = "";
  38. this.currentChar = 0;
  39. this.element.typingText = this;
  40. if(this.element.id == "") this.element.id = "typingtext" + TypingText.currentIndex++;
  41. TypingText.all.push(this);
  42. this.running = false;
  43. this.inTag = false;
  44. this.tagBuffer = "";
  45. this.inHTMLEntity = false;
  46. this.HTMLEntityBuffer = "";
  47. }
  48. TypingText.all = new Array();
  49. TypingText.currentIndex = 0;
  50. TypingText.runAll = function() {
  51. for(var i = 0; i < TypingText.all.length; i++) TypingText.all[i].run();
  52. }
  53. TypingText.prototype.run = function() {
  54. if(this.running) return;
  55. if(typeof this.origText == "undefined") {
  56. setTimeout("document.getElementById('" + this.element.id + "').typingText.run()", this.interval);
  57. return;
  58. }
  59. if(this.currentText == "") this.element.innerHTML = "";
  60. if(this.currentChar < this.origText.length) {
  61. if(this.origText.charAt(this.currentChar) == "<" && !this.inTag) {
  62. this.tagBuffer = "<";
  63. this.inTag = true;
  64. this.currentChar++;
  65. this.run();
  66. return;
  67. } else if(this.origText.charAt(this.currentChar) == ">" && this.inTag) {
  68. this.tagBuffer += ">";
  69. this.inTag = false;
  70. this.currentText += this.tagBuffer;
  71. this.currentChar++;
  72. this.run();
  73. return;
  74. } else if(this.inTag) {
  75. this.tagBuffer += this.origText.charAt(this.currentChar);
  76. this.currentChar++;
  77. this.run();
  78. return;
  79. } else if(this.origText.charAt(this.currentChar) == "&" && !this.inHTMLEntity) {
  80. this.HTMLEntityBuffer = "&";
  81. this.inHTMLEntity = true;
  82. this.currentChar++;
  83. this.run();
  84. return;
  85. } else if(this.origText.charAt(this.currentChar) == ";" && this.inHTMLEntity) {
  86. this.HTMLEntityBuffer += ";";
  87. this.inHTMLEntity = false;
  88. this.currentText += this.HTMLEntityBuffer;
  89. this.currentChar++;
  90. this.run();
  91. return;
  92. } else if(this.inHTMLEntity) {
  93. this.HTMLEntityBuffer += this.origText.charAt(this.currentChar);
  94. this.currentChar++;
  95. this.run();
  96. return;
  97. } else {
  98. this.currentText += this.origText.charAt(this.currentChar);
  99. }
  100. this.element.innerHTML = this.currentText;
  101. this.element.innerHTML += (this.currentChar < this.origText.length - 1 ? (typeof this.cursor == "function" ? this.cursor(this.currentText) : this.cursor) : "");
  102. this.currentChar++;
  103. setTimeout("document.getElementById('" + this.element.id + "').typingText.run()", this.interval);
  104. } else {
  105. this.currentText = "";
  106. this.currentChar = 0;
  107. this.running = false;
  108. this.finishedCallback();
  109. }
  110. }
  111. </script>
  112. <p id="message">
  113. <img src='link gambar mu disini' width='300' height='300'>
  114. <br>
  115. <font face='courier new' size='10px' color='red'>TEKS MU DISINI
  116. </font></p>
  117. <script type="text/javascript">
  118. new TypingText(document.getElementById("message"), 50, function(i){ var ar = new Array("\\", "|", "/", "-"); return " " + ar[i.length % ar.length]; });
  119. //Type out examples:
  120. TypingText.runAll();
  121. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement