X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fstartup.js;h=a62cc9d6642df64265a912cc29e95bd91030b688;hb=ccf85402b27947bdeffa7b515af2f494347560ca;hp=e2f47f577673d8979871eef230488e9fe1f66bb6;hpb=7eddc5caaaa92108836c8191b16520f862af94ce;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/startup.js b/resources/src/startup.js index e2f47f5776..a62cc9d664 100644 --- a/resources/src/startup.js +++ b/resources/src/startup.js @@ -7,15 +7,14 @@ var mediaWikiLoadStart = ( new Date() ).getTime(); /** - * Returns false when run in a black-listed browser + * Returns false for Grade C supported browsers. * - * This function will be deleted after it's used, so do not expand it to be - * generally useful beyond startup. + * This function should only be used by the Startup module, do not expand it to + * be generally useful beyond startup. * * See also: - * - https://www.mediawiki.org/wiki/Compatibility#Browser - * - http://jquerymobile.com/gbs/ - * - http://jquery.com/browser-support/ + * - https://www.mediawiki.org/wiki/Compatibility#Browsers + * - https://jquery.com/browser-support/ */ /*jshint unused: false */ @@ -26,10 +25,19 @@ function isCompatible( ua ) { // Browsers with outdated or limited JavaScript engines get the no-JS experience return !( - // Internet Explorer < 7 - ( ua.indexOf( 'MSIE' ) !== -1 && parseFloat( ua.split( 'MSIE' )[1] ) < 7 ) || + // Internet Explorer < 8 + ( ua.indexOf( 'MSIE' ) !== -1 && parseFloat( ua.split( 'MSIE' )[1] ) < 8 ) || // Firefox < 3 ( ua.indexOf( 'Firefox/' ) !== -1 && parseFloat( ua.split( 'Firefox/' )[1] ) < 3 ) || + // Opera < 12 + ( ua.indexOf( 'Opera/' ) !== -1 && ( ua.indexOf( 'Version/' ) === -1 ? + // "Opera/x.y" + parseFloat( ua.split( 'Opera/' )[1] ) < 10 : + // "Opera/9.80 ... Version/x.y" + parseFloat( ua.split( 'Version/' )[1] ) < 12 + ) ) || + // "Mozilla/0.0 ... Opera x.y" + ( ua.indexOf( 'Opera ' ) !== -1 && parseFloat( ua.split( ' Opera ' )[1] ) < 10 ) || // BlackBerry < 6 ua.match( /BlackBerry[^\/]*\/[1-5]\./ ) || // Open WebOS < 1.5