406adb14f2
Should avoid more of the issues with unwanted appearance of mobile layouts. Cutoff results in layout switch when sidebar becomes ~a third of the total window width. bug: T196213 Change-Id: I9b8baee5fe53316128f864e732c86750b4e5470e
22 lines
498 B
JavaScript
22 lines
498 B
JavaScript
$( function () {
|
|
var mobileCutoffWidth = 550,
|
|
ULSTrigger = $( '#pt-uls' ),
|
|
ULSMoved = false;
|
|
|
|
function moveULS() {
|
|
if ( ULSTrigger.length ) {
|
|
if ( !ULSMoved && $( window ).width() <= mobileCutoffWidth ) {
|
|
ULSTrigger.insertBefore( $( '#pt-preferences' ) );
|
|
|
|
ULSMoved = true;
|
|
} else if ( ULSMoved && $( window ).width() > mobileCutoffWidth ) {
|
|
ULSTrigger.prepend( $( '#p-preferences' ) );
|
|
|
|
ULSMoved = false;
|
|
}
|
|
}
|
|
}
|
|
|
|
$( window ).resize( moveULS );
|
|
moveULS();
|
|
} );
|