pwa open url

This commit is contained in:
cutls 2020-02-08 00:44:16 +09:00
parent ce117cca24
commit 495db60a84

View File

@ -283,3 +283,16 @@ function statusModel(now) {
poll: null 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)
}
}
}
}
}