all files / dist/ deep-link.min.js

57.5% Statements 23/40
30.19% Branches 16/53
52.63% Functions 10/19
100% Lines 1/1
1
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("DeepLink",[],t):"object"==typeof exports?exports.DeepLink=t():e.DeepLink=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(o){if(In[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";function o(e,t){if(I!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},i=function e(t){var n=this;o(this,e),this.options=t,this.register=function(e,t){if(Ivoid 0===t.appScheme)throw Error("appScheme is a required param value.");r(e,"click",function(e){e&&e.preventDefault(),n.openApp(t)})},this.openApp=function(e){if(Ivoid 0===e.appScheme)throw Error("appScheme is a required param value.");var t=navigator.userAgent.toLowerCase(),o=/iphone|ipad|ipod/.test(t),r=~t.indexOf("android");Iif(o||r){var i=void 0,a=void 0,c=function(){clearInterval(i),clearTimeout(a)},p=function(){(document.webkitHidden||document.hidden)&&c()};i=setInterval(p,200),a=setTimeout(function(){var e=o?n.options.appStore:n.options.playStore;e&&(document.location.href=e)},1e3),e.appScheme&&(document.location.href=e.appScheme)}else e.webUrl&&(document.location.href=e.webUrl)}};t.default=i,e.exports=t.default}])});