fixed: share target

This commit is contained in:
quenousimporte 2024-01-24 11:07:39 +01:00
parent 27d0d845fd
commit d7cff56116
2 changed files with 4 additions and 5 deletions

View File

@ -1206,7 +1206,7 @@ function loadstorage()
localdata = item ? JSON.parse(item) : [];
var params = new URLSearchParams(window.location.search);
var title = params.get("n");
var title = params.get("n") || params.get("name");
var line = params.get("l");
var tags = params.get("t");
var clip = params.get("c");
@ -1220,8 +1220,7 @@ function loadstorage()
msg.innerText = "Clipping...";
notepage.appendChild(msg);
inserttodo("@clip " + clip)
.then(window.close);
inserttodo("@clip " + clip).then(window.close);
}
if (currentnote)
@ -1233,7 +1232,7 @@ function loadstorage()
currentnote = getnote(title);
if (!currentnote)
{
var newcontent = defaultheaders(tags);
var newcontent = params.get("description") || defaultheaders(tags);
currentnote = {title: title, content: newcontent, pos: newcontent.length};
localdata.unshift(currentnote);
}

View File

@ -1,7 +1,7 @@
{
"share_target":
{
"action": "/index.html",
"action": "/",
"params":
{
"title": "name",