Greasy Fork is available in English.

Google Forms Breakout Cheat!

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

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(У мене вже є менеджер скриптів, дайте мені встановити його!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==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(',')}`;
        }
    });
});