diff options
author | Max Semenik <maxsem.wiki@gmail.com> | 2013-03-23 03:58:12 +0400 |
---|---|---|
committer | Gerrit Code Review <gerrit@wikimedia.org> | 2013-04-09 00:28:33 +0000 |
commit | c46fc745a9de7201ee17150d5eed5d4402bd1e6c (patch) | |
tree | 37c39322608cb922e84c453f2c8753e16d170e37 /resources/startup.js | |
parent | 1d5e3249e24b3101e907805a4b8418ef7a4025c6 (diff) | |
download | mediawikicore-c46fc745a9de7201ee17150d5eed5d4402bd1e6c.tar.gz mediawikicore-c46fc745a9de7201ee17150d5eed5d4402bd1e6c.zip |
startup: Blacklist incompatible mobile browsers
These user agents have been blacklisted on the mobile site for some time.
They have been re-reviewed alongside the A grade phones supported by
jQuery mobile [1] and jQuery [2]
[1] http://jquerymobile.com/gbs/
[2] http://jquery.com/browser-support/
Change-Id: If7743c476e95002174763514428c17dfcbe7da4c
Diffstat (limited to 'resources/startup.js')
-rw-r--r-- | resources/startup.js | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/resources/startup.js b/resources/startup.js index 6397cd69ea56..39302bc96e95 100644 --- a/resources/startup.js +++ b/resources/startup.js @@ -12,6 +12,7 @@ * * See also: * - https://www.mediawiki.org/wiki/Compatibility#Browser + * - http://jquerymobile.com/gbs/ * - http://jquery.com/browser-support/ */ @@ -25,8 +26,20 @@ function isCompatible( ua ) { return !( // Internet Explorer < 6 ( ua.indexOf( 'MSIE' ) !== -1 && parseFloat( ua.split( 'MSIE' )[1] ) < 6 ) || - // Firefox < 4 - ( ua.indexOf( 'Firefox/' ) !== -1 && parseFloat( ua.split( 'Firefox/' )[1] ) < 4 ) + // Firefox < 4 + ( ua.indexOf( 'Firefox/' ) !== -1 && parseFloat( ua.split( 'Firefox/' )[1] ) < 4 ) || + // BlackBerry < 6 + ua.match( /BlackBerry[^\/]*\/[1-5]\./ ) || + // Open WebOS < 1.5 + ua.match( /webOS\/1\.[0-4]/ ) || + // Anything PlayStation based. + ua.match( /PlayStation/i ) || + // Any Symbian based browsers + ua.match( /SymbianOS|Series60/ ) || + // Any NetFront based browser + ua.match( /NetFront/ ) || + // Opera Mini < 7 + ua.match( /Opera Mini\/[0-6]\./ ) ); } |