SHARE
TWEET

Untitled

a guest May 20th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let input = document.querySelector('.flexRow > iframe').contentWindow.document.body.querySelector('.input > input');
  2. let btn = document.querySelector('.flexRow > iframe').contentWindow.document.body.querySelector('.input > button');
  3.  
  4. let buttons = document.querySelector('.flexRow > iframe').contentWindow.document.body.querySelector('.bottom-section > .buttons');
  5.  
  6. let substr = 'SPIERDALAJ';
  7.  
  8. let emo = ['ez','ts','ws','cz','dz','ps','bl',];
  9.  
  10. let onStatus = true;
  11. let offStatus = false;
  12.  
  13. let p = 0;
  14.  
  15. let timerCl = 1000;
  16.  
  17. let timer = setInterval(function(){
  18. p++;
  19. if(p === emo.length){p = 0};
  20. input.value =`/avatar ${emo[p]}`;
  21.  
  22. btn.click()
  23. },timerCl)
  24.  
  25.  
  26.  
  27. function deleteNotice(){
  28.     document.querySelector('.flexRow > iframe').contentWindow.document.body.querySelectorAll('.log > p.notice').forEach(cmd => {
  29.         cmd.style.display = 'none';
  30.     });
  31. }
  32.  
  33. let del = setInterval(deleteNotice,timerCl);
  34.  
  35.  
  36. function stopAvatar(){
  37.  
  38.     clearInterval(timer)
  39.     clearInterval(del)
  40. }
  41.  
  42.  
  43. function startAvatar(){
  44.  
  45.  
  46.     timer = setInterval(function(){
  47.         p++;
  48.         if(p === emo.length){p = 0};
  49.         input.value =`/avatar ${emo[p]}`;
  50.        
  51.         btn.click()
  52.         },timerCl)
  53.         del = setInterval(deleteNotice,timerCl)
  54. }
  55.  
  56. let returnOn = (()=>`<button class="on-btn">ON</button>`);
  57. let returnOff = (()=>`<button class="off-btn">OFF</button>`);
  58.  
  59. let returnInput = (()=>`<input class="speed" type="number"><button class="go">OK</button>`);
  60.  
  61. buttons.insertAdjacentHTML('beforeend',returnOn());
  62. buttons.insertAdjacentHTML('beforeend',returnOff());
  63.  
  64. let on = document.querySelector('.flexRow > iframe').contentWindow.document.body.querySelector('.on-btn');
  65. let off = document.querySelector('.flexRow > iframe').contentWindow.document.body.querySelector('.off-btn');
  66. let inp = document.querySelector('.flexRow > iframe').contentWindow.document.body.querySelector('.speed');
  67.  
  68. on.style.backgroundColor = '#3e3e3e';
  69.  
  70. on.addEventListener('click',()=>{
  71.     onStatus = true;
  72.     if(offStatus){
  73.         on.style.backgroundColor = '#3e3e3e'
  74.         off.style.backgroundColor = '#244967'
  75.  
  76.         startAvatar();
  77.  
  78.         offStatus = false;
  79.     }
  80. })
  81.  
  82. off.addEventListener('click',()=>{
  83.     offStatus = true;
  84.     if(onStatus){
  85.         on.style.backgroundColor = '#244967';
  86.         off.style.backgroundColor = '#3e3e3e';
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top