Merge "Align "What's this" vertically"
[lhc/web/wiklou.git] / resources / src / mediawiki / page / startup.js
index 9655fa4..7514044 100644 (file)
@@ -1,6 +1,13 @@
 ( function ( mw, $ ) {
-
-       mw.page = {};
+       // 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;