Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Este gist foi desenvolvido com a intenção de estudar mais sobre sistemas de ofuscação web que rodam em ambientes client-side. Não me responsabilizo pelo uso indevido por outros para obter conteúdos que não tem acesso!
// ==UserScript==
// @name No Blur RespondeAí
// @namespace Violentmonkey Scripts
// @match *://*.respondeai.com.br/*
// @downloadURL https://gist.githubusercontent.com/thihxm/ea2779cec517f3c126d34c8b374b409d/raw/NoBlurRespondeAi.js
// @run-at document-idle
// @grant none
// @version 2.6
// @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.parentNode.removeChild(disclaimer);
});
document.querySelectorAll('overlay-disclaimer').forEach((disclaimer) => {
disclaimer.parentNode.removeChild(disclaimer);
});
document.querySelectorAll('.blur').forEach((element) => {
element.classList.remove('blur');
});
document.querySelectorAll('.expand-btn').forEach((element) => {
if (element.innerHTML === 'MOSTRAR SOLUÇÃO COMPLETA') {
element.parentNode.removeChild(element);
}
});
document.querySelectorAll('.ReactModalPortal').forEach((disclaimer) => {
disclaimer.parentNode.removeChild(disclaimer);
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 => {
const parentEl = loginAlert.parentNode;
parentEl.parentNode.removeChild(parentEl);
});
const exerciseContainer = document.querySelector('div[class^="BookEditionPage__Container"]');
if (exerciseContainer) observerPaywall.observe(exerciseContainer, observerPaywallConfig);
}
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 =
'.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);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment