summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/deals/templates/deals/deal_code.html14
1 files changed, 10 insertions, 4 deletions
diff --git a/app/deals/templates/deals/deal_code.html b/app/deals/templates/deals/deal_code.html
index 67ce58a..b129514 100644
--- a/app/deals/templates/deals/deal_code.html
+++ b/app/deals/templates/deals/deal_code.html
@@ -34,7 +34,7 @@ body {
</style>
</head>
<body>
- <h4 id="title"><a id="link" href=""></a><h4>
+ <h4 id="title"><a id="link" href=""></a></h4>
<!--
<a class="button" href="#" onclick="CopyToClipboard('markdown');return false;">Copy Markdown</a>
@@ -45,9 +45,15 @@ body {
<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+++";
-document.getElementById('markdown').value = str
-document.getElementById('title').value = params.get("title") + " for $tk ($tk off)";
-document.getElementById('link').value = params.get("url")
+function setText() {
+ var el = document.getElementById('link');
+ el.innerHTML = params.get("title") + " for $tk ($tk off)";
+ el.href = params.get("url");
+}
+
+window.onload = function() { // Or window.addEventListener("load", function() {
+ setText();
+}
function CopyToClipboard(id)
{
var r = document.createRange();