Advertisement
applepik

downloading data typing text

Apr 6th, 2021 (edited)
2,935
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.55 KB | None | 0 0
  1. <head>
  2. <script type="text/javascript">
  3. // <![CDATA[
  4. var news=Array("• downloading data ██████████████████████████████ 80%");
  5. var cursor=""; // set cursor
  6. var delay=8; // seconds between each news item
  7.  
  8. /***************************\
  9. * News Ticker Text Effect *
  10. *(c)2004-14 mf2fm web-design*
  11. * http://mf2fm.com/rv *
  12. * DON'T EDIT BELOW THIS BOX *
  13. \***************************/
  14. var newsp, cursp, flash, item=0;
  15.  
  16. if (typeof('addRVLoadEvent')!='function') function addRVLoadEvent(funky) {
  17. var oldonload=window.onload;
  18. if (typeof(oldonload)!='function') window.onload=funky;
  19. else window.onload=function() {
  20. if (oldonload) oldonload();
  21. funky();
  22. }
  23. }
  24.  
  25. addRVLoadEvent(teleprint);
  26.  
  27. function teleprint () { if (document.getElementById) {
  28. var span=document.getElementById("news");
  29. while (span.childNodes.length) span.removeChild(span.childNodes[0]);
  30. delay*=1000;
  31. newsp=document.createElement("span");
  32. cursp=document.createElement("span");
  33. cursp.appendChild(document.createTextNode(String.fromCharCode(160)+cursor));
  34. span.appendChild(newsp);
  35. span.appendChild(cursp);
  36. ticker();
  37. }}
  38.  
  39. function ticker() {
  40. var i;
  41. while (newsp.childNodes.length) newsp.removeChild(newsp.childNodes[0]);
  42. newsp.appendChild(document.createTextNode(news[item].substring(0,1)));
  43. for (i=1; i<news[item].length; i++) setTimeout('newsp.firstChild.nodeValue="'+news[item].substring(0, i+1)+'"', 100*i);
  44. if (news[item].indexOf("www")!=-1) setTimeout('linkit('+item+')', 100*i);
  45. setTimeout('flash=setInterval("http://cursp.style.visibility=(http://cursp.style.visibility==\'visible\')?\'hidden\':\'visible\'", 234)', 100*i)
  46. setTimeout('clearInterval(flash)', delay);
  47. setTimeout('http://cursp.style.visibility="visible"', delay);
  48. setTimeout('ticker()', delay);
  49. item=++item%news.length;
  50. }
  51.  
  52. function linkit(q) {
  53. var a,p,e,l;
  54. p=news[q].indexOf("www");
  55. e=news[q].indexOf(" ", p);
  56. if (e==-1) e=news[q].length;
  57. l=news[q].substring(p, e);
  58. while (newsp.childNodes.length) newsp.removeChild(newsp.childNodes[0]);
  59. newsp.appendChild(document.createTextNode(news[q].substring(0, p)));
  60. a=document.createElement("a");
  61. a.href="http://"+l;
  62. a.appendChild(document.createTextNode(l));
  63. newsp.appendChild(a);
  64. newsp.appendChild(document.createTextNode(news[q].substring(e)));
  65. }
  66. // ]]>
  67. </script>
  68. <style>
  69. h2 {
  70. color: #ffffff;
  71. font-family: "arial";
  72. font-size: 55%;
  73. font-weight:light;
  74. text-shadow: 0rem 0rem 0.500rem #ffffff00;
  75. text-align: left
  76. }
  77. </style>
  78. <h2><span id="news"></span>
  79. </h2>
  80. </head>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement