From 6d14a127ec8fb0a75a058afe3a76ff3440e50030 Mon Sep 17 00:00:00 2001 From: Catrope Date: Tue, 29 Jan 2013 17:42:39 -0800 Subject: [PATCH] Make jquery.client recognize Iceweasel Change-Id: Ide927219fc2a102a9c0adad9b39f155dfb86c27d --- resources/jquery/jquery.client.js | 4 ++-- .../resources/jquery/jquery.client.test.js | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/resources/jquery/jquery.client.js b/resources/jquery/jquery.client.js index cddd4ec2b0..b0bd6850b6 100644 --- a/resources/jquery/jquery.client.js +++ b/resources/jquery/jquery.client.js @@ -69,14 +69,14 @@ // Strings which precede a version number in a user agent string - combined and used as match 1 in // version detectection versionPrefixes = [ - 'camino', 'chrome', 'firefox', 'netscape', 'netscape6', 'opera', 'version', 'konqueror', + 'camino', 'chrome', 'firefox', 'iceweasel', 'netscape', 'netscape6', 'opera', 'version', 'konqueror', 'lynx', 'msie', 'safari', 'ps3' ], // Used as matches 2, 3 and 4 in version extraction - 3 is used as actual version number versionSuffix = '(\\/|\\;?\\s|)([a-z0-9\\.\\+]*?)(\\;|dev|rel|\\)|\\s|$)', // Names of known browsers names = [ - 'camino', 'chrome', 'firefox', 'netscape', 'konqueror', 'lynx', 'msie', 'opera', + 'camino', 'chrome', 'firefox', 'iceweasel', 'netscape', 'konqueror', 'lynx', 'msie', 'opera', 'safari', 'ipod', 'iphone', 'blackberry', 'ps3', 'rekonq' ], // Tanslations for conforming browser names diff --git a/tests/qunit/suites/resources/jquery/jquery.client.test.js b/tests/qunit/suites/resources/jquery/jquery.client.test.js index 29c665702d..44aaefd0bc 100644 --- a/tests/qunit/suites/resources/jquery/jquery.client.test.js +++ b/tests/qunit/suites/resources/jquery/jquery.client.test.js @@ -123,6 +123,24 @@ rtl: true } }, + // Iceweasel 10.0.6 + 'Mozilla/5.0 (X11; Linux i686; rv:10.0.6) Gecko/20100101 Iceweasel/10.0.6': { + title: 'Iceweasel 10.0.6', + platform: 'Linux', + profile: { + name: 'iceweasel', + layout: 'gecko', + layoutVersion: 20100101, + platform: 'linux', + version: '10.0.6', + versionBase: '10', + versionNumber: 10 + }, + wikiEditor: { + ltr: true, + rtl: true + } + }, // Firefox 5 // Safari 3 // Safari 4 -- 2.20.1