Advertisement
aohitsugi

changing title text

Jun 11th, 2023
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. <script type="text/javascript">
  2.  
  3. function tb8_makeArray(n){
  4.  
  5. this.length = n;
  6.  
  7. return this.length;
  8.  
  9. }
  10.  
  11. tb8_messages = new tb8_makeArray(3);
  12.  
  13. tb8_messages[0] = "and so the first dragonborn";
  14.  
  15. tb8_messages[1] = "meets the last dragonborn";
  16.  
  17. tb8_messages[2] = " at the summit of apocrypha";
  18.  
  19. tb8_rptType = 'infinite';
  20.  
  21. tb8_rptNbr = 5;
  22.  
  23. tb8_speed = 100;
  24.  
  25. tb8_delay = 500;
  26.  
  27. var tb8_counter=1;
  28.  
  29. var tb8_currMsg=0;
  30.  
  31. var tb8_tekst ="";
  32.  
  33. var tb8_i=0;
  34.  
  35. var tb8_TID = null;
  36.  
  37. function tb8_pisi(){
  38.  
  39. tb8_tekst = tb8_tekst + tb8_messages[tb8_currMsg].substring(tb8_i, tb8_i+1);
  40.  
  41. document.title = tb8_tekst;
  42.  
  43. tb8_sp=tb8_speed;
  44.  
  45. tb8_i++;
  46.  
  47. if (tb8_i==tb8_messages[tb8_currMsg].length){
  48.  
  49. tb8_currMsg++; tb8_i=0; tb8_tekst="";tb8_sp=tb8_delay;
  50.  
  51. }
  52.  
  53. if (tb8_currMsg == tb8_messages.length){
  54.  
  55. if ((tb8_rptType == 'finite') && (tb8_counter==tb8_rptNbr)){
  56.  
  57. clearTimeout(tb8_TID);
  58.  
  59. return;
  60.  
  61. }
  62.  
  63. tb8_counter++;
  64.  
  65. tb8_currMsg = 0;
  66.  
  67. }
  68.  
  69. tb8_TID = setTimeout("tb8_pisi()", tb8_sp);
  70.  
  71. }
  72.  
  73. tb8_pisi()
  74.  
  75. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement