Sfoglia il codice sorgente

More like my demo that works

Trevor Elliott 3 anni fa
parent
commit
5034c48a37
2 ha cambiato i file con 3 aggiunte e 4 eliminazioni
  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",