Skip to content

Instantly share code, notes, and snippets.

@masdeseiscaracteres
Last active March 24, 2021 16:19
Show Gist options
  • Save masdeseiscaracteres/f019f23b6987bc97653b8ea93886e5e8 to your computer and use it in GitHub Desktop.
Save masdeseiscaracteres/f019f23b6987bc97653b8ea93886e5e8 to your computer and use it in GitHub Desktop.
To install these bookmarklets, drag and drop the links to your bookmarks bar:
<ul>
<li><a href="javascript:!function(){var n,e,r,i;n=window,e=document.body,r=JSON.parse,i=JSON.stringify,n.isf||(e.innerHTML="<pre>"+i(r(e.innerText),null,4).replace(/\"(.*)[^\:]\:/g,'<span style="color:#9C3636">$1&colon;</span>')+"</pre>",n.isf=!0)}();">JSON!!</a></li>
<li><a href="javascript:void%20function(){(function(){function%20a(a,b){return{apply:function(d,e,f){if(!e[a].__grid_ran){const%20d=new%20Proxy(e[a],c(e,b));d.__grid_ran=!0,e[a]=d}return%20d.apply(e,f)}}}function%20b(a,b){return{apply:function(d,e,f){if(!f[0][a].__grid_ran){const%20d=new%20Proxy(f[0][a],c(f[0],b));d.__grid_ran=!0,f[0][a]=d}return%20d.apply(e,f)}}}function%20c(a,b){return{get:function(c,d){let%20g=Reflect.get(c,d);return%22function%22==typeof%20g%26%26(g=g.bind(c)),l%26%26%22get%22==d%3Fc=%3E({[b]:(d,h)=%3E{try{return%20f.call(a,d,h)}catch(a){return%20console.error(a),g(c)[b](d,h)}}}):g}}}function%20d(a){return{apply:function(b,c,d){if(!c.isDisposed()){if(!c.__grid_videoElem)for(let%20a%20of%20Object.values(c))a%20instanceof%20HTMLElement%26%26(c.__grid_videoElem=a.parentElement.parentElement.parentElement);c.__grid_videoElem.dataset.allocationIndex%26%26(0%3Cc[a].getVolume()%26%26l%26%26s%3Fc.__grid_videoElem.classList.add(%22__gmgv-speaking%22):c.__grid_videoElem.classList.remove(%22__gmgv-speaking%22))}return%20b.apply(c,d)}}}function%20e(){return{apply:function(a,b,c){if(3===c.length%26%26m){const%20a=Object.values(c[0]).filter(a=%3EArray.isArray(a)).flat().filter(a=%3Ea%20instanceof%20HTMLElement),b=c[2];if(1===a.length){const%20c=a[0];c.parentElement===m.parentElement.parentElement%26%26320===c.clientWidth%26%26m.classList.toggle(%22__gmgv-chat-enabled%22,b)}}return%20a.apply(b,c)}}}function%20f(a){const%20b=a.constructor,e=Object.values(window.default_MeetingsUi).filter(a=%3E%22function%22==typeof%20a).filter(a=%3Ea.toString().includes(%22.attribution%22))[0],f=Object.entries(new%20e(999)).find(a=%3E999===a[1])[0],g=(g,a,b)=%3E{if(a%26%26!g.some(b=%3Eb[f]===a)){const%20c=new%20e(a,{attribution:!w});b%26%26b(c),g.push(c)}},h=a=%3E%22string%22==typeof%20a%26%26a.startsWith(%22spaces/%22),i=a=%3Eb=%3E{for(const[c,d]of%20Object.entries(b))typeof%20d==typeof%20a%26%26%22attribution%22!==c%26%26(b[c]=a)};let%20j,k;for(let%20b%20of%20Object.values(this))if(b%26%26%22object%22==typeof%20b)for(let%20a%20of%20Object.values(b))if(Array.isArray(a)%26%26a.length%26%26a.every(h))if(j%26%26a!=j)throw%20console.log(%22Invalid%20videoKeys%20search!%22,j,a),new%20Error(%22Failed%22);else%20j=a,k=b;if(!k)throw%20new%20Error(%22No%20other%20participants,%20using%20default%20layout%22);let%20l;for(let%20b%20of%20Object.values(k))b%20instanceof%20Map%26%26b.size%26%26Array.from(b.keys()).every(h)%26%26(l=b);let%20m=null;for(let%20b%20of%20Object.values(k))if(b%26%26%22object%22==typeof%20b%26%26b.$goog_Thenable)for(let%20a%20of%20Object.values(b))h(a)%26%26(m=l.get(a)||null);let%20n=[];for(const%20b%20of%20j)g(n,l.get(b),i(w%3F0:2));if(t%26%26g(n,m,i(w%3F0:2)),r%26%26!w){const%20a=[/\.call\(this\)/,/\.call\(this,.*,%22a%22\)/,/new%20Set;this\.\w+=new%20_/,/new%20Map.*new%20Set/,/%22un%22.*%22li%22/,/new%20Map/,/Object/];n=n.filter(b=%3E{let%20c=[b[f]];for(let%20d%20of%20a){let%20a=[];for(let%20b%20of%20c)a=a.concat(Object.values(b).filter(a=%3Ea%26%26a.constructor%26%26d.test(a.constructor.toString())));c=a}return%20c.some(a=%3Ea%26%26a.state%26%26%22li%22===a.state)})}if(n.length||g(n,m),n.sort((c,a)=%3Ec[f].name.localeCompare(a[f].name)||c[f].id.localeCompare(a[f].id)),o=n.findIndex(a=%3Ea[f].isPinned()),0%3Eo%26%26(o=n.findIndex(a=%3E!!a[f].parent)),w){const%20a=new%20Set(n.map(a=%3Ea[f].getId()));q.forEach(b=%3E{b.active=a.has(b.id)}),n.forEach(a=%3E{const%20b=a[f],c=b.getId(),d=b.getName(),e=!!b.parent;if(!p.has(c))for(let%20a=0;a%3C=q.size;a++){const%20b=`${d}|${e}|${a}`;let%20f=q.get(b);if(!(f%26%26f.active%26%26f.id!==c))return%20f||(f={order:q.size}),f.active=!0,f.id=c,q.set(b,f),void%20p.set(c,f.order)}});for(let%20b%20of%20p.keys())a.has(b)||p.delete(b)}return%20new%20b(n)}function%20g(a){w=C.checked=a,localStorage.setItem(%22gmgv-screen-capture-mode%22,w),y.checked=!a%26%26r,y.disabled=a,y.parentElement.classList.toggle(%22disabled%22,a),z.checked=!a%26%26s,z.disabled=a,z.parentElement.classList.toggle(%22disabled%22,a),a||(p=new%20Map,q=new%20Map)}const%20h={ca:{showOnlyVideo:%22Mostra%20nom\xE9s%20els%20participants%20amb%20video%22,highlightSpeaker:%22Ressalta%20el%20que%20parla%22,includeOwnVideo:%22Inclou%20el%20meu%20video%20a%20la%20graella%22},de:{showOnlyVideo:%22Nur%20Teilnehmer%20mit%20Video%20anzeigen%22,highlightSpeaker:%22Sprecher%20hervorheben%22,includeOwnVideo:%22Mich%20im%20Raster%20anzeigen%22},en:{showOnlyVideo:%22Only%20show%20participants%20with%20video%22,highlightSpeaker:%22Highlight%20speakers%22,includeOwnVideo:%22Include%20yourself%20in%20the%20grid%22,autoEnable:%22Enable%20grid%20view%20by%20default%22,notRunning:%22Grid%20View%20is%20not%20running%20on%20this%20page%22,noMeeting:%22Grid%20View%20does%20not%20run%20until%20you%20join%20the%20meeting%22,enabled:%22Enable%20Grid%20View%22,sourceCode:%22Source%20Code%20available%20on%20Github%22,screenCaptureMode:%22Enable%20Screen%20Capture%20Mode%22,screenCaptureModeDescription:%22Forces%2016:9,%20Disables%20names,%20Locks%20videos%20in%20place%22,unauthorizedWarning:%22WARNING:%20This%20is%20an%20unauthorized%20extension.%20Please%20install%20the%20official%20release%20by%20clicking%20here.%22},es:{showOnlyVideo:%22Unicamente%20mostrar%20participantes%20con%20video%22,highlightSpeaker:%22Resaltar%20participantes%22,includeOwnVideo:%22Incluir%20mi%20video%20en%20el%20grid%22},fr:{showOnlyVideo:%22Ne%20montrer%20que%20les%20participants%20avec%20cam\xE9ra%22,highlightSpeaker:%22Surligner%20ceux%20qui%20parlent%22,includeOwnVideo:%22Vous%20inclure%20dans%20la%20grille%22},hr:{showOnlyVideo:%22Prika\u017Ei%20samo%20sudionike%20sa%20kamerom%22,highlightSpeaker:%22Naglasi%20govornike%22,includeOwnVideo:%22Uklju\u010Di%20sebe%20u%20mre\u017Enom%20prikazu%22},it:{showOnlyVideo:%22Mostra%20solo%20i%20partecipanti%20con%20la%20fotocamera%20attiva%22,highlightSpeaker:%22Illumina%20chi%20sta%20parlando%22,includeOwnVideo:%22Includi%20te%20stesso%20nella%20griglia%22,autoEnable:%22Attiva%20sempre%20la%20griglia%22,notRunning:%22Grid%20View%20non%20funziona%20in%20questa%20pagina%22,noMeeting:%22Grid%20View%20non%20funziona%20se%20non%20sei%20connesso%22,enabled:%22Attiva%20Grid%20View%22,sourceCode:%22Il%20codice%20sorgente%20\xE8%20disponibile%20su%20Github%22,screenCaptureMode:%22Attiva%20la%20modali\xE0%20registrazione%20della%20schermata%22,screenCaptureModeDescription:%22Forza%2016:9,%20Disattiva%20i%20nomi,%20Blocca%20i%20video%20nella%20posizione%22,unauthorizedWarning:%22ATTENZIONE:%20Questa%20estensione%20non%20\xE8%20autorizzata.%20Installa%20la%20versione%20ufficiale%20cliccando%20qua.%22},ja:{showOnlyVideo:%22\u30AB\u30E1\u30E9\u3092\u30AA\u30F3\u306B\u3057\u3066\u3044\u308B\u53C2\u52A0\u8005\u306E\u307F%22,highlightSpeaker:%22\u767A\u8A00\u8005\u3092\u30CF\u30A4\u30E9\u30A4\u30C8%22,includeOwnVideo:%22\u81EA\u5206\u3092\u542B\u3081\u308B%22},nl:{showOnlyVideo:%22Toon%20alleen%20deelnemers%20met%20video%22,highlightSpeaker:%22Highlight%20sprekers%22,includeOwnVideo:%22Toon%20jezelf%20in%20het%20raster%22,autoEnable:%22Raster%20standaard%20automatisch%20inschakelen%22,notRunning:%22Het%20raster%20staat%20niet%20aan%20op%20deze%20pagina%22,noMeeting:%22Het%20raster%20is%20pas%20zichtbaar%20als%20er%20aan%20een%20meeting%20wordt%20deelgenomen%22,enabled:%22Zet%20het%20raster%20aan%22,sourceCode:%22Broncode%20is%20beschikbaar%20op%20Github%22,screenCaptureMode:%22Zet%20Screen%20Capture%20Mode%20aan%22,screenCaptureModeDescription:%22Forceer%2016:9,%20Schakel%20namen%20uit,%20Zet%20video's%20vast%20op%20hun%20plek%22},pl:{showOnlyVideo:%22Poka\u017C%20tylko%20uczestnik\xF3w%20z%20wideo%22,highlightSpeaker:%22Wyr\xF3\u017Cnij%20osob\u0119%20prezentuj\u0105c\u0105%22,includeOwnVideo:%22Uwzgl\u0119dnij%20siebie%22},pt:{showOnlyVideo:%22Mostrar%20somente%20participantes%20com%20v\xEDdeo%22,highlightSpeaker:%22Destacar%20quem%20est\xE1%20falando%22,includeOwnVideo:%22Incluir%20meu%20v\xEDdeo%20no%20grid%22,autoEnable:%22Habilitar%20visualiza\xE7\xE3o%20em%20grid%20por%20padr\xE3o%22,notRunning:%22Visualiza\xE7\xE3o%20em%20grid%20n\xE3o%20est\xE1%20habilitado%20nesta%20p\xE1gina%22,noMeeting:%22Visualiza\xE7\xE3o%20em%20grid%20n\xE3o%20funciona%20at\xE9%20que%20vocie%20entre%20em%20uma%20confer\xEAncia%22,enabled:%22Habilitar%20visualiza\xE7\xE3o%20em%20grid%22,sourceCode:%22C\xF3digo%20fonte%20dispon\xEDvel%20no%20Github%22,screenCaptureMode:%22Habilitar%20captura%20de%20tela%22,screenCaptureModeDescription:%22For\xE7ar%20aspecto%2016:9,%20Desabilitar%20nomes,%20Travar%20posi\xE7\xE3o%20dos%20v\xEDdeos%22,unauthorizedWarning:%22ATEN\xC7\xC3O:%20Esta%20\xE9%20uma%20extens\xE3o%20n\xE3o%20autorizada.%20Por%20favor,%20instale%20a%20vers\xE3o%20oficial%20clicando%20aqui.%22},sv:{showOnlyVideo:%22Visa%20endast%20deltagare%20med%20video%22,highlightSpeaker:%22Markera/f\xF6lj%20talare%22,includeOwnVideo:%22Inkludera%20mig%20i%20rutn\xE4tet%22},uk:{showOnlyVideo:%22\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0438%20\u043B\u0438\u0448\u0435%20\u0443\u0447\u0430\u0441\u043D\u0438\u043A\u0456\u0432%20\u0437%20\u0432\u0456\u0434\u0435\u043E%22,highlightSpeaker:%22\u0412\u0438\u0434\u0456\u043B\u0438\u0442\u0438%20\u0432\u0435\u0434\u0443\u0447\u043E\u0433\u043E%22,includeOwnVideo:%22\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u0438%20\u0441\u0435\u0431\u0435%22},zh:{showOnlyVideo:%22\u4EC5\u663E\u793A\u6709\u89C6\u8BAF\u7684\u4E0E\u4F1A\u8005%22,highlightSpeaker:%22\u5F3A\u8C03\u53D1\u8A00\u8005%22,includeOwnVideo:%22\u5C06\u81EA\u5DF1\u7684\u89C6\u8BAF\u663E\u793A\u4E8E\u7F51\u683C\u4E2D%22},%22zh-TW%22:{showOnlyVideo:%22\u50C5\u986F\u793A\u6709\u8996\u8A0A\u7684\u8207\u6703\u8005%22,highlightSpeaker:%22\u5F37\u8ABF\u767C\u8A00\u8005%22,includeOwnVideo:%22\u5C07\u81EA\u5DF1\u7684\u8996\u8A0A\u986F\u793A\u65BC\u7DB2\u683C\u4E2D%22}},i=a=%3Enavigator.languages.concat([%22en%22]).map(b=%3Eh[b]%26%26h[b][a]||h[b.split(%22-%22)[0]]%26%26h[b.split(%22-%22)[0]][a]).find(a=%3Ea),j=%22%3Cpath%20fill=\%22currentColor\%22%20d=\%22M0,2.77L1.28,1.5L22.5,22.72L21.23,24L19.23,22H4C2.92,22%202,21.1%202,20V4.77L0,2.77M10,4V7.68L8,5.68V4H6.32L4.32,2H20A2,2%200%200,1%2022,4V19.7L20,17.7V16H18.32L16.32,14H20V10H16V13.68L14,11.68V10H12.32L10.32,8H14V4H10M16,4V8H20V4H16M16,20H17.23L16,18.77V20M4,8H5.23L4,6.77V8M10,14H11.23L10,12.77V14M14,20V16.77L13.23,16H10V20H14M8,20V16H4V20H8M8,14V10.77L7.23,10H4V14H8Z\%22%20/%3E%22,k=document.createElement(%22style%22);k.innerText=`%20%20%20%20.__gmgv-vid-container%20{%20%20%20%20%20%20display:%20grid;%20%20%20%20%20%20grid-auto-rows:%201fr;%20%20%20%20%20%20top:%2050px%20!important;%20%20%20%20%20%20right:%202px%20!important;%20%20%20%20%20%20left:%202px%20!important;%20%20%20%20%20%20bottom:%202px%20!important;%20%20%20%20}%20%20%20%20.__gmgv-vid-container.__gmgv-chat-enabled%20{%20%20%20%20%20%20right:%20325px%20!important;%20%20%20%20}%20%20%20%20.__gmgv-vid-container.__gmgv-screen-capture-mode%20{%20%20%20%20%20%20right:%20325px%20!important;%20%20%20%20%20%20bottom:%2090px%20!important;%20%20%20%20%20%20z-index:%2010;%20%20%20%20%20%20background:%20%23111;%20%20%20%20}%20%20%20%20.__gmgv-vid-container.__gmgv-screen-capture-mode%20.__gmgv-screen-capture-mode-unknown-participant%20{%20%20%20%20%20%20display:%20none;%20%20%20%20}%20%20%20%20.__gmgv-vid-container%20%3E%20div%20{%20%20%20%20%20%20position:%20relative%20!important;%20%20%20%20%20%20margin-top:%200%20!important;%20%20%20%20%20%20top:%200%20!important;%20%20%20%20%20%20left:%200%20!important;%20%20%20%20%20%20height:%20100%25%20!important;%20%20%20%20%20%20width:%20100%25%20!important;%20%20%20%20%20%20background:%200%200%20!important;%20%20%20%20}%20%20%20%20.__gmgv-vid-container%20%3E%20div:after%20{%20%20%20%20%20%20content:%20%22%22;%20%20%20%20%20%20display:%20block;%20%20%20%20%20%20position:%20absolute;%20%20%20%20%20%20top:%200;%20%20%20%20%20%20left:%200;%20%20%20%20%20%20right:%200;%20%20%20%20%20%20bottom:%200;%20%20%20%20%20%20border:%200.4em%20solid%20%2364ffda;%20%20%20%20%20%20box-sizing:%20border-box;%20%20%20%20%20%20transition:%20opacity%20300ms%20linear%20500ms;%20%20%20%20%20%20opacity:%200;%20%20%20%20%20%20z-index:%20-1;%20%20%20%20}%20%20%20%20.__gmgv-vid-container%20%3E%20div%20%3E%20div:first-child,%20%20%20%20.__gmgv-vid-container%20%3E%20div%20%3E%20div:nth-child(2)%20{%20%20%20%20%20%20z-index:%20-2;%20%20%20%20}%20%20%20%20.__gmgv-vid-container:not(.__gmgv-screen-capture-mode)%20%3E%20div.__gmgv-speaking:after%20{%20%20%20%20%20%20transition:%20opacity%2060ms%20linear;%20%20%20%20%20%20opacity:%201;%20%20%20%20%20%20z-index:%201;%20%20%20%20}%20%20%20%20.__gmgv-button%20{%20%20%20%20%20%20overflow:%20visible%20!important;%20%20%20%20}%20%20%20%20.__gmgv-button%20%3E%20div%20{%20%20%20%20%20%20box-sizing:%20border-box;%20%20%20%20%20%20display:%20none;%20%20%20%20%20%20position:%20absolute;%20%20%20%20%20%20top:%2040px;%20%20%20%20%20%20left:%200;%20%20%20%20%20%20width:%20300px;%20%20%20%20%20%20padding:%2012px;%20%20%20%20%20%20background:%20white;%20%20%20%20%20%20border-radius:%200%200%200%208px;%20%20%20%20%20%20text-align:%20left;%20%20%20%20%20%20cursor:%20auto;%20%20%20%20%20%20line-height:%200;%20%20%20%20}%20%20%20%20.__gmgv-button:hover%20%3E%20div%20{%20%20%20%20%20%20display:%20block;%20%20%20%20}%20%20%20%20.__gmgv-button%20%3E%20div%20label%20{%20%20%20%20%20%20display:%20block;%20%20%20%20%20%20line-height:%2024px;%20%20%20%20%20%20color:%20%23999999;%20%20%20%20}%20%20%20%20.__gmgv-button%20%3E%20div%20label:not(.disabled)%20{%20%20%20%20%20%20cursor:%20pointer;%20%20%20%20%20%20color:%20%23000000;%20%20%20%20}%20%20%20%20.__gmgv-button%20%3E%20div%20label%20small%20{%20%20%20%20%20%20display:%20block;%20%20%20%20%20%20line-height:%2012px;%20%20%20%20%20%20font-weight:%20400;%20%20%20%20}%20%20%20%20.__gmgv-button%20%3E%20div%20hr%20{%20%20%20%20%20%20border:%200;%20%20%20%20%20%20height:%201px;%20%20%20%20%20%20background:%20%23f1f3f4;%20%20%20%20}%20%20%20%20.__gmgv-button%20%3E%20div%20a%20{%20%20%20%20%20%20display:%20inline-block;%20%20%20%20%20%20line-height:%2020px;%20%20%20%20}%20%20`,document.body.append(k);let%20l=null,m=null,o=-1,p=new%20Map,q=new%20Map,r=%22true%22===localStorage.getItem(%22gmgv-show-only-video%22),s=%22true%22===localStorage.getItem(%22gmgv-highlight-speaker%22),t=%22true%22===localStorage.getItem(%22gmgv-include-own-video%22),u=%22true%22===localStorage.getItem(%22gmgv-auto-enable%22),w=%22true%22===localStorage.getItem(%22gmgv-screen-capture-mode%22),x=null,y=null,z=null,A=null,B=null,C=null;const%20D=()=%3E{var%20a=Math.floor,b=Math.min,c=Math.ceil;let%20d;if(w){d=c(Math.sqrt(q.size));const%20e=a(b((innerWidth-327)/(16*d),(innerHeight-140)/(9*d)));m.style.marginLeft=`${innerWidth-325-16*(e*d)}px`,m.style.marginTop=`${innerHeight-140-9*(e*d)}px`}else{const%20a=innerWidth/14,e=(innerHeight-50)/9;let%20f=m.children.length;0%3C=o%26%26o%3Cf%26%26(f=c(4/3*(f-1)));let%20g=0;for(d=1;9%3Ed;d++){let%20h=b(a/d,e/c(f/d));if(h%3Cg){d--;break}g=h}m.style.marginLeft=%22%22,m.style.marginTop=%22%22}m.classList.toggle(%22__gmgv-screen-capture-mode%22,w),m.style.gridTemplateColumns=`repeat(${d},%201fr)`,m.style.gridTemplateRows=w%3F`repeat(${d},%201fr)`:%22%22;for(let%20b%20of%20m.children)if(w){const%20c=!p.has(b.dataset.requestedParticipantId);if(b.classList.toggle(%22__gmgv-screen-capture-mode-unknown-participant%22,c),b.style.order=%22%22,!c){const%20c=p.get(b.dataset.requestedParticipantId);b.style.gridArea=`${1+a(c/d)}%20/%20${1+c%25d}`}}else%20if(+b.dataset.allocationIndex===o){const%20a=c(d/2);b.style.order=-1,b.style.gridArea=`span%20${a}%20/%20span%20${a}`}else%20b.style.order=b.dataset.allocationIndex,b.style.gridArea=%22%22},E=()=%3E{clearInterval(l),l=null,m.classList.remove(%22__gmgv-vid-container%22),x.innerHTML=j,m.style.marginLeft=%22%22,m.style.marginTop=%22%22},F=()=%3E{l%26%26clearInterval(l),l=setInterval(D,250),m.classList.add(%22__gmgv-vid-container%22),x.innerHTML=%22%3Cpath%20fill=\%22currentColor\%22%20d=\%22M10,4V8H14V4H10M16,4V8H20V4H16M16,10V14H20V10H16M16,16V20H20V16H16M14,20V16H10V20H14M8,20V16H4V20H8M8,14V10H4V14H8M8,8V4H4V8H8M10,14H14V10H10V14M4,2H20A2,2%200%200,1%2022,4V20A2,2%200%200,1%2020,22H4C2.92,22%202,21.1%202,20V4A2,2%200%200,1%204,2Z\%22%20/%3E%22},G=()=%3E{l%3FE():F()},H=%22undefined%22!=typeof%20GM%26%26GM%26%26GM.info%26%26GM.info.script%26%26%22https://fugi.tech/%22===GM.info.script.namespace||document.currentScript%26%26%22chrome-extension://kklailfgofogmmdlhgmjgenehkjoioip/grid.user.js%22===document.currentScript.src;let%20I=!0;setInterval(()=%3E{const%20c=document.querySelector(%22[data-allocation-index]%22),f=c%26%26c.parentElement;f%26%26f!==m%26%26(m=f,l%26%26F());const%20h=document.querySelector(%22[data-fps-request-screencast-cap]%22),k=h%26%26h.parentElement.parentElement.parentElement;if(k%26%26!k.__grid_ran){k.__grid_ran=!0,k.parentElement.parentElement.style.zIndex=10,k.prepend(k.children[1].cloneNode());const%20a=document.createElement(%22div%22);a.classList=k.children[1].classList,a.classList.add(%22__gmgv-button%22),a.style.display=%22flex%22,a.onclick=G,k.prepend(a),x=document.createElementNS(%22http://www.w3.org/2000/svg%22,%22svg%22),x.style.width=%2224px%22,x.style.height=%2224px%22,x.setAttribute(%22viewBox%22,%220%200%2024%2024%22),x.innerHTML=j,a.appendChild(x);const%20b=document.createElement(%22div%22);b.onclick=a=%3Ea.stopPropagation(),a.appendChild(b);const%20c=document.createElement(%22label%22);y=document.createElement(%22input%22),y.type=%22checkbox%22,y.checked=r,y.onchange=a=%3E{r=a.target.checked,localStorage.setItem(%22gmgv-show-only-video%22,r)},c.innerText=i(%22showOnlyVideo%22),c.prepend(y),b.appendChild(c);const%20d=document.createElement(%22label%22);z=document.createElement(%22input%22),z.type=%22checkbox%22,z.checked=s,z.onchange=a=%3E{s=a.target.checked,localStorage.setItem(%22gmgv-highlight-speaker%22,s)},d.innerText=i(%22highlightSpeaker%22),d.prepend(z),b.appendChild(d);const%20e=document.createElement(%22label%22);A=document.createElement(%22input%22),A.type=%22checkbox%22,A.checked=t,A.onchange=a=%3E{t=a.target.checked,localStorage.setItem(%22gmgv-include-own-video%22,t)},e.innerText=i(%22includeOwnVideo%22),e.prepend(A),b.appendChild(e);const%20f=document.createElement(%22label%22);B=document.createElement(%22input%22),B.type=%22checkbox%22,B.checked=u,B.onchange=a=%3E{u=a.target.checked,localStorage.setItem(%22gmgv-auto-enable%22,u)},f.innerText=i(%22autoEnable%22),f.prepend(B),b.appendChild(f),b.appendChild(document.createElement(%22hr%22));const%20h=document.createElement(%22label%22);C=document.createElement(%22input%22),C.type=%22checkbox%22,C.checked=w,C.onchange=a=%3E{g(a.target.checked)},h.innerText=i(%22screenCaptureMode%22),h.prepend(C);const%20l=document.createElement(%22small%22);l.innerText=i(%22screenCaptureModeDescription%22),h.append(l),b.appendChild(h);const%20m=document.createElement(%22a%22);m.target=%22_blank%22,m.href=%22https://chrome.google.com/webstore/detail/google-meet-grid-view/kklailfgofogmmdlhgmjgenehkjoioip%22,m.innerText=i(%22unauthorizedWarning%22),H||(b.appendChild(document.createElement(%22hr%22)),b.appendChild(m)),g(w)}if(window.default_MeetingsUi){let%20c;for(let[f,g]of%20Object.entries(window.default_MeetingsUi)){if(g%26%26g.prototype)for(let%20b%20of%20Object.keys(g.prototype)){const%20e=Object.getOwnPropertyDescriptor(g.prototype,b);if(e%26%26e.value%26%26!g.prototype[b].__grid_ran){if(c=/this\.([A-Za-z]+)\.get\([A-Za-z]+\)\.([A-Za-z]+)\(this\.[A-Za-z]+\)/.exec(e.value.toString()),c){console.log(%22[google-meet-grid-view]%20Successfully%20hooked%20into%20rendering%20pipeline%22,g.prototype[b]);const%20d=new%20Proxy(g.prototype[b],a(c[1],c[2]));d.__grid_ran=!0,g.prototype[b]=d}if(c=/this\.([A-Za-z]+)\.getVolume\(\)/.exec(e.value.toString()),c){console.log(%22[google-meet-grid-view]%20Successfully%20hooked%20into%20volume%20detection%22,g.prototype[b]);const%20a=new%20Proxy(g.prototype[b],d(c[1]));a.__grid_ran=!0,g.prototype[b]=a}}}if(g%26%26%22function%22==typeof%20g%26%26!g.__grid_ran){if(c=/function\(a,b,c\){return!0===c\%3F/.exec(g.toString()),c){console.log(%22[google-meet-grid-view]%20Successfully%20hooked%20into%20chat%20toggle%22,g);const%20a=new%20Proxy(g,e());a.__grid_ran=!0,window.default_MeetingsUi[f]=a}if(c=/\.([A-Za-z]+)\.get\(.*window\.innerWidth,window\.innerHeight\)\);[A-Za-z]+=[A-Za-z]+\.([A-Za-z]+)\(/.exec(g.toString()),c){console.log(%22[google-meet-grid-view]%20Successfully%20hooked%20into%20rendering%20pipeline%20v2%22,g);const%20a=new%20Proxy(g,b(c[1],c[2]));a.__grid_ran=!0,window.default_MeetingsUi[f]=a}}}}I%26%26m%26%26k%26%26(I=!1,u%26%26F())},250),window.addEventListener(%22message%22,a=%3E{if(a.source===window%26%26%22gmgv_content%22===a.data.sender)try{switch(a.data.type){case%22getState%22:window.postMessage({id:a.data.id,sender:%22gmgv_user%22,inMeeting:!!m,enabled:!!l,showOnlyVideo:r,highlightSpeaker:s,includeOwnVideo:t,autoEnable:u,screenCaptureMode:w,languages:navigator.languages,translations:h});break;case%22setEnabled%22:a.data.value%3FF():E(),window.postMessage({id:a.data.id,sender:%22gmgv_user%22,success:!0});break;case%22setShowOnlyVideo%22:r=y.checked=a.data.value,localStorage.setItem(%22gmgv-show-only-video%22,r),window.postMessage({id:a.data.id,sender:%22gmgv_user%22,success:!0});break;case%22setHighlightSpeaker%22:s=z.checked=a.data.value,localStorage.setItem(%22gmgv-highlight-speaker%22,s),window.postMessage({id:a.data.id,sender:%22gmgv_user%22,success:!0});break;case%22setIncludeOwnVideo%22:t=A.checked=a.data.value,localStorage.setItem(%22gmgv-include-own-video%22,t),window.postMessage({id:a.data.id,sender:%22gmgv_user%22,success:!0});break;case%22setAutoEnable%22:u=B.checked=a.data.value,localStorage.setItem(%22gmgv-auto-enable%22,u),window.postMessage({id:a.data.id,sender:%22gmgv_user%22,success:!0});break;case%22setScreenCaptureMode%22:g(a.data.value),window.postMessage({id:a.data.id,sender:%22gmgv_user%22,success:!0});break;default:window.postMessage({id:a.data.id,sender:%22gmgv_user%22,error:%22unknown%20message%22});}}catch(b){window.postMessage({id:a.data.id,sender:%22gmgv_user%22,error:b})}})})()}();">Grid View for GMeet</a></li>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment