Codigo 2

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

// ==UserScript==

// @name No Blur RespondeAí


// @namespace thihxm
// @match *://*.respondeai.com.br/*
// @downloadURL
https://gist.githubusercontent.com/thihxm/ea2779cec517f3c126d34c8b374b409d/raw/
NoBlurRespondeAi.js
// @run-at document-idle
// @grant none
// @version 2.8
// @author thihxm
// @description Libera o acesso aos conteúdos da plataforma sem precisar fazer
login
// ==/UserScript==

(function() {
'use strict';

const removePaywall = () => {


document.querySelectorAll('login-disclaimer').forEach((disclaimer) => {
disclaimer.remove();
});
document.querySelectorAll('overlay-disclaimer').forEach((disclaimer) => {
disclaimer.remove();
});
document.querySelectorAll('.blur').forEach((element) => {
element.classList.remove('blur');
});
document.querySelectorAll('.expand-btn').forEach((element) => {
if (element.innerHTML === 'MOSTRAR SOLUÇÃO COMPLETA') {
element.remove();
}
});
document.querySelectorAll('.ReactModalPortal').forEach((disclaimer) => {
disclaimer.remove();
document.body.classList.remove('ReactModal__Body--open');
});
const loginAlertTexts = Array.from(document.querySelectorAll('h2')).filter(el
=> el.innerText.includes('Loga aí pra continuar'));
loginAlertTexts.forEach(loginAlert => {
loginAlert.remove();
});

const exerciseContainer =
document.querySelector('div[class^="BookEditionPage__Container"]');
if (exerciseContainer) observerPaywall.observe(exerciseContainer,
observerPaywallConfig);

document.querySelectorAll('.paywall').forEach(el => {
el.classList.replace('paywall', 'autoHeight');
});

const paywallElements =
document.querySelectorAll('[class*="ExpandPaywallContainer"]');
paywallElements.forEach(el => {
el.remove();
});

const paywallOverlays =
document.querySelectorAll('[class*="PaywallOverlayContainer"]');
paywallOverlays.forEach(el => {
el.parentNode.style.height = 'auto !important';
el.remove();
});

const paywallHeadings =
document.querySelectorAll('[class*="PaywallHeadingsSection"]');
paywallHeadings.forEach(el => {
el.remove();
});
}
window.removePaywall = removePaywall;

const observerStyle = new MutationObserver(function(mutations) {


mutations.forEach(function(mutation) {
mutation.target.removeAttribute("style");
});
});

const observerPaywall = new MutationObserver(function(mutations) {


mutations.forEach(function(mutation) {
removePaywall();
});
});

const observerStyleConfig = {
attributes: true,
attributeOldValue: true,
}

const observerPaywallConfig = {
...observerStyleConfig,
childList: true,
}

const overlay = document.querySelector('.login-overlay');


const main_wrapper = document.querySelector('.main-wrapper') ||
document.querySelector('.main-container');
const btn = document.querySelector('#exercise-expand-button');

const style = document.createElement('style');


style.innerHTML =
'* {' +
'-webkit-filter: none !important;' +
'filter: none !important;' +
'}' +
'.autoHeight {' +
'height: auto !important;' +
'}' +
'.content-card * {' +
'user-select: auto !important;' +
'}' +
'.blur {' +
'-webkit-filter: none !important;' +
'filter: none !important;' +
'pointer-events: all;' +
'}';
document.querySelector('head').appendChild(style);
if (overlay) observerStyle.observe(overlay, observerStyleConfig);
if (main_wrapper) observerStyle.observe(main_wrapper, observerStyleConfig);
observerPaywall.observe(document.body, observerStyleConfig);

window.onload = () => {
removePaywall();
}

btn && btn.parentNode.removeChild(btn);


overlay && overlay.parentNode.removeChild(overlay);
})();

You might also like