Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.globalEval = (function() {
- if (typeof window.execScript != 'undefined') {
- return function(str) { window.execScript(str); };
- }
- if (!Prototype.Browser.Opera && !Prototype.Browser.WebKit && typeof window.eval != 'undefined') {
- return function(str) { window.eval(str); };
- }
- return function(str) {
- var head, script;
- head = $$('head')[0];
- if (head) {
- script = new Element('script', {'type': 'text/javascript'});
- script.appendChild(document.createTextNode(str));
- head.appendChild(script);
- }
- };
- })();
Add Comment
Please, Sign In to add comment