jdfreder / getUserDefinedGlobals

Web browser JavaScript snippet that allows you to list all user defined globals.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getUserDefinedGlobals

Web browser JavaScript snippet that allows you to list all user defined globals.

Released under the MIT license.

Use

Dump this into your JS console while on the website of interest:

(function() {
    var i = document.createElement('iframe'); i.style.display = 'none'; document.body.appendChild(i);
    var b = Object.getOwnPropertyNames(i.contentWindow); b.push('getUserDefinedGlobals');
    document.body.removeChild(i);
    console.info(Object.getOwnPropertyNames(window).filter(function(x) { return b.indexOf(x) === -1; }));
})();

About

Web browser JavaScript snippet that allows you to list all user defined globals.

License:MIT License