Skip to content

Instantly share code, notes, and snippets.

@itrelease
Forked from bga/_restoreSymbol.js
Created July 16, 2010 13:04
Show Gist options
  • Save itrelease/478332 to your computer and use it in GitHub Desktop.
Save itrelease/478332 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