Skip to content

Instantly share code, notes, and snippets.

@happiness801
Last active July 8, 2021 07:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save happiness801/6bd26457ff032f903037a038d4aae581 to your computer and use it in GitHub Desktop.
Save happiness801/6bd26457ff032f903037a038d4aae581 to your computer and use it in GitHub Desktop.
Removes paywall on Popular Mechanics articles
// ==UserScript==
// @name Remove Popular Mechanics paywall
// @namespace http://onai.net/
// @version 0.1
// @description Removes paywall from popularmechanics.com
// @author Kevin Gwynn
// @match https://*.popularmechanics.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
let removeModals = function() {
console.log('KAG: attempt to remove paywall...');
// Remove paywall
jQuery('.journey-container-wrapper,#journey-container').remove();
// Remove blur style over main content
jQuery('.standard-body').removeClass('standard-body');
// Remove some ads
jQuery('.leaderboard-ad, .oop-ad, .ad-container').remove();
// Don't need any iframes
jQuery('iframe').remove();
};
setTimeout(removeModals, 3000);
setTimeout(removeModals, 6000);
setTimeout(removeModals, 9000);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment