Merge "Switched FileBackendStore to use ProfileSection when possible."
[lhc/web/wiklou.git] / resources / startup.js
1 /**
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.
5 */
6
7 /**
8 * Returns false when run in a black-listed browser
9 *
10 * This function will be deleted after it's used, so do not expand it to be
11 * generally useful beyond startup.
12 *
13 * See also:
14 * - https://www.mediawiki.org/wiki/Compatibility#Browser
15 * - http://jquerymobile.com/gbs/
16 * - http://jquery.com/browser-support/
17 */
18
19 /*jshint unused: false */
20 function isCompatible( ua ) {
21 if ( ua === undefined ) {
22 ua = navigator.userAgent;
23 }
24
25 // MediaWiki JS or jQuery is known to have issues with:
26 return !(
27 // Internet Explorer < 6
28 ( ua.indexOf( 'MSIE' ) !== -1 && parseFloat( ua.split( 'MSIE' )[1] ) < 6 ) ||
29 // Firefox < 3
30 ( ua.indexOf( 'Firefox/' ) !== -1 && parseFloat( ua.split( 'Firefox/' )[1] ) < 3 ) ||
31 // BlackBerry < 6
32 ua.match( /BlackBerry[^\/]*\/[1-5]\./ ) ||
33 // Open WebOS < 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/ ) ||
41 // Opera Mini, all versions
42 ua.match( /Opera Mini/ )
43 );
44 }
45
46 /**
47 * The startUp() function will be auto-generated and added below.
48 */