Greasemonkey Eurogamer Modal Blocker
| // ==UserScript== | |
| // @name Eurogamer Anti-adblock | |
| // @namespace eg | |
| // @include http://www.eurogamer.net/articles/* | |
| // @version 1 | |
| // @grant none | |
| // ==/UserScript== | |
| var db = document.body, interval, modal = false; | |
| var removeModal = function() { | |
| modal = document.querySelector(".fc-root"); | |
| if ( modal ) { | |
| // Remove the modal | |
| db.removeChild(modal); | |
| // Remove the classes | |
| db.className = ""; | |
| // Enable scrolling | |
| db.style.overflow = "visible"; | |
| clearInterval(interval); | |
| } | |
| } | |
| // EG's script is called 333ms after DOMContentLoaded | |
| // so we need to keep checking until we find the modal. | |
| interval = setInterval(removeModal, 500); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment