pwa: fix
This commit is contained in:
parent
8d812fbd2c
commit
47d69857ba
|
@ -190,3 +190,22 @@ onmessage = function(e) {
|
|||
})
|
||||
}
|
||||
}
|
||||
/* PWA */
|
||||
if(pwa) {
|
||||
function postMessage(e) {
|
||||
if (e[0] == 'openUrl') {
|
||||
urls = e[1].match(/https?:\/\/(.+)/)
|
||||
if (urls) {
|
||||
Swal.fire({
|
||||
title: 'Open URL',
|
||||
icon: 'info',
|
||||
html:
|
||||
`If you are OK, click: <a href="${urls[0]}" target="_blank" class="btn waves-effect">Here</a>`,
|
||||
showCloseButton: false,
|
||||
showCancelButton: true,
|
||||
focusConfirm: false,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -283,16 +283,3 @@ function statusModel(now) {
|
|||
poll: null
|
||||
}
|
||||
}
|
||||
/* PWA */
|
||||
if(pwa) {
|
||||
function postMessage(e) {
|
||||
if (e[0] == 'openUrl') {
|
||||
urls = e[1].match(/https?:\/\/(.+)/)
|
||||
if (urls) {
|
||||
if(confirm("Open: " + urls)) {
|
||||
window.open(urls)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user