Script and makefile adjustments for updating extlib
[larjonas-mediagoblin.git] / extlib / leaflet / src / core / Browser.js
blob0604ed6dd69e73967c4ed619bebb9761eb9f843c
1 (function() {
2 var ua = navigator.userAgent.toLowerCase(),
3 ie = !!window.ActiveXObject,
4 webkit = ua.indexOf("webkit") != -1,
5 mobile = ua.indexOf("mobi") != -1,
6 android = ua.indexOf("android") != -1,
7 opera = window.opera;
9 L.Browser = {
10 ie: ie,
11 ie6: ie && !window.XMLHttpRequest,
12 webkit: webkit,
13 webkit3d: webkit && ('WebKitCSSMatrix' in window) && ('m11' in new WebKitCSSMatrix()),
14 mobileWebkit: webkit && (mobile || android),
15 mobileOpera: mobile && opera,
16 gecko: ua.indexOf("gecko") != -1,
17 android: android
20 //TODO replace ugly ua sniffing with feature detection
22 L.Browser.touch = L.Browser.mobileWebkit || L.Browser.mobileOpera;
23 })();