瀏覽代碼

More like my demo that works

Trevor Elliott 3 年之前
父節點
當前提交
5034c48a37
共有 2 個文件被更改,包括 3 次插入4 次删除
  1. 2 0
      js/serviceWorker.js
  2. 1 4
      static/manifest.json

+ 2 - 0
js/serviceWorker.js

@@ -1,8 +1,10 @@
 
 self.addEventListener("install", event => {
+  self.skipWaiting();
 });
 
 self.addEventListener("activate", event => {
+  return self.clients.claim();
 });
 
 self.addEventListener("fetch", event => {

+ 1 - 4
static/manifest.json

@@ -17,10 +17,7 @@
     }
   ],
   "share_target": {
-    "action": "share",
-    "url_template": "/add-link?url={url}&name={title}&text={text}",
-    "method": "GET",
-    "enctype": "application/x-www-form-urlencoded",
+    "action": "/add-link",
     "params": {
       "title": "name",
       "text": "text",