Logs your global variables to the console - Bookmarklet / DevTools snippet
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig
.gitattributes
.jshintrc
license
log-globals.js
readme.md
screenshot.png

readme.md

log-globals

Logs your global variables to the console

Useful for finding leaked global variables.

screenshot

Getting started

Can be used as a bookmarklet or a DevTools snippet.

Bookmarklet

javascript:console.log(function(){var a=document.createElement("iframe");a.style.display="none";document.body.appendChild(a);var c=a.contentWindow;document.body.removeChild(a);var a=Object.create(null),b;for(b in window)b in c||(a[b]=window[b]);return a}())

License

MIT © Sindre Sorhus