Advertisement
izuemis

cr crditem #4 wipe text

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