Commit 05303ebe by libai

测试

parent 13cf8126
Showing with 1 additions and 2 deletions
......@@ -15,6 +15,7 @@ const addBtn = document.querySelector('.add-button');
addBtn.style.display = 'none';
window.addEventListener('beforeinstallprompt', (e) => {
console.log(123)
var ua = window.navigator.userAgent.toLowerCase();
if (/android/.test(ua)) {
if(sessionStorage.type=="pwa")return;
......@@ -42,14 +43,12 @@ window.addEventListener('beforeinstallprompt', (e) => {
}
//安卓首页停留20秒
if(sessionStorage.time==undefined){
if(sessionStorage.type=="pwa")return;
setTimeout(function() {
var bbb = location.href;
if (bbb.indexOf("liveRoom") > -1){
return;
}
sessionStorage.time=1
e.preventDefault();
deferredPrompt = e;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment