Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = { isApp: function isApp() { var userAgent = window.navigator.userAgent.toLowerCase(); if (userAgent.indexOf('umsopencore/1.0.0 51') > -1) { return true; } return false; }, isWechat: function isWechat() { var userAgent = window.navigator.userAgent.toLowerCase(); if (userAgent.indexOf('micromessenger') === -1) { return false; } return true; }, isIOS: function isIOS() { var ua = window.navigator.userAgent; var result = /iPad|iPhone|iPod/.test(ua) && !window.MSStream; return result; }, isAndroid: function isAndroid() { var ua = window.navigator.userAgent; if (ua.indexOf('Android') > -1 || ua.indexOf('Adr') > -1) { return true; } else { return false; } }, downloadApp: function downloadApp() { window.location.href = 'http://info.snapp.chinaums.com/snapp/info/www/qmcs_download/index.html'; }, communicateToNative: function communicateToNative() { var jsBridgeParam = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; if (this.isIOS()) { window.webkit.messageHandlers.jsToNativeData.postMessage({ body: jsBridgeParam }); } else if (this.isAndroid()) { var paramJsonStr = JSON.stringify(jsBridgeParam); window.Android.jsToNativeMethod(paramJsonStr); } }, compareVersion: function compareVersion(version) { if (version) { var appVersion = navigator.userAgent.match(/feifan;([\d\.]+)/i); appVersion = appVersion ? appVersion[1] : '0.0.0.0'; var appArray = appVersion.split('.'); var tarArray = version.split('.'); for (var i = 0; i < appArray.length || i < tarArray.length; i++) { var n1 = +appArray[i]; var n2 = +tarArray[i]; if (isNaN(n1)) n1 = 0; if (isNaN(n2)) n2 = 0; if (n1 < n2) return -1; if (n1 > n2) return 1; } return 0; } else { return false; } }, toSchema: function toSchema(url) { return 'wandaappfeifan://app/CommonWebView?url=' + encodeURIComponent(url); } }; |