Last active
April 23, 2024 15:54
-
-
Save thihxm/ea2779cec517f3c126d34c8b374b409d 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 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); | |
})(); |
Pretende adaptar o codigo novamente?
O site deles foi atualizado essa semana
Olá, tudo bem? Ainda é possível atualizar o script? Nunca precisei tanto como agora : (
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Quando você vai atualizar o código para pegar na nova versão do site?