Skip to content

Instantly share code, notes, and snippets.

@kerspoon kerspoon/globals.js
Created May 15, 2012

Embed
What would you like to do?
Find Added Globals
var GLOBAL_Env = [];
for (var x in window) {
if (window.hasOwnProperty(x)) {
GLOBAL_Env.push(x);
}
}
function GLOBAL_FindAdded() {
var newVars = [];
var added = [];
for (var x in window) {
if (window.hasOwnProperty(x)) {
if (GLOBAL_Env.indexOf(x) === -1) {
console.log("Added: " + x);
added.push(x);
}
}
}
return added;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.