From 495db60a840f360484e2ef168c0b3e7fff58dd50 Mon Sep 17 00:00:00 2001 From: cutls Date: Sat, 8 Feb 2020 00:44:16 +0900 Subject: [PATCH] pwa open url --- app/js/platform/first.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/js/platform/first.js b/app/js/platform/first.js index d309c3d4..dd255b09 100644 --- a/app/js/platform/first.js +++ b/app/js/platform/first.js @@ -283,3 +283,16 @@ function statusModel(now) { poll: null } } +/* PWA */ +if(pwa) { + function postMessage(e) { + if (e[0] == 'openUrl') { + urls = e.data[1].match(/https?:\/\/(.+)/) + if (urls) { + if(confirm("Open: " + url)) { + window.open(url) + } + } + } + } +} \ No newline at end of file