Created
December 15, 2017 15:01
-
-
Save Herteby/d9d424e0bf5d853ef5ee392e201c63e5 to your computer and use it in GitHub Desktop.
See all global variables that a site has added
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 getGlobals(){ | |
const result = {...window} | |
const standard = window.open() | |
Object.keys(standard).forEach(key => delete result[key]) | |
standard.close() | |
return result | |
} | |
getGlobals() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment