diff options
author | luxagraf <sng@luxagraf.net> | 2024-07-01 09:14:28 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2024-07-01 09:14:28 -0500 |
commit | b61f0f8edc46d09c7ec0d1993e58530953693f12 (patch) | |
tree | aacb54c70669377c2c77fbaf385e1e36763643f9 | |
parent | bc05ff7cf6f6c0f8f931d29de235c720092d7058 (diff) |
gtd: fixed deal code for markdown
-rw-r--r-- | app/gtd/templates/gtd/deal_code.html | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/gtd/templates/gtd/deal_code.html b/app/gtd/templates/gtd/deal_code.html index 1b174f2..9eb4b5a 100644 --- a/app/gtd/templates/gtd/deal_code.html +++ b/app/gtd/templates/gtd/deal_code.html @@ -1,3 +1,4 @@ +{% load humanize %} <html> <head> <style> @@ -37,10 +38,10 @@ body { <!-- <a class="button" href="#" onclick="CopyToClipboard('markdown');return false;">Copy Markdown</a> +--!> <textarea id="markdown" style="min-width: 35rem; height: 15rem;"> </textarea> ---!> <script> let params = new URL(document.location).searchParams; var str = "####"+" ["+params.get("title")+"]("+params.get("url")+")\n\n+++button-group\n\n[Amazon]("+params.get("url")+" \"Amazon\"){: target=\"_blank\"}\n\n+++"; @@ -49,9 +50,13 @@ function setText() { el.innerHTML = params.get("title") + " for $tk ($tk off)"; el.href = params.get("url"); } - +function setMarkdown() { + var el = document.getElementById('markdown'); + el.value = str; +} window.onload = function() { // Or window.addEventListener("load", function() { setText(); + setMarkdown(); } function CopyToClipboard(id) { |