Refactored time selecting

This commit is contained in:
Magnus Åhall 2024-06-29 20:50:57 +02:00
parent 02794e9629
commit cd8765e0f2
12 changed files with 122 additions and 56 deletions

View file

@ -1,7 +1,13 @@
function preset(hours) {
const inputPreset = document.querySelector('input[name="preset"]')
inputPreset.value = hours
inputPreset.form.submit()
}
function offsetTime(seconds) {
const el = document.getElementById('offset-time')
el.value = seconds
el.form.submit()
const inputPreset = document.querySelector('input[name="offset-time"]')
inputPreset.value = seconds
inputPreset.form.submit()
}
class Graph {