diff --git a/public/service-worker.js b/public/service-worker.js index f49cc5f..7e43687 100644 --- a/public/service-worker.js +++ b/public/service-worker.js @@ -137,7 +137,7 @@ const evaluateRequestData = async function (request) { } } else if (title?.length > 0 || text?.length > 0 || url?.length > 0) { console.debug(title || text || url); - resolve(`/?share-target=text&title=${title}&text=${text}&url=${url}`); + resolve(`/?share-target=text${title ? `&title=${title}` : ''}${text ? `&text=${text}` : ''}${url ? `&url=${url}` : ''}`); } else { resolve('/'); } diff --git a/public_included_ws_fallback/service-worker.js b/public_included_ws_fallback/service-worker.js index acb7225..6e815eb 100644 --- a/public_included_ws_fallback/service-worker.js +++ b/public_included_ws_fallback/service-worker.js @@ -137,7 +137,7 @@ const evaluateRequestData = async function (request) { } } else if (title?.length > 0 || text?.length > 0 || url?.length > 0) { console.debug(title || text || url); - resolve(`/?share-target=text&title=${title}&text=${text}&url=${url}`); + resolve(`/?share-target=text${title ? `&title=${title}` : ''}${text ? `&text=${text}` : ''}${url ? `&url=${url}` : ''}`); } else { resolve('/'); }