Merge "Migrate 'wgBreakFrames' from wikibits.js to mediawiki.page.ready"
This commit is contained in:
commit
f3cace56e7
2 changed files with 10 additions and 9 deletions
|
|
@ -1,6 +1,16 @@
|
|||
( function ( mw, $ ) {
|
||||
var supportsPlaceholder = 'placeholder' in document.createElement( 'input' );
|
||||
|
||||
// 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 = window.location;
|
||||
}
|
||||
}
|
||||
|
||||
mw.hook( 'wikipage.content' ).add( function ( $content ) {
|
||||
var $sortableTables;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,15 +8,6 @@
|
|||
isIE6 = ( /msie ([0-9]{1,}[\.0-9]{0,})/.exec( ua ) && parseFloat( RegExp.$1 ) <= 6.0 ),
|
||||
onloadFuncts = [];
|
||||
|
||||
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 ( win.top !== win.self ) {
|
||||
// Un-trap us from framesets
|
||||
win.top.location = win.location;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* User-agent sniffing.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue