Brainly Plus

Visualize as resposta e remova os paineis irritantes

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.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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         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;
    })
})();