diff --git a/app/js/platform/end.js b/app/js/platform/end.js index 7a64922e..f518cc98 100644 --- a/app/js/platform/end.js +++ b/app/js/platform/end.js @@ -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: Here`, + showCloseButton: false, + showCancelButton: true, + focusConfirm: false, + }) + } + } + } +} \ No newline at end of file diff --git a/app/js/platform/first.js b/app/js/platform/first.js index 4f052d9e..d309c3d4 100644 --- a/app/js/platform/first.js +++ b/app/js/platform/first.js @@ -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) - } - } - } - } -} \ No newline at end of file