[Pkg-javascript-commits] [dojo] 111/149: fixes #17498, add modern opera has test

David Prévot taffit at moszumanska.debian.org
Sat Feb 27 03:13:53 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository dojo.

commit 09e2d02be79ae88699a097ebae615ad031eb9562
Author: dylans <dylan at dojotoolkit.org>
Date:   Sat Dec 26 07:36:03 2015 -0700

    fixes #17498, add modern opera has test
---
 sniff.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sniff.js b/sniff.js
index 136111e..187464c 100644
--- a/sniff.js
+++ b/sniff.js
@@ -20,15 +20,17 @@ define(["./has"], function(has){
 		has.add("msapp", parseFloat(dua.split("MSAppHost/")[1]) || undefined);
 		has.add("khtml", dav.indexOf("Konqueror") >= 0 ? tv : undefined);
 		has.add("edge", parseFloat(dua.split("Edge/")[1]) || undefined);
+		has.add("opr", parseFloat(dua.split("OPR/")[1]) || undefined);
+		// NOTE: https://dev.opera.com/blog/opera-user-agent-strings-opera-15-and-beyond/
 		has.add("webkit", !has("wp") // NOTE: necessary since Windows Phone 8.1 Update 1, see #18540
 			&& !has("edge") && parseFloat(dua.split("WebKit/")[1]) || undefined);
-		has.add("chrome", !has("edge")
+		has.add("chrome", !has("edge") && !has("opr")
 				&& parseFloat(dua.split("Chrome/")[1]) || undefined);
 		has.add("android", !has("wp") // NOTE: necessary since Windows Phone 8.1 Update 1, see #18528
 				&& parseFloat(dua.split("Android ")[1]) || undefined);
-		has.add("safari", dav.indexOf("Safari") >= 0 
+		has.add("safari", dav.indexOf("Safari") >= 0
 				&& !has("wp") // NOTE: necessary since Windows Phone 8.1 Update 1, see #18540
-				&& !has("chrome") && !has("android") && !has("edge") ?
+				&& !has("chrome") && !has("android") && !has("edge") && !has("opr") ?
 			parseFloat(dav.split("Version/")[1]) : undefined);
 		has.add("mac", dav.indexOf("Macintosh") >= 0);
 		has.add("quirks", document.compatMode == "BackCompat");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git



More information about the Pkg-javascript-commits mailing list