Unlock Brainly

Remove o bloqueio do brainly.

Versión del día 07/10/2021. Echa un vistazo a la versión más reciente.

// ==UserScript==
// @name         Unlock Brainly
// @namespace    Unlock Brainly
// @version      3.2
// @description  Remove o bloqueio do brainly.
// @author       Ricardo Franco
// @match        https://*.brainly.com.br/*
// @icon         data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAToAAACgCAMAAACrFlD/AAAA7VBMVEX///8AAABg05lV0ZN5eXn29vahoaFa0paK3rIXFxfN8N5lZWVWVla1tbXLy8tc0pfX8uPY2Nh/f39j2p7i4uJ42ah/2qteXl7BwcHs7Ozc3NxAQED4+Phvb2+fn59ISEirq6stLS2VlZWNjY0fHx80NDSwsLBNTU0mJiYSEhJCQkJiYmL1/PmFhYXQ0NBo1Z7q+fG56tCg48Ct5sje9enG7tmT4LgwaExbyJFIm3G06c0LFxEcOCorXEM6iGF8vJxMqHoZNyc7flwTKh5TsoIhSjUuZUlMnnVHkGsgLycTJBtWu4gjRDMQAAy528lg/YHiAAAQV0lEQVR4nO2daWPithaGDcZA2AwMJGYLBhIISdgJ06ad3ul0uV3v//8515I3rbZkjLLx9kvHGFt+ciSdc3QsNO0saRkt6zo3fulWvDV1rfFVLwOUe+mmvBn1W7Xx4C4T6oxOQIZlD3oXGUJndJHqNOxmhWR2RhctozsdzyhLO6OLVsOalG+joJ3RUTI61vXgJh7aGR2qTs0ezOai1M7ooJyZYDGUYnZG5wxq1UVllITaB0ZndK2J+KB2RufKmQnKt3KD2hldq3adSzSofWB0fWNpL3qpWNoHQmcsq4uru3gMZ3SIjFZ1fJW6pb13dC1nJrg/JbR3iK7vzATN0emhvS90HWuamx3rqX00dK3ldVNB93xf6Byfo3mvytLmtzn7+h2g6zjR54Oy7tnLjWstcNurN40O+hzKoN1eXVut4N41/MM3hK5ljQdKB7VaB28AEcW9BXT9Ti2fG6mEBlUmmmERn79ydEZNpc+BBx81oi29t4Ku051OZqqYZe7LYzCooYfuiAZVye+8RnSgNkFgRSodza/G1Zbh3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hdCeY6Q3QgnbepQyQ6q0862puecZl6YXXYPm8Pl6sCXR4mj242Ed2b7dQSQbd1zwnRIek8vbClvwDKcdAVRxiHmWxswuhuKrmpCp9DWLHo1s+m18dYC/mO1elP1MH1gbFiGKE4dLfNfI3apfPFFYluXdq1C4H9cNBlyeFufzBZA1oidEPsZ5Ffl/jo1u2Cjg1OPHRZfbUJPOf6bsWcCaTRgdKE12dpqKKiCaLTcdHBqeCyeDgUV1neTMClBudqDF1YmvC6FRf+C6GDCEwwE0hwcws/TTBXr70XwO9mk6nk2soL6gh0j6XNoS2OCqfmeIVw6c2/WJlVmvC6lQjdur7ZXq5AyJoImp4tbp+o9co3Jxl0ezANgNwxnD/kxrQsKDEGQ+J2s3/z0FxJoDOLxVUSaO6gpoNEzNs3NUQS6LJSs4D7DfgKQBsd1N6PZNBJQfPrfegijPciHrrH/bP0HIBCaxd3JW4+6n2IgW7/tIO+bTJoJiySeq+WhoouEoPFiJKjmhnk7/bvcFDjSK4Mm6WC915T/SNYGqrk6Mys63Mcnt+XzyGsROjcQKp92L1Hn0NYkuj8QGr3DgKpYyWODoZfqyJaY/yxJYDOtTTzo/gcwop+bwLOBFkvpXYWLi464HN47zWdxRRd/A8trfDRp08BoehM39KeztAEBNGZHyDPkb5KOvRui+fuKa366/Bu/w/XcH8FrMTVEgAAAABJRU5ErkJggg==
// @require      http://code.jquery.com/jquery-3.4.1.min.js
// @grant        none
// ==/UserScript==

//o metodo é bem simples: limpa todos os dados e apaga algumas areas da pagina pra evitar o aviso de que o usuario não é premium + anuncios no meio da questão.


//cosnt for block intrusive ads
const ads=['brn-bottom-toplayer__container js-ads-bottom-offset-element brn-bottom-toplayer__container--no-padding',
           'sg-toplayer__wrapper',
           'sg-space-ignore',
           'brn-cookie-policy-wrapper js-brn-cookie-policy-wrapper js-ads-bottom-offset-element',
           'brn-qpage-layout__right-top',
           'sg-toplayer sg-toplayer--modal sg-toplayer--medium OfferModal__toplayer--2qcUl',
           'brn-qpage-next-banner',
           'brn-brainly-plus-box BrainlyPlusBoxSearchUnlogged__boxFullWidth--1O-vq',
           'sg-overlay',
           'sg-overlay sg-overlay--dark',
           'brn-brainly-plus-box BrainlyPlusBoxSearchUnlogged__boxFullWidth--1O-vq',
           'sg-box--padding-m.sg-box--mint-secondary-light.sg-box',
           'brn-ads-box brn-ads-sticky-wrapper',
           'sg-box sg-box--mint-secondary-light sg-box--padding-m',
           'sg-toplayer sg-toplayer--modal sg-toplayer--medium OfferModal__toplayer--2qcUl',
           'sg-overlay',
           'sg-space-ignore'
];

//clear local storage from brainly
localStorage.clear();

//Remove banner and other ads just in /tarefa page
let pathName = window.location.pathname;
if (pathName.startsWith('/tarefa')) {
    const adBanPlus = document.getElementsByClassName('js-react-bottom-banner')[0];
    if (adBanPlus){
      adBanPlus.parentNode.removeChild(adBanPlus);
    }
    for (let obj in ads){
        let adsBlock = document.getElementsByClassName(ads[obj])[0];
        if (adsBlock){
            adsBlock.parentNode.removeChild(adsBlock);
        }
    }

    setTimeout(function(){
        let adsBanner = ['sg-overlay sg-overlay--dark',
                         'sg-toplayer__wrapper',
                         'sg-overlay',
                         'sg-space-ignore'
                        ];
        for (let obj in adsBanner){
            let adsBlock = document.getElementsByClassName(adsBanner[obj])[0];
            if (adsBlock){
                adsBlock.parentNode.removeChild(adsBlock);
            }
        }
    }, 10000);
}

let pathNameAsk = window.location.pathname;
if (pathNameAsk.startsWith('/app')) {
    let adsBanAsk = document.getElementsByClassName('sg-flex sg-flex--column')[0];
    if (adsBanAsk){
      adsBanAsk.parentNode.removeChild(adsBanAsk);
    }
    adsBanAsk = document.getElementsByClassName('brn-cookie-policy-wrapper js-brn-cookie-policy-wrapper js-ads-bottom-offset-element')[0];
    if (adsBanAsk){
      adsBanAsk.parentNode.removeChild(adsBanAsk);
    }
}