-
-
Save limontec/cfcabd264ef068f59b17e512c9a6f963 to your computer and use it in GitHub Desktop.
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!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name No Blur RespondeAí | |
// @namespace Violentmonkey Scripts | |
// @match *://*.respondeai.com.br/* | |
// @updateURL https://gist.github.com/limontec/cfcabd264ef068f59b17e512c9a6f963/raw/NoBlurRespondeAi.js | |
// @downloadURL https://gist.github.com/limontec/cfcabd264ef068f59b17e512c9a6f963/raw/NoBlurRespondeAi.js | |
// @run-at document-idle | |
// @grant none | |
// @version 2.6.7 | |
// @author thihxm [fixed by limontec] | |
// @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'); | |
element.classList.remove('htZGzZ'); | |
}); | |
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