Actually fix forex JavaScript

This commit is contained in:
Wesley Moore 2024-07-16 10:32:42 +10:00
parent bb2536a61b
commit 6cd8297ecf
No known key found for this signature in database
2 changed files with 5 additions and 7 deletions

View file

@ -1,9 +1,7 @@
document.addEventListener('DOMContentLoaded', () => {
const select = document.getElementById('forex'); const select = document.getElementById('forex');
select.addEventListener('change', updatePrices); select.addEventListener('change', updatePrices);
// Trigger initial conversion (Firefox preserves selected option across refresh // Trigger initial conversion (Firefox preserves selected option across refresh
updatePrices.call(select); updatePrices.call(select);
})
/** /**
* @this {HTMLSelectElement} * @this {HTMLSelectElement}

View file

@ -1,7 +1,7 @@
{% extends "page.html" %} {% extends "page.html" %}
{% block head %} {% block head %}
<script src="{{ config.base_url }}/js/forex.js" type="module" async></script> <script src="{{ config.base_url }}/js/forex.js?v=2" type="text/javascript" defer async></script>
<style> <style>
table { table {
width: 100%; width: 100%;