Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.1 kB
3
Indexable
// ==UserScript==
// @name         Google meet marker
// @namespace    https://meet.google.com/
// @version      0.1
// @description  try to take over the world!
// @author       manakov_dev
// @match        https://meet.google.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    console.log('init')
    const observer = new MutationObserver(function (mutations, mutationInstance) {
        let user_logos = document.querySelectorAll('div[role=listitem] img')
        for(let el of user_logos){
            el.onclick = function(){
                if(el.style.border == ''){
                    el.style.border = '2px solid rgb(0, 153, 0)';
                    el.style.margin = '-2px';
                }else{
                    el.style.border = null;
                    el.style.margin = null;
                }
            }
        }
        console.log('injected')
    });


    observer.observe(document, {
        childList: true,
        subtree:   true
    });
})();