Last active
December 14, 2020 17:29
-
-
Save happiness801/4f61d17f95600fc36802bd8f89323fde to your computer and use it in GitHub Desktop.
Remove Ads/Modals from sltrib.com
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 Ads/Modals from sltrib.com | |
| // @namespace http://onai.net/ | |
| // @version 0.3 | |
| // @description Removes ads, modals, paywalls from sltrib.com | |
| // @author Kevin Gwynn | |
| // @match https://www.sltrib.com/* | |
| // @grant none | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| let removeModals = function() { | |
| console.log('KAG: attempt to remove modals...'); | |
| // Inject jQuery | |
| var gen = 0;var act=function(){gen=1;var script=document.createElement('script');script.src='//code.jquery.com/jquery-1.11.0.min.js';script.type='text/javascript';document.getElementsByTagName('head')[0].appendChild(script);};(!window.jQuery)?act():1;setTimeout(function(){console.log('jQuery '+(gen?'loaded: ':'existing: ')+(window.jQuery?jQuery().jquery:'no jQuery/load failed'));}, 500); | |
| var $ = jQuery; | |
| $('BODY').removeClass('tp-modal-open'); | |
| $('.tp-active,.tp-modal,.sltrib-promo,#footer').remove(); | |
| //document.cookie='xbc=;expires=Thu, 01 Jan 1970 00:00:01 GMT;'; // needs work | |
| }; | |
| setTimeout(removeModals, 1000); | |
| setTimeout(removeModals, 2500); | |
| setTimeout(removeModals, 4000); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment