Last active
June 13, 2020 15:46
-
-
Save geomago/9c33b0949d47218491ffdd1c8eb63a1e to your computer and use it in GitHub Desktop.
undeclared_js_vars_step_1
This file contains hidden or 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
glob = {}; // global object to keep the initial list of properties | |
glob.initial = Object.keys(window); // save all window properties before any script is loaded | |
// showDiff shows (on console.log) the list of "new" properties | |
glob.showDiff = function(before,after) { | |
after.forEach( function(prop) { | |
if (before.indexOf(prop)<0) { | |
console.log(prop,': ', window[prop]); | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment