mirror of
https://github.com/He4eT/browser-milje-2077.git
synced 2026-05-05 01:17:25 +00:00
options: add options page
This commit is contained in:
parent
31fcd6ced2
commit
f41cb32e81
5 changed files with 136 additions and 2 deletions
17
pages/options/optionSliders.js
Normal file
17
pages/options/optionSliders.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
function syncSliders(sliderId, numberInputId) {
|
||||
const slider = document.getElementById(sliderId)
|
||||
const numberInput = document.getElementById(numberInputId)
|
||||
|
||||
slider.addEventListener('input', () => {
|
||||
numberInput.value = slider.value
|
||||
})
|
||||
|
||||
numberInput.addEventListener('input', () => {
|
||||
slider.value = numberInput.value
|
||||
})
|
||||
}
|
||||
|
||||
syncSliders('density', 'densityValue')
|
||||
syncSliders('red', 'redValue')
|
||||
syncSliders('green', 'greenValue')
|
||||
syncSliders('blue', 'blueValue')
|
||||
Loading…
Add table
Add a link
Reference in a new issue