From fdebb16a85671de012c952d570f1d207381cbfe0 Mon Sep 17 00:00:00 2001 From: Kumi Date: Sat, 10 Aug 2024 16:49:33 +0200 Subject: [PATCH] fix: remove inline script and improve noscript message Refactored inline exchangeRates script to main.js for better practice and maintainability. Enhanced the noscript warning message's readability by replacing paragraph tags with line breaks, ensuring clearer instructions for users without JavaScript. --- index.php | 7 ++----- src/js/main.js | 2 ++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index 6aeca1b..db08555 100644 --- a/index.php +++ b/index.php @@ -196,8 +196,8 @@ foreach (array_reverse($preferred_currencies) as $currency) { @@ -229,9 +229,6 @@ foreach (array_reverse($preferred_currencies) as $currency) { - diff --git a/src/js/main.js b/src/js/main.js index 63c5ab5..29a33db 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -14,6 +14,8 @@ console.log(tooltipList); let lastModifiedField = 'xmr'; +var exchangeRates = {}; + document.addEventListener('DOMContentLoaded', function () { const copyXMRBtn = document.getElementById('copyXMRBtn'); const copyFiatBtn = document.getElementById('copyFiatBtn');