From: Joe Wreschnig Date: Tue, 23 Sep 2014 16:15:46 +0000 (+0200) Subject: Add Safari-checking function. X-Git-Url: https://git.yukkurigames.com/?a=commitdiff_plain;h=f49d783415b469bf816c2900f597b207ebd3d712;p=yuu.git Add Safari-checking function. --- 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); }