Skip to content

Instantly share code, notes, and snippets.

@bga
Created July 16, 2010 12:54
Show Gist options
  • Save bga/478329 to your computer and use it in GitHub Desktop.
Save bga/478329 to your computer and use it in GitHub Desktop.
var _restoreSymbol = (function($G)
{
var iframe = document.createElement('iframe');
(document.body || document.documentElement).appendChild(iframe);
iframe.style.display = 'none';
var win = iframe.contentWindow, doc = win.document;
doc.open();
doc.write('<html></html>');
doc.close();
return function(name)
{
eval('$G.' + name + ' = win.' + name);
};
})(window);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment