From 47b51705fa0afb01346540f131d09d9f9cd86306 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Sun, 24 Aug 2014 15:57:31 +0200 Subject: [PATCH] startup: Blacklist Opera < 12 jQuery hasn't supported Opera < 12 for several releases now, and our own support matrix and development practices also consider Opera 11 and below being Grade C (there are known problems in Opera 8 and 10, such as missing features and implementation bugs). Update the blacklist to reflect Opera < 12 being Grade C. https://www.mediawiki.org/wiki/Compatibility#Browser_support_matrix Change-Id: Ia2764a49c5d1fad73bd4eb52748269407231700e --- RELEASE-NOTES-1.24 | 9 +++++---- resources/src/startup.js | 9 +++++++++ tests/qunit/suites/resources/startup.test.js | 21 +++++++++++++++++--- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index cd4e6680c8..b0197ab341 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -344,10 +344,11 @@ changes to languages because of Bugzilla reports. setPreloadedText() from EditPage.php. (deprecated since 1.21) * Removed global functions wfArrayLookup(), wfArrayMerge(), wfDebugDieBacktrace() and wfTime(). (deprecated since 1.22) -* Microsoft Internet Explorer 6 is now a "grade C" browser, meaning that - JavaScript is no longer executed in this browser. The IEFixes script, which - existed purely to provide support for MSIE versions below 7 and which was - conditionally loaded for those browsers, was also removed. +* Browser support for Internet Explorer 6 lowered from Grade A to Grade C, + meaning that JavaScript is no longer executed in this browser. +* Browser support for Opera 11 lowered from Grade A to Grade C. +* Removed IEFixes module which existed purely to provide support for MSIE versions + below 7 (conditionally loaded only for those browsers). * Action::checkCanExecute() no longer has a return value. * Removed cleanupForIRC(), loadFromCurRow(), newFromCurRow(), notifyRC2UDP() and sendToUDP() from RecentChange.php. (deprecated since 1.22) diff --git a/resources/src/startup.js b/resources/src/startup.js index e2f47f5776..01efef4aab 100644 --- a/resources/src/startup.js +++ b/resources/src/startup.js @@ -30,6 +30,15 @@ function isCompatible( ua ) { ( ua.indexOf( 'MSIE' ) !== -1 && parseFloat( ua.split( 'MSIE' )[1] ) < 7 ) || // 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 diff --git a/tests/qunit/suites/resources/startup.test.js b/tests/qunit/suites/resources/startup.test.js index dcab38743c..c3b9b3d70f 100644 --- a/tests/qunit/suites/resources/startup.test.js +++ b/tests/qunit/suites/resources/startup.test.js @@ -15,8 +15,13 @@ 'Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Kindle Fire Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Safari/533.1', // Safari 5.0+ 'Mozilla/5.0 (Macintosh; I; Intel Mac OS X 10_6_7; ru-ru) AppleWebKit/534.31+ (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1', - // Opera 11+ - 'Opera/9.80 (Windows NT 6.1; U; ru) Presto/2.8.131 Version/11.10', + // Opera 12+ (Presto-based) + 'Opera/9.80 (Windows NT 6.1; U; es-ES) Presto/2.9.181 Version/12.00', + 'Opera/9.80 (Windows NT 5.1) Presto/2.12.388 Version/12.17', + // Opera 15+ (Chromium-based) + 'Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36 OPR/15.0.1147.153', + 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36 OPR/16.0.1196.62', + 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36 OPR/23.0.1522.75', // Internet Explorer 7+ 'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.0; en-US)', 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; Media Center PC 4.0; SLCC1; .NET CLR 3.0.04320)', @@ -46,9 +51,19 @@ 'Mozilla/4.0 (compatible; MSIE 5.0; Windows 98;)', 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)', 'Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1)', - // Firefox < 3.6 + // Firefox < 3 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2', 'Mozilla/5.0 (X11; U; Linux i686; nl; rv:1.8.1.1) Gecko/20070311 Firefox/2.0.0.1', + // Opera < 12 + 'Mozilla/5.0 (Windows NT 5.0; U) Opera 7.54 [en]', + 'Opera/7.54 (Windows NT 5.0; U) [en]', + 'Mozilla/5.0 (Windows NT 5.1; U; en) Opera 8.0', + 'Opera/8.0 (X11; Linux i686; U; cs)', + 'Opera/9.00 (X11; Linux i686; U; de)', + 'Opera/9.62 (X11; Linux i686; U; en) Presto/2.1.1', + 'Opera/9.80 (Windows NT 6.1; U; en) Presto/2.2.15 Version/10.00', + 'Opera/9.80 (Windows NT 6.1; U; ru) Presto/2.8.131 Version/11.10', + 'Opera/9.80 (Windows NT 6.1; WOW64; U; pt) Presto/2.10.229 Version/11.62', // BlackBerry < 6 'BlackBerry9300/5.0.0.716 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/133', 'BlackBerry7250/4.0.0 Profile/MIDP-2.0 Configuration/CLDC-1.1', -- 2.20.1