|
|
@@ -104,6 +104,16 @@ function getSubscriptionInfo() {
|
|
|
return localStorage.getItem(cacheKey) === '1';
|
|
|
}
|
|
|
|
|
|
+function getSafeReturnUrl(value) {
|
|
|
+ if (typeof value !== 'string' || value.trim() === '') return '';
|
|
|
+ try {
|
|
|
+ var url = new URL(value, window.location.href);
|
|
|
+ return url.protocol === 'http:' || url.protocol === 'https:' ? url.href : '';
|
|
|
+ } catch (error) {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
function getIsPostData() {
|
|
|
var installed = isPwaInstall();
|
|
|
|
|
|
@@ -128,6 +138,26 @@ var getUniqueID = (function () {
|
|
|
// 缓存 promise 避免多次执行
|
|
|
let promiseInProgress = null;
|
|
|
|
|
|
+ function resolveUniqueID(resolve, value) {
|
|
|
+ let uniqueID = value;
|
|
|
+ if (!uniqueID) {
|
|
|
+ try {
|
|
|
+ uniqueID = getLocalUUID();
|
|
|
+ } catch (error) {
|
|
|
+ errorpushlog('Failed to create local unique ID:', error);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (uniqueID) {
|
|
|
+ __global_unique_ID = uniqueID;
|
|
|
+ try {
|
|
|
+ setCookie('winus_uuid', uniqueID, 604800000);
|
|
|
+ } catch (error) {
|
|
|
+ errorpushlog('Failed to cache unique ID:', error);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ resolve(uniqueID || '');
|
|
|
+ }
|
|
|
+
|
|
|
return function () {
|
|
|
if (__global_unique_ID) {
|
|
|
return Promise.resolve(__global_unique_ID);
|
|
|
@@ -154,15 +184,20 @@ var getUniqueID = (function () {
|
|
|
if (isInApk()) {
|
|
|
// apk 环境下, 直接返回
|
|
|
promiseInProgress = new Promise(resolve => {
|
|
|
+ let completed = false;
|
|
|
+ const finish = deviceId => {
|
|
|
+ if (completed) return;
|
|
|
+ completed = true;
|
|
|
+ clearTimeout(timeoutId);
|
|
|
+ resolveUniqueID(resolve, deviceId);
|
|
|
+ };
|
|
|
+ const timeoutId = setTimeout(() => finish(''), 5000);
|
|
|
try {
|
|
|
// IPA 环境
|
|
|
if (window?.android?.isIpa) {
|
|
|
// 确保回调函数在调用 getDeviceID 之前就绑定好
|
|
|
window.android.deviceIdCallback = function (deviceId) {
|
|
|
- console.log('deviceIdCallback', deviceId);
|
|
|
- // 如果禁止了第三方cookie, 则将全局唯一标识保存到 当前域名下 cookie 中
|
|
|
- if (deviceId) setCookie('winus_uuid', deviceId, 604800000);
|
|
|
- resolve(deviceId);
|
|
|
+ finish(deviceId);
|
|
|
};
|
|
|
window.android.getDeviceID?.();
|
|
|
return;
|
|
|
@@ -170,13 +205,10 @@ var getUniqueID = (function () {
|
|
|
|
|
|
// 普通 APK 环境
|
|
|
const deviceId = window?.android?.getDeviceID?.();
|
|
|
- if (deviceId) {
|
|
|
- // 如果禁止了第三方cookie, 则将全局唯一标识保存到 当前域名下 cookie 中
|
|
|
- setCookie('winus_uuid', deviceId, 604800000);
|
|
|
- resolve(deviceId);
|
|
|
- }
|
|
|
+ finish(deviceId);
|
|
|
} catch (error) {
|
|
|
- console.log(error);
|
|
|
+ errorpushlog('Failed to read native device ID:', error);
|
|
|
+ finish('');
|
|
|
}
|
|
|
});
|
|
|
return promiseInProgress;
|
|
|
@@ -185,33 +217,47 @@ var getUniqueID = (function () {
|
|
|
promiseInProgress = new Promise(function (resolve) {
|
|
|
var iframe = document.createElement('iframe');
|
|
|
|
|
|
- iframe.src = window.location.protocol + '//' + 'cen.greatus777.com' + '/storage';
|
|
|
+ iframe.src = window.location.protocol + '//cen.greatus777.com/storage';
|
|
|
// iframe.src = window.location.protocol + '//' + 'dev.winus777.com' + '/storage';
|
|
|
|
|
|
- iframe.style.display = 'none';
|
|
|
+ var iframeOrigin = new URL(iframe.src).origin;
|
|
|
+ var timeoutId = null;
|
|
|
+ var completed = false;
|
|
|
|
|
|
- document.body.appendChild(iframe);
|
|
|
+ function cleanup() {
|
|
|
+ if (timeoutId) clearTimeout(timeoutId);
|
|
|
+ window.removeEventListener('message', messageHandler);
|
|
|
+ if (iframe.parentNode) iframe.parentNode.removeChild(iframe);
|
|
|
+ }
|
|
|
|
|
|
- iframe.addEventListener('load', function () {
|
|
|
- iframe.contentWindow.postMessage('getUniqueID', '*');
|
|
|
- });
|
|
|
+ function finish(value) {
|
|
|
+ if (completed) return;
|
|
|
+ completed = true;
|
|
|
+ cleanup();
|
|
|
+ resolveUniqueID(resolve, value);
|
|
|
+ }
|
|
|
|
|
|
- function messageHandler(event) {
|
|
|
- if (event && event.data && event.data !== 'undefined') {
|
|
|
- const data = event.data;
|
|
|
- __global_unique_ID = data.md5val;
|
|
|
+ iframe.style.display = 'none';
|
|
|
|
|
|
- // 如果禁止了第三方cookie, 则将全局唯一标识保存到 当前域名下 cookie 中
|
|
|
- setCookie('winus_uuid', __global_unique_ID, 604800000);
|
|
|
+ iframe.addEventListener('load', function () {
|
|
|
+ iframe.contentWindow?.postMessage('getUniqueID', iframeOrigin);
|
|
|
+ }, { once: true });
|
|
|
+ iframe.addEventListener('error', function () {
|
|
|
+ finish('');
|
|
|
+ }, { once: true });
|
|
|
|
|
|
- resolve(__global_unique_ID);
|
|
|
- window.removeEventListener('message', messageHandler);
|
|
|
- document.body.removeChild(iframe);
|
|
|
- }
|
|
|
+ function messageHandler(event) {
|
|
|
+ if (event.origin !== iframeOrigin || event.source !== iframe.contentWindow) return;
|
|
|
+ const uniqueID = event.data && typeof event.data === 'object' ? event.data.md5val : '';
|
|
|
+ if (uniqueID) finish(uniqueID);
|
|
|
}
|
|
|
|
|
|
// 监听 iframe 的消息
|
|
|
window.addEventListener('message', messageHandler);
|
|
|
+ document.body.appendChild(iframe);
|
|
|
+ timeoutId = setTimeout(function () {
|
|
|
+ finish('');
|
|
|
+ }, 8000);
|
|
|
});
|
|
|
return promiseInProgress;
|
|
|
};
|
|
|
@@ -272,16 +318,16 @@ function isIOS() {
|
|
|
|
|
|
function openUrlUseSafari(url = "", isNewTab = true, isBFP = true) {
|
|
|
if (url == null || url === "") url = window.location.href;
|
|
|
- if (global.BFP != null && global.BFP !== "" && isBFP) {
|
|
|
- if (url.indexOf("?") === -1) url += "?bfp=" + global.BFP;
|
|
|
- else url += "&bfp=" + global.BFP;
|
|
|
+ if (window.BFP != null && window.BFP !== "" && isBFP) {
|
|
|
+ if (url.indexOf("?") === -1) url += "?bfp=" + window.BFP;
|
|
|
+ else url += "&bfp=" + window.BFP;
|
|
|
}
|
|
|
if (isIOS()) {
|
|
|
const safariUrl = url.startsWith('https')
|
|
|
? url.replace('https://', 'x-safari-https://')
|
|
|
: url.replace('http://', 'x-safari-https://');
|
|
|
if (isNewTab) {
|
|
|
- window.open(safariUrl, '_blank');
|
|
|
+ window.open(safariUrl, '_blank', 'noopener,noreferrer');
|
|
|
} else {
|
|
|
window.location.href = safariUrl;
|
|
|
}
|
|
|
@@ -289,11 +335,11 @@ function openUrlUseSafari(url = "", isNewTab = true, isBFP = true) {
|
|
|
}
|
|
|
|
|
|
function openChrome() {
|
|
|
- var url = location.href;
|
|
|
+ var url = window.location.href;
|
|
|
|
|
|
if (isIOS()) {
|
|
|
let r = "googlechromes://" + url.replace(/^https?:\/\//, "");
|
|
|
- window.open(r, "_blank");
|
|
|
+ window.open(r, "_blank", "noopener,noreferrer");
|
|
|
} else {
|
|
|
url = url.replace('https://', '');
|
|
|
url = url.replace('http://', '');
|
|
|
@@ -301,14 +347,16 @@ function openChrome() {
|
|
|
'intent://' + url + '#Intent;scheme=https;action=android.intent.action.VIEW;component=com.android.chrome;end';
|
|
|
|
|
|
var a = document.getElementById('pwaIFrame');
|
|
|
- a ||
|
|
|
- (((a = document.createElement('iframe')).id = 'pwaIFrame'),
|
|
|
- (a.style.width = '0'),
|
|
|
- (a.style.height = '0'),
|
|
|
- (a.style.opacity = '0'),
|
|
|
- (a.name = 'pwaIFrame'),
|
|
|
- document.body.appendChild(a)),
|
|
|
- (a.src = newLink);
|
|
|
+ if (!a) {
|
|
|
+ a = document.createElement('iframe');
|
|
|
+ a.id = 'pwaIFrame';
|
|
|
+ a.style.width = '0';
|
|
|
+ a.style.height = '0';
|
|
|
+ a.style.opacity = '0';
|
|
|
+ a.name = 'pwaIFrame';
|
|
|
+ document.body.appendChild(a);
|
|
|
+ }
|
|
|
+ a.src = newLink;
|
|
|
}
|
|
|
setTimeout(() => {
|
|
|
if (!document.hidden) {
|
|
|
@@ -347,7 +395,7 @@ function errorpushlog(...args) {
|
|
|
// 将URL Base64编码的字符串转换为Uint8Array
|
|
|
function urlBase64ToUint8Array(base64String) {
|
|
|
var padding = '='.repeat((4 - (base64String.length % 4)) % 4);
|
|
|
- var base64 = (base64String + padding).replace(/\-/g, '+').replace(/_/g, '/');
|
|
|
+ var base64 = (base64String + padding).replace(/-/g, '+').replace(/_/g, '/');
|
|
|
|
|
|
var rawData = window.atob(base64);
|
|
|
var outputArray = new Uint8Array(rawData.length);
|
|
|
@@ -395,9 +443,9 @@ function submitSubscription(subscription, channel, userid) {
|
|
|
var xhr = new XMLHttpRequest();
|
|
|
// 墨西哥订阅地址
|
|
|
if (window.mode_env === 'development') {
|
|
|
- xhr.open('POST', API_URL+'/api/push_subscribe', true);
|
|
|
+ xhr.open('POST', API_URL + '/api/push_subscribe', true);
|
|
|
} else {
|
|
|
- xhr.open('POST', API_URL+'/api/push_subscribe', true);
|
|
|
+ xhr.open('POST', API_URL + '/api/push_subscribe', true);
|
|
|
}
|
|
|
|
|
|
xhr.setRequestHeader('Content-Type', 'application/json');
|
|
|
@@ -435,7 +483,7 @@ function recordEvent(eventName, channel, remark, userid) {
|
|
|
var host = 'us_' + h2 + '_' + h3 + '_' + h4;
|
|
|
|
|
|
var url =
|
|
|
- API_URL+'/api/weblog?host=' + host + '&act=' + eventName + '&remark=' + remark + '&orderid=' + userid;
|
|
|
+ API_URL + '/api/weblog?host=' + host + '&act=' + eventName + '&remark=' + remark + '&orderid=' + userid;
|
|
|
var xhr = new XMLHttpRequest();
|
|
|
xhr.open('GET', url, true);
|
|
|
xhr.send();
|
|
|
@@ -449,8 +497,9 @@ function requestNotificationPermission(registration, channel, userid, machineser
|
|
|
Notification.requestPermission().then(function (permission) {
|
|
|
if (permission === 'granted') {
|
|
|
pushmlog('User has authorized push notifications');
|
|
|
+ recordEvent('push_permission', channel, 'allow', userid);
|
|
|
// 注册Service Worker
|
|
|
- registration.pushManager
|
|
|
+ return registration.pushManager
|
|
|
.subscribe({
|
|
|
userVisibleOnly: true,
|
|
|
applicationServerKey: urlBase64ToUint8Array(
|
|
|
@@ -475,7 +524,7 @@ function requestNotificationPermission(registration, channel, userid, machineser
|
|
|
if (+ish5 === 1) {
|
|
|
if (udatadict.returnurl) {
|
|
|
setTimeout(() => {
|
|
|
- location.href = udatadict.returnurl;
|
|
|
+ window.location.href = udatadict.returnurl;
|
|
|
}, 1000);
|
|
|
}
|
|
|
} else {
|
|
|
@@ -495,9 +544,10 @@ function requestNotificationPermission(registration, channel, userid, machineser
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ })
|
|
|
+ .catch(function (error) {
|
|
|
+ errorpushlog('Failed to subscribe to push notifications:', error);
|
|
|
});
|
|
|
-
|
|
|
- recordEvent('push_permission', channel, 'allow', userid);
|
|
|
} else if (permission === 'denied') {
|
|
|
pushmlog('User denied push notifications', userid, machineserial, ish5, channel);
|
|
|
recordEvent('push_permission', channel, 'deny', userid);
|
|
|
@@ -513,7 +563,7 @@ function requestNotificationPermission(registration, channel, userid, machineser
|
|
|
if (+ish5 === 1) {
|
|
|
if (udatadict.returnurl) {
|
|
|
setTimeout(() => {
|
|
|
- location.href = udatadict.returnurl;
|
|
|
+ window.location.href = udatadict.returnurl;
|
|
|
}, 1000);
|
|
|
}
|
|
|
} else {
|
|
|
@@ -547,7 +597,7 @@ function requestNotificationPermission(registration, channel, userid, machineser
|
|
|
if (+ish5 === 1) {
|
|
|
if (udatadict.returnurl) {
|
|
|
setTimeout(() => {
|
|
|
- location.href = udatadict.returnurl;
|
|
|
+ window.location.href = udatadict.returnurl;
|
|
|
}, 1000);
|
|
|
}
|
|
|
} else {
|
|
|
@@ -569,6 +619,8 @@ function requestNotificationPermission(registration, channel, userid, machineser
|
|
|
});
|
|
|
recordEvent('push_permission', channel, 'pending', userid);
|
|
|
}
|
|
|
+ }).catch(function (error) {
|
|
|
+ errorpushlog('Failed to request notification permission:', error);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
@@ -588,11 +640,11 @@ function checkPushPermission(channel, userid, machineserial, type, options) {
|
|
|
var endCallback = options && options.endCallback;
|
|
|
|
|
|
try {
|
|
|
- if (userid == undefined) {
|
|
|
+ if (userid == null) {
|
|
|
userid = 0;
|
|
|
}
|
|
|
|
|
|
- if (channel == undefined) {
|
|
|
+ if (channel == null) {
|
|
|
channel = 'default';
|
|
|
}
|
|
|
|
|
|
@@ -605,7 +657,7 @@ function checkPushPermission(channel, userid, machineserial, type, options) {
|
|
|
udatadict.fingerprint = fingerprint;
|
|
|
udatadict.machineserial = machineserial;
|
|
|
udatadict.type = type;
|
|
|
- udatadict.returnurl = returnurl;
|
|
|
+ udatadict.returnurl = getSafeReturnUrl(returnurl);
|
|
|
|
|
|
// 保存到 localstorage
|
|
|
localStorage.setItem('pushudatadict', JSON.stringify(udatadict));
|
|
|
@@ -620,7 +672,8 @@ function checkPushPermission(channel, userid, machineserial, type, options) {
|
|
|
isCheckingPushPermission = true;
|
|
|
|
|
|
// 检查是否支持service worker
|
|
|
- if (registration == undefined || registration == null || registration.pushManager == undefined) {
|
|
|
+ if (!registration?.pushManager) {
|
|
|
+ isCheckingPushPermission = false;
|
|
|
!isInApk() &&
|
|
|
setTimeout(() => {
|
|
|
document.body.addEventListener('click', openChrome);
|
|
|
@@ -633,7 +686,7 @@ function checkPushPermission(channel, userid, machineserial, type, options) {
|
|
|
|
|
|
var cacheKey = 'submit_subscription_' + udatadict.channel + '_' + udatadict.userid + '_' + installed;
|
|
|
|
|
|
- registration.pushManager.getSubscription().then(function (subscription) {
|
|
|
+ return registration.pushManager.getSubscription().then(function (subscription) {
|
|
|
isCheckingPushPermission = false; // 已经有结果了
|
|
|
if (subscription) {
|
|
|
var subscriptionOld = localStorage.getItem('subscription');
|
|
|
@@ -643,7 +696,7 @@ function checkPushPermission(channel, userid, machineserial, type, options) {
|
|
|
// 判断 当前渠道+当前用户 是否已经上报过授权. 如果未上报过, 则上报一次
|
|
|
var cacheValue = localStorage.getItem(cacheKey);
|
|
|
|
|
|
- if (cacheValue && subscriptionOld && subscriptionOld == JSON.stringify(subscription)) {
|
|
|
+ if (cacheValue && subscriptionOld && subscriptionOld === JSON.stringify(subscription)) {
|
|
|
pushmlog('User has already reported subscription info');
|
|
|
return;
|
|
|
}
|
|
|
@@ -651,7 +704,7 @@ function checkPushPermission(channel, userid, machineserial, type, options) {
|
|
|
recordEvent('push_permission', udatadict.channel, 'update', udatadict.userid);
|
|
|
localStorage.setItem('subscription', JSON.stringify(subscription)); // 更新
|
|
|
submitSubscription(subscription, udatadict.channel, udatadict.userid); // 已经授权过就再上报一次 如果未上报
|
|
|
- var ispost = getIsPostData();
|
|
|
+ const ispost = getIsPostData();
|
|
|
if (!ispost) {
|
|
|
uploadSubscription({
|
|
|
userid: udatadict.userid || '',
|
|
|
@@ -669,7 +722,7 @@ function checkPushPermission(channel, userid, machineserial, type, options) {
|
|
|
// 判断 通知状态
|
|
|
if (Notification.permission === 'denied') {
|
|
|
endCallback && endCallback('denied');
|
|
|
- var ispost = getIsPostData();
|
|
|
+ const ispost = getIsPostData();
|
|
|
if (!ispost) {
|
|
|
uploadSubscription({
|
|
|
userid: udatadict.userid || '',
|
|
|
@@ -686,10 +739,14 @@ function checkPushPermission(channel, userid, machineserial, type, options) {
|
|
|
requestNotificationPermission(registration, udatadict.channel, udatadict.userid, machineserial, type);
|
|
|
}
|
|
|
}
|
|
|
+ }).catch(function (error) {
|
|
|
+ isCheckingPushPermission = false;
|
|
|
+ errorpushlog('Failed to read push subscription:', error);
|
|
|
});
|
|
|
})
|
|
|
.catch(e => {
|
|
|
- console.log(e);
|
|
|
+ isCheckingPushPermission = false;
|
|
|
+ errorpushlog('Service worker readiness failed:', e);
|
|
|
});
|
|
|
});
|
|
|
} catch (error) {
|
|
|
@@ -701,17 +758,17 @@ function checkPushPermission(channel, userid, machineserial, type, options) {
|
|
|
// 外部调用。每次
|
|
|
function checkAlive(userid, vippoint, channel, score) {
|
|
|
try {
|
|
|
- if (udatadict.fingerprint == undefined) {
|
|
|
+ if (udatadict.fingerprint === undefined || udatadict.fingerprint === null) {
|
|
|
var udatadictstr = localStorage.getItem('pushudatadict');
|
|
|
if (udatadictstr) {
|
|
|
udatadict = JSON.parse(udatadictstr);
|
|
|
}
|
|
|
- if (udatadict.fingerprint == undefined) {
|
|
|
+ if (udatadict.fingerprint === undefined || udatadict.fingerprint === null) {
|
|
|
errorpushlog('udatadict.fingerprint is undefined');
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
- if (userid == undefined) {
|
|
|
+ if (userid === undefined || userid === null) {
|
|
|
errorpushlog('userid is undefined');
|
|
|
return;
|
|
|
}
|
|
|
@@ -756,15 +813,15 @@ function checkAlive(userid, vippoint, channel, score) {
|
|
|
}
|
|
|
//简单加密
|
|
|
const encrypt = (str, pwd) => {
|
|
|
- if (str == '') {
|
|
|
+ if (str === '') {
|
|
|
return '';
|
|
|
}
|
|
|
str = encodeURIComponent(str);
|
|
|
- if (!pwd || pwd == '') {
|
|
|
+ if (!pwd || pwd === '') {
|
|
|
pwd = 'xbd4jl';
|
|
|
}
|
|
|
pwd = encodeURIComponent(pwd);
|
|
|
- if (pwd == '' || pwd.length <= 0) {
|
|
|
+ if (pwd === '' || pwd.length <= 0) {
|
|
|
return '';
|
|
|
}
|
|
|
var prand = '';
|
|
|
@@ -794,8 +851,8 @@ const encrypt = (str, pwd) => {
|
|
|
prand = (mult * prand + incr) % modu;
|
|
|
var encChr = '';
|
|
|
var encStr = '';
|
|
|
- for (var i = 0, len = str.length; i < len; i += 1) {
|
|
|
- encChr = parseInt(str.charCodeAt(i) ^ Math.floor((prand / modu) * 255));
|
|
|
+ for (var strIndex = 0, strLength = str.length; strIndex < strLength; strIndex += 1) {
|
|
|
+ encChr = parseInt(str.charCodeAt(strIndex) ^ Math.floor((prand / modu) * 255));
|
|
|
if (encChr < 16) {
|
|
|
encStr += '0' + encChr.toString(16);
|
|
|
} else {
|
|
|
@@ -812,17 +869,17 @@ const encrypt = (str, pwd) => {
|
|
|
}
|
|
|
//简单解密
|
|
|
const decrypt = (str, pwd) => {
|
|
|
- if (str == '') {
|
|
|
+ if (str === '') {
|
|
|
return '';
|
|
|
}
|
|
|
- if (!pwd || pwd == '') {
|
|
|
+ if (!pwd || pwd === '') {
|
|
|
pwd = 'xbd4jl';
|
|
|
}
|
|
|
pwd = encodeURIComponent(pwd);
|
|
|
- if (str == undefined || str.length < 8) {
|
|
|
+ if (str === undefined || str === null || str.length < 8) {
|
|
|
return '';
|
|
|
}
|
|
|
- if (pwd == undefined || pwd.length <= 0) {
|
|
|
+ if (pwd === undefined || pwd === null || pwd.length <= 0) {
|
|
|
return '';
|
|
|
}
|
|
|
var prand = '';
|
|
|
@@ -854,8 +911,8 @@ const decrypt = (str, pwd) => {
|
|
|
prand = (mult * prand + incr) % modu;
|
|
|
var encChr = '';
|
|
|
var encStr = '';
|
|
|
- for (var i = 0, len = str.length; i < len; i += 2) {
|
|
|
- encChr = parseInt(parseInt(str.substring(i, i + 2), 16) ^ Math.floor((prand / modu) * 255));
|
|
|
+ for (var strIndex = 0, strLength = str.length; strIndex < strLength; strIndex += 2) {
|
|
|
+ encChr = parseInt(parseInt(str.substring(strIndex, strIndex + 2), 16) ^ Math.floor((prand / modu) * 255));
|
|
|
encStr += String.fromCharCode(encChr);
|
|
|
prand = (mult * prand + incr) % modu;
|
|
|
}
|
|
|
@@ -961,6 +1018,17 @@ function generateUUIDv7() {
|
|
|
.join('');
|
|
|
}
|
|
|
|
|
|
+// Public API consumed by the standalone PWA pages and native shells.
|
|
|
+Object.assign(window, {
|
|
|
+ getSubscriptionInfo,
|
|
|
+ openUrlUseSafari,
|
|
|
+ isInChromeBrowser,
|
|
|
+ checkPushPermission,
|
|
|
+ checkAlive,
|
|
|
+ localStorageRemove,
|
|
|
+ ProcessChannel
|
|
|
+});
|
|
|
+
|
|
|
if (isIOS()) {
|
|
|
window.location.href = window.location.origin + '/' + window.location.search;
|
|
|
-}
|
|
|
+}
|