Google Forms Breakout Cheat!

For teachers who put students through Google Forms "Breakout Rooms".

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name         Google Forms Breakout Cheat!
// @description  For teachers who put students through Google Forms "Breakout Rooms".
// @icon         https://i.imgur.com/ORAaPzD.png
// @version      1

// @author       VillainsRule
// @namespace    https://villainsrule.xyz

// @match        https://docs.google.com/forms/*
// @run-at       document-start
// @grant        none
// ==/UserScript==

window.addEventListener('load', () => {
    const allFormSections = FB_PUBLIC_LOAD_DATA_.find(e => Array.isArray(e)).find(e => Array.isArray(e));
    const domSections = document.querySelectorAll('[data-params]');

    domSections.forEach((element) => {
        const sectId = element.getAttribute('data-params').match(/\[([0-9]+),/)
        const sect = allFormSections.find(i => i[0] === Number(sectId[1]));

        const possibleAnswers = sect[4]?. /* validation */ [0]?. /* first validator */ [4]?. /* i think 4 = valid idek */ [0]?. /* i dislike gf */ [2] /* the possible answers */;
        if (possibleAnswers) {
            const descElement = element.querySelector('div[role="heading"]')?.parentElement?.children[1];
            const prefix = descElement.innerText.length > 0 ? '\n\n' : '';
            if (descElement) descElement.textContent = prefix + `possible answers: ${possibleAnswers.map(e => `"${e}"`).join(',')}`;
        }
    });
});