2 * This script provides a function which is run to evaluate whether or not to
3 * continue loading the jquery and mediawiki modules. This code should work on
4 * even the most ancient of browsers, so be very careful when editing.
8 * Returns false when run in a black-listed browser
10 * This function will be deleted after it's used, so do not expand it to be
11 * generally useful beyond startup.
14 * - https://www.mediawiki.org/wiki/Compatibility#Browser
15 * - http://jquerymobile.com/gbs/
16 * - http://jquery.com/browser-support/
19 /*jshint unused: false */
20 function isCompatible( ua ) {
21 if ( ua === undefined ) {
22 ua = navigator.userAgent;
25 // MediaWiki JS or jQuery is known to have issues with:
27 // Internet Explorer < 6
28 ( ua.indexOf( 'MSIE' ) !== -1 && parseFloat( ua.split( 'MSIE' )[1] ) < 6 ) ||
30 ( ua.indexOf( 'Firefox/' ) !== -1 && parseFloat( ua.split( 'Firefox/' )[1] ) < 3 ) ||
32 ua.match( /BlackBerry[^\/]*\/[1-5]\./ ) ||
34 ua.match( /webOS\/1\.[0-4]/ ) ||
35 // Anything PlayStation based.
36 ua.match( /PlayStation/i ) ||
37 // Any Symbian based browsers
38 ua.match( /SymbianOS|Series60/ ) ||
39 // Any NetFront based browser
40 ua.match( /NetFront/ ) ||
42 ua.match( /Opera Mini\/[0-6]\./ )
47 * The startUp() function will be auto-generated and added below.