Created
February 6, 2013 18:54
-
-
Save Swader/4724838 to your computer and use it in GitHub Desktop.
Remove dumped personal information from Squarespace blog
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
<script type="text/javascript" id="tempScript"> | |
var scripts = document.getElementsByTagName('script'); | |
var numberOfScripts = scripts.length; | |
var tempText; | |
var current; | |
while (numberOfScripts--) { | |
current = scripts[numberOfScripts]; | |
tempText = current.textContent; | |
if ( | |
tempText.indexOf("Static.SQUARESPACE_CONTEXT") >= 0 | |
&& | |
!current.hasAttribute('type') | |
){ | |
current.parentNode.removeChild(scripts[numberOfScripts]); | |
tempText = null; | |
scripts = null; | |
current = null; | |
numberOfScripts = null; | |
var tempScript = document.getElementById('tempScript'); | |
tempScript.parentNode.removeChild(tempScript); | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment