summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-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)
{