Skip to content

Instantly share code, notes, and snippets.

@jdlich
Last active December 6, 2017 16:28
Show Gist options
  • Save jdlich/09e178c17881333f2e0f4dad92d364d7 to your computer and use it in GitHub Desktop.
Save jdlich/09e178c17881333f2e0f4dad92d364d7 to your computer and use it in GitHub Desktop.
// Put this at the top of the <head>
// 3rd party globals will be listed in the console
<script>
(function (window) {
var globals = (function (o) {
for ( var i in window ) {
o.push(i);
}
return o;
})([]);
window.addEventListener("load", function (event) {
for ( var i in window ) {
if ( globals.indexOf(i) == -1 ) {
console.log(i);
}
}
});
})(window);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment