mirror of
https://github.com/rottenwheel/moner.ooo.git
synced 2024-11-16 14:57:35 +00:00
fix(js): hide conversion buttons if JavaScript enabled
Removed event listeners on conversion buttons and instead hide them when JavaScript is enabled. This aims to improve the user experience by preventing redundant UI interactions that are handled dynamically.
This commit is contained in:
parent
e97805d379
commit
77c41c08c2
1 changed files with 3 additions and 10 deletions
|
@ -64,16 +64,9 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
}
|
||||
});
|
||||
|
||||
// Add event listeners for the conversion buttons
|
||||
convertXMRToFiatBtn.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
xmrConvert();
|
||||
});
|
||||
|
||||
convertFiatToXMRBtn.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
fiatConvert();
|
||||
});
|
||||
// Hide the conversion buttons if JavaScript is enabled
|
||||
convertXMRToFiatBtn.style.display = 'none';
|
||||
convertFiatToXMRBtn.style.display = 'none';
|
||||
|
||||
// Fetch updated exchange rates immediately, then every 5 seconds
|
||||
fetchUpdatedExchangeRates();
|
||||
|
|
Loading…
Reference in a new issue