AlwaysLoadTranscript

Re-enables sign in capabilities for courses.flvc.org

Verze ze dne 17. 12. 2025. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         AlwaysLoadTranscript
// @namespace    http://theguy920.dev/
// @version      2.1
// @description  Re-enables sign in capabilities for courses.flvc.org
// @author       TheGuy920
// @match        https://courses.flvc.org/Account/StudentLogin*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=flvc.org
// @grant        none
// @license      GPLv3
// ==/UserScript==

(function () {
    'use strict';

    const targetId = 'student-login-button';

    function ensureVisible(el) {
        if (el.style.display === 'none') {
            el.style.removeProperty('display');
        }
    }

    // Observe style changes on the element
    function observeStyle(el) {
        const styleObserver = new MutationObserver(mutations => {
            for (const m of mutations) {
                if (m.type === 'attributes' && m.attributeName === 'style') {
                    ensureVisible(el);
                }
            }
        });

        styleObserver.observe(el, {
            attributes: true,
            attributeFilter: ['style']
        });
    }

    // Observe DOM until element exists
    const domObserver = new MutationObserver(() => {
        const el = document.getElementById(targetId);
        if (!el) return;

        ensureVisible(el);
        observeStyle(el);
        domObserver.disconnect();
    });

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