summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/posts/templates/posts/note_form.html7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/posts/templates/posts/note_form.html b/app/posts/templates/posts/note_form.html
index 2f3ac15..b9aa78f 100644
--- a/app/posts/templates/posts/note_form.html
+++ b/app/posts/templates/posts/note_form.html
@@ -26,9 +26,10 @@ function GetURLParameter(sParam){
}
}
};
-var title = GetURLParameter('title');
-var description = GetURLParameter('description');
-var url = GetURLParameter('url');
+let params = new URL(document.location).searchParams;
+let title = params.get("title")
+let url = params.get("url")
+let description = params.get("description")
document.getElementById('id_title').value = title;
document.getElementById('id_url').value = url;
document.getElementById('id_body_markdown').value = description;