Телемост яндекс зайти без микро и видео

Заходит на телемост Яндекс в браузере с выключенным микрофоном и видео

  1. // ==UserScript==
  2. // @name Телемост яндекс зайти без микро и видео
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  5. // @description Заходит на телемост Яндекс в браузере с выключенным микрофоном и видео
  6. // @author You
  7. // @match https://telemost.yandex.ru/j/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=yandex.ru
  9. // @grant none
  10. // @license MI
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. if(document.getElementsByClassName('Button2')[0].innerHTML.includes('Хорошо')) {
  16. return
  17. }
  18. const delay = 500;
  19. document.getElementsByClassName('Button2')[0].click();
  20.  
  21. let arrayFunc = [
  22. () => { document. querySelector('[title="Выключить микрофон"]')?.click(); },
  23. () => { document. querySelector('[title="Выключить камеру"]')?.click(); },
  24. () => { document.getElementsByClassName('Button2_view_accent')[0].click(); },
  25. ];
  26. const interval = setInterval(() => {
  27. if(document.getElementsByClassName('Button2_view_translucent').length) {
  28. clearInterval(interval);
  29. doit();
  30. }
  31. }, 500)
  32. const doit = () => {
  33. setTimeout(() => {
  34. console.log(arrayFunc)
  35. arrayFunc[0]();
  36. arrayFunc = arrayFunc.slice(1);
  37. if(arrayFunc.length) {
  38. doit();
  39. }
  40. }, delay);
  41. }
  42. // Your code here...
  43. })();
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.