Brainly Plus

Visualize as resposta e remova os paineis irritantes

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         Brainly Plus
// @namespace    brainly
// @version      1.0.0
// @description  Visualize as resposta e remova os paineis irritantes
// @author       Dev4S
// @license      MIT
// @match        https://brainly.com.br/*
// @icon         https://www.google.com/s2/favicons?domain=brainly.com.br
// @run-at       document-start
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    function hookProperty(parent, prop, beforeCallback) {
        let oldValue;

        Object.defineProperty(parent, prop, {
            get: function () {
                return oldValue;
            },
            set: function (newValue) {
                if (oldValue !== newValue){
                    oldValue = beforeCallback(newValue);
                }
            },
            enumerable: true,
            configurable: false,
        });
    }

    hookProperty(window, 'jsData', function (jsData) {
        hookProperty(jsData, 'hasVideoMeteringUnlogEnabled', ()=> false);
        hookProperty(jsData, 'hasVideoMeteringLogEnabled', ()=> false);
        hookProperty(jsData, 'hasVideoMeteringRedesignEnabled', ()=> false);
        hookProperty(jsData, 'hasBrainlyPlusToasterOnLoggedFeed', ()=> false);
        return jsData;
    })
})();