Hide ULS trigger from unsupported browsers
For position=sidebar, the dummy "in other languages" section is visible in the same manner as it is to browsers without JavaScript. Bug: 49028 Change-Id: I931a2e904b37c754f63bfe5feb2d98bfe6c2747b
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* Don't show it to users who disabled JS */
|
/* Don't show it to users who disabled JS */
|
||||||
.client-nojs #pt-uls {
|
.client-nojs #pt-uls {
|
||||||
visibility: hidden;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,10 +112,13 @@
|
|||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
mw.uls.isBrowserSupported = function () {
|
mw.uls.isBrowserSupported = function () {
|
||||||
// boxModel is not supported in IE versions under 8.
|
// Blacklist Grade B browsers IE 6, 7 and IE60-IE79
|
||||||
// We are checking for boxModel here because without that features
|
var ua = navigator.userAgent;
|
||||||
// our grid system fails and it makes the ULS non-functional.
|
if ( /MSIE [67]/i.test( ua ) ) {
|
||||||
return $.support.boxModel;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -160,6 +163,7 @@
|
|||||||
|
|
||||||
$( document ).ready( function () {
|
$( document ).ready( function () {
|
||||||
if ( !mw.uls.isBrowserSupported() ) {
|
if ( !mw.uls.isBrowserSupported() ) {
|
||||||
|
$( '#pt-uls' ).hide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user