Skip to content

Instantly share code, notes, and snippets.

@lyrixx
Created December 14, 2012 19:59
Show Gist options
  • Save lyrixx/4288167 to your computer and use it in GitHub Desktop.
Save lyrixx/4288167 to your computer and use it in GitHub Desktop.
get all global vars stored in window
(function(k,l,r,m,i,e,c,o,g){
for(i in window) k.push(i)
e = document.createElement("iframe")
e.style.display = "none"
document.body.appendChild(e)
c = e.contentWindow
for(o in c) l.push(o)
for(g=k.length;m < g;m++) if(!~l.indexOf(k[m])) r.push(k[m])
return r
})([],[],[],0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment