diff options
author | luxagraf <sng@luxagraf.net> | 2023-11-20 09:28:02 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2023-11-20 09:28:02 -0500 |
commit | a5a47f5e4625cb83eec156c61d36f9a17f14bc93 (patch) | |
tree | 1c2ec696e1cf64b49bcec0157ba25758dced2fbb | |
parent | c0cf14a31488c5294c99eabeee38320162c76808 (diff) |
-rw-r--r-- | app/deals/templates/deals/deal_code.html | 14 |
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(); |