diff options
author | luxagraf <sng@luxagraf.net> | 2024-07-01 10:17:31 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2024-07-01 10:17:31 -0500 |
commit | fc9d2db68ed692d7f39ac827fe17daed95261fd4 (patch) | |
tree | 6b1be5f3d5e5d952515a43d5d1ddf853d07d1f68 | |
parent | b1098da95a0e5be1141306dac54c63526dbe2427 (diff) |
gtd: fixed string bug
-rw-r--r-- | app/gtd/templates/gtd/deal_code.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/gtd/templates/gtd/deal_code.html b/app/gtd/templates/gtd/deal_code.html index 843a9d7..9fc0717 100644 --- a/app/gtd/templates/gtd/deal_code.html +++ b/app/gtd/templates/gtd/deal_code.html @@ -43,9 +43,9 @@ body { </textarea> <script> let params = new URL(document.location).searchParams; -var price = parseFloat(params.get("price")).toFixed(2); -var sale = parseFloat(params.get("sale")).toFixed(2); -var str = "####"+" ["+params.get("title")+" for $"+params.get("price")+" ($"+sale+"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").substring(1)).toFixed(2); +var sale = parseFloat(params.get("sale").substring(1)).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)"; |