diff --git a/app/js/platform/end.js b/app/js/platform/end.js index c7a03a4c..8be9e11f 100644 --- a/app/js/platform/end.js +++ b/app/js/platform/end.js @@ -173,4 +173,14 @@ onmessage = function (e) { title: e.data[1] }) } -} \ No newline at end of file +} +window.addEventListener('load', function() { + if ('serviceWorker' in navigator) { + navigator.serviceWorker.register("/sw.js") + .then(function(registration) { + console.log("serviceWorker registed."); + }).catch(function(error) { + console.warn("serviceWorker error.", error); + }); + } + }); \ No newline at end of file diff --git a/app/js/platform/first.js b/app/js/platform/first.js index b545d06c..fffb4ec7 100644 --- a/app/js/platform/first.js +++ b/app/js/platform/first.js @@ -1,5 +1,7 @@ function postMessage(e){ - console.log(e) + if(e[0]=="openUrl"){ + window.open(e[1]) + } return false; } document.title="TheDesk" diff --git a/app/manifest.json b/app/manifest.json index 2025c2eb..014bd0bf 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -1,17 +1,21 @@ { "name": "TheDesk", "short_name": "TheDesk", - "description": "Mastodonクライアント", "icons": [ { "src": "./img/desk.png", - "sizes": "512x512", - "type": "image/png" + "type": "image/png", + "sizes": "512x512" } ], - "theme_color": "#212121", - "background_color": "#212121", + "start_url": "/", "display": "standalone", - "start_url": "./view/ja", - "scope": "https://thedesk.github.io" + "orientation": "portrait-primary", + "background_color": "#212121", + "theme_color": "#212121", + "description": "TheDesk", + "dir": "ltr", + "lang": "ja-jp", + "related_applications": [], + "prefer_related_applications": false } diff --git a/app/sw.js b/app/sw.js new file mode 100644 index 00000000..d1090d4f --- /dev/null +++ b/app/sw.js @@ -0,0 +1 @@ +self.addEventListener('fetch', function(){}); \ No newline at end of file diff --git a/app/view/make/acct.sample.html b/app/view/make/acct.sample.html index 1e4aa144..9d7b6ee3 100644 --- a/app/view/make/acct.sample.html +++ b/app/view/make/acct.sample.html @@ -70,6 +70,7 @@ @@comment-end@@ +