0% found this document useful (0 votes)
22 views

Código 1

This userscript removes paywalls and login requirements on respondeai.com.br. It does this by: 1. Removing various paywall and login disclaimer elements from the DOM. 2. Adding styles to override paywall styles and make blurred content visible. 3. Setting heights of paywall containers to auto to expand content. 4. Using MutationObservers to re-apply these changes during page updates.
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Código 1

This userscript removes paywalls and login requirements on respondeai.com.br. It does this by: 1. Removing various paywall and login disclaimer elements from the DOM. 2. Adding styles to override paywall styles and make blurred content visible. 3. Setting heights of paywall containers to auto to expand content. 4. Using MutationObservers to re-apply these changes during page updates.
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 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.9
// @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 =
'@layer importantOverrides {' +
'* {' +
'-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