jenkins-bot has submitted this change and it was merged.

Change subject: Blacklist Google Glass web browser from JS
......................................................................


Blacklist Google Glass web browser from JS

This will prevent things like collapsing sections on the Google Glass
web browser, and other interactive extras that really don't work well
on the limited UI (although the browser supports JS the interaction
model doesn't let you do much usefully, so a static page is better).

bug: 56008
Change-Id: I406d8131d4a8b3b98328e6c624433b67a18db645
---
M resources/startup.js
M tests/qunit/suites/resources/startup.test.js
2 files changed, 6 insertions(+), 2 deletions(-)

Approvals:
  Jdlrobson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/startup.js b/resources/startup.js
index 6aba2f9..f139570 100644
--- a/resources/startup.js
+++ b/resources/startup.js
@@ -41,7 +41,9 @@
                // Opera Mini, all versions
                ua.match( /Opera Mini/ ) ||
                // Nokia's Ovi Browser
-               ua.match( /S40OviBrowser/ )
+               ua.match( /S40OviBrowser/ ) ||
+               // Google Glass browser groks JS but UI is too limited
+               ( ua.match( /Glass/ ) && ua.match( /Android/ ) )
        );
 }
 
diff --git a/tests/qunit/suites/resources/startup.test.js 
b/tests/qunit/suites/resources/startup.test.js
index 76f32f7..8fd789a 100644
--- a/tests/qunit/suites/resources/startup.test.js
+++ b/tests/qunit/suites/resources/startup.test.js
@@ -71,7 +71,9 @@
                        'Opera/9.80 (Android; Opera Mini/7.29530/27.1407; U; 
en) Presto/2.8.119 Version/11.10',
                        // Ovi Browser
                        'Mozilla/5.0 (Series40; NokiaX3-02/05.60; 
Profile/MIDP-2.1 Configuration/CLDC-1.1) Gecko/20100401 
S40OviBrowser/3.2.0.0.6',
-                       'Mozilla/5.0 (Series40; Nokia305/05.92; 
Profile/MIDP-2.1 Configuration/CLDC-1.1) Gecko/20100401 
S40OviBrowser/3.7.0.0.11'
+                       'Mozilla/5.0 (Series40; Nokia305/05.92; 
Profile/MIDP-2.1 Configuration/CLDC-1.1) Gecko/20100401 
S40OviBrowser/3.7.0.0.11',
+                       // Google Glass
+                       'Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; Glass 1 
Build/IMM76L; XE11) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile 
Safari/534.30',
                ],
                // No explicit support for or against these browsers, they're
                // given a shot at Grade A at their own risk.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I406d8131d4a8b3b98328e6c624433b67a18db645
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to