Skip to content

Instantly share code, notes, and snippets.

@ckim
Forked from maryqygao/latimesbypass_gm.user.js
Last active February 15, 2020 23:44
Show Gist options
  • Save ckim/722fd87c194495eccf27499edea17c14 to your computer and use it in GitHub Desktop.
Save ckim/722fd87c194495eccf27499edea17c14 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 https://*.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
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment