Last active
August 29, 2015 14:16
-
-
Save mikker/ee4454f39d28c53d3ce2 to your computer and use it in GitHub Desktop.
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
| (function() { | |
| 'use strict' | |
| // Disclaimer: Politiken is a good newspaper. If you use their website | |
| // a lot you should make an account and probably also a subscription to | |
| // keep them going. https://politiken.dk/bruger/opret | |
| function hideOrWait() { | |
| var elm = document.querySelector('.dit-modal-overlay--transparent') // find overlay | |
| if (!elm) return setTimeout(hideOrWait, 50) // break and try in 5 msecs if it isn't there yet | |
| elm.remove() // remove black overlay | |
| document.body.className = '' // bring back body scroll | |
| // stupid elements eg. the one hiding "related articles" | |
| var stupidElements = document.querySelectorAll('.not-logged-in') | |
| for(var i in stupidElements) { stupidElements[i].remove() } | |
| } | |
| hideOrWait() // start waiting for the blackout | |
| })() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment