summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2023-11-20 09:28:02 -0500
committerluxagraf <sng@luxagraf.net>2023-11-20 09:28:02 -0500
commita5a47f5e4625cb83eec156c61d36f9a17f14bc93 (patch)
tree1c2ec696e1cf64b49bcec0157ba25758dced2fbb
parentc0cf14a31488c5294c99eabeee38320162c76808 (diff)
deals: made new html link codeHEADmaster
-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();