mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-25 20:32:46 +00:00
Fixed ctrl again again
Signed-off-by: Liu Xiaoyi <circuitcoder0@gmail.com>
This commit is contained in:
parent
9b33d82611
commit
f7ffa1607a
|
|
@ -166,16 +166,6 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
lazerSettings();
|
||||
});
|
||||
|
||||
// Recover stored settings
|
||||
setData('variance', parseInt(window.localStorage.getItem('tomato-variance') ?? 100));
|
||||
setData('gravity', parseInt(window.localStorage.getItem('tomato-gravity') ?? 400));
|
||||
setData('init-vy', parseInt(window.localStorage.getItem('tomato-init-vy') ?? -100));
|
||||
if(window.localStorage.getItem('tomato-hint') === 'true') {
|
||||
const ctrl = document.getElementsByClassName('field-ctrl')[0];
|
||||
ctrl.classList.remove('tucked');
|
||||
ctrl.classList.add('hidden');
|
||||
}
|
||||
|
||||
const variance = document.getElementById('field-variance');
|
||||
variance.addEventListener('input', function() {
|
||||
VARIANCE = parseInt(variance.value);
|
||||
|
|
@ -200,4 +190,15 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
initVyLabel.innerText = `Initial Velocity: ${INIT_VY}`;
|
||||
window.localStorage.setItem('tomato-init-vy', INIT_VY);
|
||||
});
|
||||
|
||||
// Recover stored settings
|
||||
setData('variance', parseInt(window.localStorage.getItem('tomato-variance') ?? 100));
|
||||
setData('gravity', parseInt(window.localStorage.getItem('tomato-gravity') ?? 400));
|
||||
setData('init-vy', parseInt(window.localStorage.getItem('tomato-init-vy') ?? -100));
|
||||
if(window.localStorage.getItem('tomato-hint') === 'true') {
|
||||
const ctrl = document.getElementsByClassName('field-ctrl')[0];
|
||||
ctrl.classList.remove('tucked');
|
||||
ctrl.classList.add('hidden');
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue