Заходит на телемост Яндекс в браузере с выключенным микрофоном и видео
// ==UserScript==
// @name Телемост яндекс зайти без микро и видео
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Заходит на телемост Яндекс в браузере с выключенным микрофоном и видео
// @author You
// @match https://telemost.yandex.ru/j/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=yandex.ru
// @grant none
// @license MI
// ==/UserScript==
(function() {
'use strict';
if(document.getElementsByClassName('Button2')[0].innerHTML.includes('Хорошо')) {
return
}
const delay = 500;
document.getElementsByClassName('Button2')[0].click();
let arrayFunc = [
() => { document. querySelector('[title="Выключить микрофон"]')?.click(); },
() => { document. querySelector('[title="Выключить камеру"]')?.click(); },
() => { document.getElementsByClassName('Button2_view_accent')[0].click(); },
];
const interval = setInterval(() => {
if(document.getElementsByClassName('Button2_view_translucent').length) {
clearInterval(interval);
doit();
}
}, 500)
const doit = () => {
setTimeout(() => {
console.log(arrayFunc)
arrayFunc[0]();
arrayFunc = arrayFunc.slice(1);
if(arrayFunc.length) {
doit();
}
}, delay);
}
// Your code here...
})();