diff options
Diffstat (limited to 'js/inknswitch/ink.js')
-rw-r--r-- | js/inknswitch/ink.js | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/js/inknswitch/ink.js b/js/inknswitch/ink.js index 110a052..317dbcb 100644 --- a/js/inknswitch/ink.js +++ b/js/inknswitch/ink.js @@ -121,7 +121,7 @@ const toggle = () => { } }; - +/* const toggleButton = document.getElementById('toggleButton'); toggleButton.style.pointerEvents = 'auto'; toggleButton.addEventListener('click', toggleMode); @@ -130,6 +130,7 @@ toggleButton.addEventListener('touchend', toggleMode); function toggleMode() { toggle(); } +*/ document.addEventListener('keydown', (e) => { @@ -158,22 +159,4 @@ document.addEventListener('keydown', (e) => { } localStorage.setItem('noteContent', noteArea.value); -}); - -let lastTap = 0; -let tapCount = 0; - -document.addEventListener('touchend', function(e) { - const currentTime = Date.now(); - const tapInterval = currentTime - lastTap; - if (tapInterval < 500 && tapInterval > 0) { - tapCount++; - if (tapCount === 3) { - toggleMode(); - tapCount = 0; - } - } else { - tapCount = 1; - } - lastTap = currentTime; -}, false); \ No newline at end of file +}); \ No newline at end of file |