X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki%2Fpage%2Fstartup.js;h=75140445380cb5159b2c7cfdacf8396d1eccd2f9;hb=d19826aa35b206847a568a4b2c1c9ffaa615fca5;hp=49cfd8ac3fa54d282f7e06aaf8d5917845b979cc;hpb=f3293a45ee0fe0dda4053d0071cc46d6cca906e4;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki/page/startup.js b/resources/src/mediawiki/page/startup.js index 49cfd8ac3f..7514044538 100644 --- a/resources/src/mediawiki/page/startup.js +++ b/resources/src/mediawiki/page/startup.js @@ -1,4 +1,13 @@ ( function ( mw, $ ) { + // Break out of framesets + if ( mw.config.get( 'wgBreakFrames' ) ) { + // Note: In IE < 9 strict comparison to window is non-standard (the standard didn't exist yet) + // it works only comparing to window.self or window.window (http://stackoverflow.com/q/4850978/319266) + if ( window.top !== window.self ) { + // Un-trap us from framesets + window.top.location.href = location.href; + } + } $( function () { var $diff;