MaxSem has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/55446


Change subject: Blacklist a bunch of phones in ResourceLoader
......................................................................

Blacklist a bunch of phones in ResourceLoader

Change-Id: If7743c476e95002174763514428c17dfcbe7da4c
---
M resources/startup.js
1 file changed, 9 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/46/55446/1

diff --git a/resources/startup.js b/resources/startup.js
index deff7e6..01fdb24 100644
--- a/resources/startup.js
+++ b/resources/startup.js
@@ -20,10 +20,15 @@
 
 /*jshint unused: false */
 function isCompatible() {
-       // IE < 6.0
-       if ( navigator.appVersion.indexOf( 'MSIE' ) !== -1
-               && parseFloat( navigator.appVersion.split( 'MSIE' )[1] ) < 6 )
-       {
+       // Blacklisted: IE < 6.0 and a bunch of mobile devices
+       if ( navigator.userAgent.match(
+               
/^(lg-|lge-|nec-|pg-|sgh-|sie-)|(240x240|240x320|320x320|alcatel|audiovox|bada|benq|blackberry|cdm-|compal-|docomo|ericsson|hiptop|huawei|kddi-|kindle|meego|midp|mitsu|mmp\/|mobi|mot-|motor|msie
 
[1-5]|ngm_|nintendo|opera.m|palm|panasonic|philips|phone|playstation|portalmmm|sagem-|samsung|sanyo|sec-|semc-browser|sendo|sharp|softbank|symbian|teleca|up.browser|vodafone|webos)/i
+       ) ) {
+               if ( navigator.userAgent.match( /Android/ ) ||
+                       ( navigator.userAgent.match( /iphone/i ) && 
!navigator.userAgent.match( /Opera/ ) ) )
+               {
+                       return true;
+               }
                return false;
        }
        return true;

-- 
To view, visit https://gerrit.wikimedia.org/r/55446
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If7743c476e95002174763514428c17dfcbe7da4c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to