jenkins-bot has submitted this change and it was merged.
Change subject: Hide ULS trigger from unsupported browsers
......................................................................
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
---
M resources/css/ext.uls.nojs.css
M resources/js/ext.uls.init.js
2 files changed, 9 insertions(+), 5 deletions(-)
Approvals:
Santhosh: Looks good to me, approved
jenkins-bot: Verified
diff --git a/resources/css/ext.uls.nojs.css b/resources/css/ext.uls.nojs.css
index d902d27..99ec7e5 100644
--- a/resources/css/ext.uls.nojs.css
+++ b/resources/css/ext.uls.nojs.css
@@ -1,4 +1,4 @@
/* Don't show it to users who disabled JS */
.client-nojs #pt-uls {
- visibility: hidden;
+ display: none;
}
diff --git a/resources/js/ext.uls.init.js b/resources/js/ext.uls.init.js
index 95c4838..ed861de 100644
--- a/resources/js/ext.uls.init.js
+++ b/resources/js/ext.uls.init.js
@@ -112,10 +112,13 @@
* @return boolean
*/
mw.uls.isBrowserSupported = function () {
- // boxModel is not supported in IE versions under 8.
- // We are checking for boxModel here because without that
features
- // our grid system fails and it makes the ULS non-functional.
- return $.support.boxModel;
+ // Blacklist Grade B browsers IE 6, 7 and IE60-IE79
+ var ua = navigator.userAgent;
+ if ( /MSIE [67]/i.test( ua ) ) {
+ return false;
+ }
+
+ return true;
};
/**
@@ -160,6 +163,7 @@
$( document ).ready( function () {
if ( !mw.uls.isBrowserSupported() ) {
+ $( '#pt-uls' ).hide();
return;
}
--
To view, visit https://gerrit.wikimedia.org/r/66923
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I931a2e904b37c754f63bfe5feb2d98bfe6c2747b
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>
Gerrit-Reviewer: Amire80 <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Santhosh <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits