-
-
Save tallykatt/655a72248c7433d11217ec31eeca700e to your computer and use it in GitHub Desktop.
domSniper is a simple JavaScript bookmarklet to easily remove a DOM node from a document using JavaScript
This file contains 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(){ | |
var body = document.body; | |
var snipe = function(e) { | |
body.style.cursor = 'initial'; | |
e.preventDefault(); | |
e.target.parentNode.removeChild(e.target); | |
body.removeEventListener('click', snipe, false); | |
}; | |
body.addEventListener('click', snipe, false); | |
body.style.cursor = 'crosshair'; | |
})(); |
This file contains 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(){var body=document.body,snipe=function(a){body.style.cursor="initial",a.preventDefault(),a.target.parentNode.removeChild(a.target),body.removeEventListener("click",snipe,!1)};body.addEventListener("click",snipe,!1),body.style.cursor="crosshair";})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment