Integrate swipe and d-pad to transit entry_view #2
11
web/static/js/settings-swipe.js
Normal file
11
web/static/js/settings-swipe.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/* Settings: Swipe navigation toggle (client-side, per device) */
|
||||||
|
(function(){
|
||||||
|
document.addEventListener('DOMContentLoaded', function(){
|
||||||
|
const t = document.getElementById('swipeNavToggle');
|
||||||
|
if (!t) return;
|
||||||
|
try { t.checked = (localStorage.getItem('swipeNavEnabled') !== 'false'); } catch(e){}
|
||||||
|
t.addEventListener('change', () => {
|
||||||
|
try { localStorage.setItem('swipeNavEnabled', t.checked ? 'true' : 'false'); } catch(e){}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})();
|
||||||
Loading…
Reference in New Issue
Block a user