Last active
July 8, 2021 07:20
-
-
Save happiness801/6bd26457ff032f903037a038d4aae581 to your computer and use it in GitHub Desktop.
Removes paywall on Popular Mechanics articles
This file contains hidden or 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 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