()
| 571 | }; |
| 572 | |
| 573 | function TM_windowOpenFix() { |
| 574 | if (TMwin.use.safeContext) { |
| 575 | // redefine window.open to a function the returns the DOMWindow of the opened window |
| 576 | window.open = function(url) { |
| 577 | var fi = '__o__' + TM_context_id; |
| 578 | var f = 'window.' + fi + ' = window.open(decodeURI("' + encodeURI(url) + '"));'; |
| 579 | TM_do(f); |
| 580 | var ret = unsafeWindow[fi]; |
| 581 | delete unsafeWindow[fi]; |
| 582 | return ret; |
| 583 | }; |
| 584 | |
| 585 | Clean.push(function() { |
| 586 | window.open = null; |
| 587 | }); |
| 588 | } |
| 589 | }; |
| 590 | |
| 591 | function TM_winEvalFix() { |
| 592 | if (!TMwin.use.safeContext || window.__setTimeout) return; |
no test coverage detected
searching dependent graphs…