Guest User

Untitled

a guest
May 26th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. window.globalEval = (function() {
  2. if (typeof window.execScript != 'undefined') {
  3. return function(str) { window.execScript(str); };
  4. }
  5. if (!Prototype.Browser.Opera && !Prototype.Browser.WebKit && typeof window.eval != 'undefined') {
  6. return function(str) { window.eval(str); };
  7. }
  8. return function(str) {
  9. var head, script;
  10.  
  11. head = $$('head')[0];
  12. if (head) {
  13. script = new Element('script', {'type': 'text/javascript'});
  14. script.appendChild(document.createTextNode(str));
  15. head.appendChild(script);
  16. }
  17. };
  18. })();
Add Comment
Please, Sign In to add comment