[Pkg-javascript-commits] [dojo] 47/149: Fix has("safari") to return false on android, fixes #18393.

David Prévot taffit at moszumanska.debian.org
Sat Feb 27 03:13:46 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 d7965830089749ac1fd13fa1ae5db11ee02660c8
Author: Bill Keese <bill at dojotoolkit.org>
Date:   Mon Mar 16 19:52:29 2015 +0900

    Fix has("safari") to return false on android, fixes #18393.
---
 sniff.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sniff.js b/sniff.js
index e2ed0cb..2fc21c5 100644
--- a/sniff.js
+++ b/sniff.js
@@ -21,7 +21,9 @@ define(["./has"], function(has){
 		has.add("khtml", dav.indexOf("Konqueror") >= 0 ? tv : undefined);
 		has.add("webkit", parseFloat(dua.split("WebKit/")[1]) || undefined);
 		has.add("chrome", parseFloat(dua.split("Chrome/")[1]) || undefined);
-		has.add("safari", dav.indexOf("Safari")>=0 && !has("chrome") ? parseFloat(dav.split("Version/")[1]) : undefined);
+		has.add("android", parseFloat(dua.split("Android ")[1]) || undefined);
+		has.add("safari", dav.indexOf("Safari") >= 0 && !has("chrome") && !has("android") ?
+			parseFloat(dav.split("Version/")[1]) : undefined);
 		has.add("mac", dav.indexOf("Macintosh") >= 0);
 		has.add("quirks", document.compatMode == "BackCompat");
 		if(dua.match(/(iPhone|iPod|iPad)/)){
@@ -31,7 +33,6 @@ define(["./has"], function(has){
 			has.add(p, os);		// "iphone", "ipad" or "ipod"
 			has.add("ios", os);
 		}
-		has.add("android", parseFloat(dua.split("Android ")[1]) || undefined);
 		has.add("bb", (dua.indexOf("BlackBerry") >= 0 || dua.indexOf("BB10") >= 0) && parseFloat(dua.split("Version/")[1]) || undefined);
 		has.add("trident", parseFloat(dav.split("Trident/")[1]) || undefined);
 

-- 
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