diff options
author | luxagraf <sng@luxagraf.net> | 2024-07-01 10:10:14 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2024-07-01 10:10:14 -0500 |
commit | 8b35816f6ce4a3f1315cff6af8a7381dac0f5ec9 (patch) | |
tree | 0a90ca76d9d3edf547415bbcc3bdb8a132fe95b4 /app | |
parent | 6710e26065a38dc55cb7303ff514dc8abf944176 (diff) |
gtd: improve REI deal price template
Diffstat (limited to 'app')
-rw-r--r-- | app/gtd/templates/gtd/deal_code.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/gtd/templates/gtd/deal_code.html b/app/gtd/templates/gtd/deal_code.html index 8bf3a57..0b6610e 100644 --- a/app/gtd/templates/gtd/deal_code.html +++ b/app/gtd/templates/gtd/deal_code.html @@ -43,7 +43,9 @@ body { </textarea> <script> let params = new URL(document.location).searchParams; -var str = "####"+" ["+params.get("title")+" for tk ($tk off)]("+params.get("url")+")\n\n+++button-group\n\n[REI]("+params.get("url")+" \"REI\"){: target=\"_blank\"}\n\n+++"; +var price = parseFloat(params.get("price")).toFixed(2); +var sale = parseFloat(params.get("sale")).toFixed(2); +var str = "####"+" ["+params.get("title")+" for $"+price+" ($"+sale+"off)]("+params.get("url")+")\n\n+++button-group\n\n[REI]("+params.get("url")+" \"REI\"){: target=\"_blank\"}\n\n+++"; function setText() { var el = document.getElementById('link'); el.innerHTML = params.get("title") + " for $tk ($tk off)"; |