summaryrefslogtreecommitdiff
path: root/app/posts/templates
diff options
context:
space:
mode:
Diffstat (limited to 'app/posts/templates')
-rw-r--r--app/posts/templates/posts/note_form.html13
1 files changed, 1 insertions, 12 deletions
diff --git a/app/posts/templates/posts/note_form.html b/app/posts/templates/posts/note_form.html
index b9aa78f..43b2a06 100644
--- a/app/posts/templates/posts/note_form.html
+++ b/app/posts/templates/posts/note_form.html
@@ -16,21 +16,10 @@
{% endblock %}
{% block js %}
<script type="text/javascript">
-function GetURLParameter(sParam){
- var sPageURL = window.location.search.substring(1);
- var sURLVariables = sPageURL.split('&');
- for (var i = 0; i < sURLVariables.length; i++) {
- var sParameterName = sURLVariables[i].split('=');
- if (sParameterName[0] == sParam) {
- return sParameterName[1];
- }
- }
-};
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_title').value = params.get("title");
document.getElementById('id_url').value = url;
document.getElementById('id_body_markdown').value = description;
</script>