Skip to content

Instantly share code, notes, and snippets.

@jrelo
Created November 4, 2025 04:51
Show Gist options
  • Select an option

  • Save jrelo/bc701b26259ac3874a9d162da5784aa7 to your computer and use it in GitHub Desktop.

Select an option

Save jrelo/bc701b26259ac3874a9d162da5784aa7 to your computer and use it in GitHub Desktop.
Paywall fux0r
/**
* bypass scroll-based paywalls, popups, and overlays.
*/
(function() {
'use strict';
console.log('paywall fux0r activated.');
// ============================================
// 1. RESTORE SCROLLING (CSS-based blocks)
// ============================================
function restoreScrolling() {
const targets = [document.body, document.documentElement];
targets.forEach(el => {
if (el) {
el.style.overflow = 'auto';
el.style.overflowY = 'auto';
el.style.overflowX = 'auto';
el.style.position = 'static';
el.style.height = 'auto';
// Remove any inline styles that might block scrolling
['overflow', 'overflow-y', 'overflow-x', 'position', 'height'].forEach(prop => {
el.style.removeProperty(prop);
});
}
});
console.log('✓ Scrolling restored');
}
// ============================================
// 2. KILL EVENT LISTENERS (JS-based blocks)
// ============================================
function killEventListeners() {
// Clear scroll listeners
window.onscroll = null;
document.onscroll = null;
document.body.onscroll = null;
// Nuclear option: clear all scroll event listeners
try {
if (typeof getEventListeners === 'function') {
const scrollListeners = getEventListeners(window).scroll || [];
scrollListeners.forEach(listener => {
window.removeEventListener('scroll', listener.listener, listener.useCapture);
});
}
} catch(e) {
// getEventListeners only works in console, not in injected scripts
}
// Block future scroll listener attachments (aggressive)
const originalAddEventListener = EventTarget.prototype.addEventListener;
EventTarget.prototype.addEventListener = function(type, listener, options) {
if (type === 'scroll' || type === 'wheel' || type === 'touchmove') {
console.log('Blocked scroll listener attachment');
return;
}
return originalAddEventListener.call(this, type, listener, options);
};
console.log('✓ Event listeners neutralized');
}
// ============================================
// 3. DESTROY MODALS & OVERLAYS
// ============================================
function destroyModals() {
// Common modal/popup/overlay selectors
const selectors = [
'[class*="modal"]',
'[class*="Modal"]',
'[class*="popup"]',
'[class*="Popup"]',
'[class*="overlay"]',
'[class*="Overlay"]',
'[class*="paywall"]',
'[class*="Paywall"]',
'[id*="modal"]',
'[id*="popup"]',
'[id*="overlay"]',
'[id*="paywall"]',
'[class*="dialog"]',
'[class*="Dialog"]',
'[role="dialog"]',
'[aria-modal="true"]',
// High z-index elements (likely overlays)
'[style*="z-index"]'
];
let removedCount = 0;
selectors.forEach(selector => {
try {
document.querySelectorAll(selector).forEach(el => {
// Check if it's actually an overlay (high z-index or fixed position)
const style = window.getComputedStyle(el);
const zIndex = parseInt(style.zIndex) || 0;
const position = style.position;
if (zIndex > 100 || position === 'fixed' || position === 'absolute') {
el.remove();
removedCount++;
}
});
} catch(e) {
// Selector might not be valid, skip
}
});
// Also remove elements with very high z-index values
document.querySelectorAll('*').forEach(el => {
const style = window.getComputedStyle(el);
const zIndex = parseInt(style.zIndex) || 0;
if (zIndex > 9999) {
el.remove();
removedCount++;
}
});
console.log(`✓ Removed ${removedCount} modal/overlay elements`);
}
// ============================================
// 4. REMOVE BLUR/FADE EFFECTS
// ============================================
function removeBlurEffects() {
document.querySelectorAll('*').forEach(el => {
const style = window.getComputedStyle(el);
if (style.filter && style.filter.includes('blur')) {
el.style.filter = 'none';
}
if (parseFloat(style.opacity) < 0.5) {
el.style.opacity = '1';
}
});
console.log('✓ Blur/fade effects removed');
}
// ============================================
// 5. DISABLE SCROLL DEPTH TRACKING
// ============================================
function disableTracking() {
// Block common analytics/tracking methods
if (window.gtag) window.gtag = function() {};
if (window.ga) window.ga = function() {};
if (window._gaq) window._gaq = { push: function() {} };
if (window.dataLayer) window.dataLayer = { push: function() {} };
console.log('✓ Tracking disabled');
}
// ============================================
// 6. HANDLE IFRAME TRAPS
// ============================================
function handleIframes() {
document.querySelectorAll('iframe').forEach(iframe => {
try {
// Try to access and modify iframe content
const iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
if (iframeDoc) {
iframeDoc.body.style.overflow = 'auto';
}
} catch(e) {
// Cross-origin iframe, can't access
}
});
console.log('✓ Iframes handled');
}
// ============================================
// 7. MUTATION OBSERVER (catch dynamic popups)
// ============================================
function watchForNewPopups() {
const observer = new MutationObserver(mutations => {
mutations.forEach(mutation => {
mutation.addedNodes.forEach(node => {
if (node.nodeType === 1) { // Element node
const style = window.getComputedStyle(node);
const zIndex = parseInt(style.zIndex) || 0;
const position = style.position;
// Check if it looks like a modal
if ((zIndex > 1000 && position === 'fixed') ||
node.className.toLowerCase().includes('modal') ||
node.className.toLowerCase().includes('popup') ||
node.className.toLowerCase().includes('overlay')) {
console.log('Caught dynamic popup, destroying...');
node.remove();
}
}
});
});
});
observer.observe(document.body, {
childList: true,
subtree: true
});
console.log('✓ Watching for dynamic popups');
}
// ============================================
// 8. CLEAN UP BODY CLASSES
// ============================================
function cleanBodyClasses() {
const body = document.body;
const html = document.documentElement;
[body, html].forEach(el => {
const classes = el.className.split(' ');
classes.forEach(cls => {
if (cls.toLowerCase().includes('modal') ||
cls.toLowerCase().includes('popup') ||
cls.toLowerCase().includes('noscroll') ||
cls.toLowerCase().includes('locked')) {
el.classList.remove(cls);
}
});
});
console.log('✓ Body classes cleaned');
}
// ============================================
// EXECUTE ALL METHODS
// ============================================
function destroy() {
restoreScrolling();
killEventListeners();
destroyModals();
removeBlurEffects();
disableTracking();
handleIframes();
cleanBodyClasses();
watchForNewPopups();
// Run again after a short delay to catch lazy-loaded popups
setTimeout(() => {
destroyModals();
restoreScrolling();
}, 500);
setTimeout(() => {
destroyModals();
restoreScrolling();
}, 2000);
console.log('GAVE zer0 FUX!');
}
// Run the destroyer
destroy();
// Also expose as global function for manual re-trigger
window.destroyPaywalls = destroy;
})();
/**
* BOOKMARKLET VERSION (minified)
* Drag this to your bookmarks bar:
*
* javascript:(function(){function r(){[document.body,document.documentElement].forEach(e=>{e&&(e.style.overflow='auto',e.style.overflowY='auto',e.style.position='static')})}function d(){let e=0;['[class*="modal"]','[class*="popup"]','[class*="overlay"]','[class*="paywall"]','[role="dialog"]','[aria-modal="true"]'].forEach(t=>{document.querySelectorAll(t).forEach(t=>{let o=window.getComputedStyle(t),l=parseInt(o.zIndex)||0;(l>100||o.position==='fixed'||o.position==='absolute')&&(t.remove(),e++)})}),console.log(`✓ Removed ${e} overlays`)}function c(){document.body.classList.forEach(e=>{(e.includes('modal')||e.includes('noscroll')||e.includes('locked'))&&document.body.classList.remove(e)})}r();window.onscroll=null;document.onscroll=null;d();c();setTimeout(()=>{d();r()},500);setTimeout(()=>{d();r()},2000);new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{if(e.nodeType===1){let t=window.getComputedStyle(e);((parseInt(t.zIndex)||0)>1000&&t.position==='fixed')&&e.remove()}})})}).observe(document.body,{childList:!0,subtree:!0});console.log('🎉 Paywall destroyed!')})();
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment