Last active
July 21, 2020 20:30
-
-
Save danilor/4c4002a61e7d79d237ffd53ec47afcaf 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 removeSelector( s ){ | |
try{ | |
var elem = document.querySelector( s ); | |
elem.parentNode.removeChild(elem); | |
}catch(e){ | |
console.log( e ); | |
} | |
} | |
function removeBodyClass(){ | |
try{ | |
document.getElementsByTagName('body')[0].classList.remove("tp-modal-open"); | |
}catch(e){ | |
console.log( e ); | |
} | |
} | |
removeSelector( '.tp-modal' ); | |
removeSelector( '.tp-backdrop' ); | |
removeSelector( '#gdpr-cookie-message' ); | |
removeBodyClass(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment