From f49d783415b469bf816c2900f597b207ebd3d712 Mon Sep 17 00:00:00 2001 From: Joe Wreschnig Date: Tue, 23 Sep 2014 18:15:46 +0200 Subject: [PATCH] Add Safari-checking function. --- src/yuu/core.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/yuu/core.js b/src/yuu/core.js index cbeb2a0..1d64e98 100644 --- a/src/yuu/core.js +++ b/src/yuu/core.js @@ -7,6 +7,10 @@ (function (yuu) { "use strict"; + yuu.isSafari = function (ua) { + return /^((?!chrome).)*safari/i.test(ua || navigator.userAgent) + || navigator.standalone; + }; yuu.require = function (m) { try { return require(m); } -- 2.30.2