Instantly share code, notes, and snippets.

What would you like to do?
Remove the annoying blogger preview click trap element.
// what substring in the URL indicates to us that we are editing the blog post
let isPostPreview = 'post-preview'
// the query selector to use for referencing the click trap element
let querySelectorForClickTrap = '.blogger-clickTrap'
// how long should the delay be before we attempt to remove the click trap element
let wait = 3000
if (window.location.href.indexOf(isPostPreview) !== -1) {
setTimeout(() => {
let it = document.querySelector(querySelectorForClickTrap)
if (it) {
} else {
console.log('not removed')
}, wait)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment