Skip to content

Instantly share code, notes, and snippets.

@maryqygao
Last active February 15, 2020 23:43
Show Gist options
  • Save maryqygao/e1c5a3331c04aa35adb36bd6b2e22c37 to your computer and use it in GitHub Desktop.
Save maryqygao/e1c5a3331c04aa35adb36bd6b2e22c37 to your computer and use it in GitHub Desktop.
LA Times Registration Wall Bypasser
// ==UserScript==
// @name LA Times Registration Wall Bypasser
// @namespace https://gist.github.com/kitkat2
// @description Bypasses the Los Angeles Times Regsitration wall
// @include http://*.latimes.com/*
// @version 1
// @grant none
// @require http://code.jquery.com/jquery-3.1.1.min.js
// ==/UserScript==
$(function(){
console.log('LA Times Registration Wall Bypasser loading...');
var observer = new MutationObserver(function(ms) {
ms.forEach(function(m) {
if (!m.addedNodes) return;
$.each(m.addedNodes, function(i, n) {
if (n.id === 'reg-overlay') {
console.log('LA Times Registration Wall Detected');
$('#reg-overlay').remove();
$('html').css('overflow', 'scroll');
$('body').css('overflow', 'scroll');
$(window).off('scroll');
console.log('LA Times Registration Wall Removed!');
return false;
}
});
});
});
observer.observe(document.body, {
childList: true,
subtree: true,
attributes: false,
characterData: false
});
});
@maryqygao
Copy link
Author

Fixed page not scrollable by setting overlay: scroll on the <body> element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment