[Pkg-javascript-commits] [dojo] 51/149: Fixes #18528.fixed has(ios) and has(android) true on wp
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 466145c059f76fde8b3f130e6a9e777d3193a4e5
Author: Youcef Mammar <youcef.mammar at fr.ibm.com>
Date: Thu Mar 19 20:35:26 2015 +0100
Fixes #18528.fixed has(ios) and has(android) true on wp
---
sniff.js | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sniff.js b/sniff.js
index 2fc21c5..d26d37e 100644
--- a/sniff.js
+++ b/sniff.js
@@ -15,18 +15,20 @@ define(["./has"], function(has){
dua = n.userAgent,
dav = n.appVersion,
tv = parseFloat(dav);
-
has.add("air", dua.indexOf("AdobeAIR") >= 0);
+ has.add("wp", parseFloat(dua.split("Windows Phone")[1]) || undefined);
has.add("msapp", parseFloat(dua.split("MSAppHost/")[1]) || undefined);
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("android", parseFloat(dua.split("Android ")[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("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)/)){
+ if(!has("wp") // NOTE: necessary since Windows Phone 8.1 Update 1, see #18528
+ && dua.match(/(iPhone|iPod|iPad)/)){
var p = RegExp.$1.replace(/P/, "p");
var v = dua.match(/OS ([\d_]+)/) ? RegExp.$1 : "1";
var os = parseFloat(v.replace(/_/, ".").replace(/_/g, ""));
--
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