summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2024-07-01 09:14:28 -0500
committerluxagraf <sng@luxagraf.net>2024-07-01 09:14:28 -0500
commitb61f0f8edc46d09c7ec0d1993e58530953693f12 (patch)
treeaacb54c70669377c2c77fbaf385e1e36763643f9
parentbc05ff7cf6f6c0f8f931d29de235c720092d7058 (diff)
gtd: fixed deal code for markdown
-rw-r--r--app/gtd/templates/gtd/deal_code.html9
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)
{