From c31a29fa54b77d4bd238ac7d576c190c0c46d7cb Mon Sep 17 00:00:00 2001 From: elioat Date: Fri, 12 Jan 2024 22:22:22 -0500 Subject: * --- js/inknswitch/index.html | 6 +++--- js/inknswitch/ink.js | 23 +++-------------------- 2 files changed, 6 insertions(+), 23 deletions(-) (limited to 'js') diff --git a/js/inknswitch/index.html b/js/inknswitch/index.html index 030735f..4fa3356 100644 --- a/js/inknswitch/index.html +++ b/js/inknswitch/index.html @@ -27,7 +27,7 @@ margin: 0 auto; display: block; } - + /* #toggleButton { border: 1px solid black; background-color: transparent; @@ -40,11 +40,11 @@ #toggleButton:hover { cursor: pointer; } - + */ - + 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 -- cgit 1.4.1-2-gfad0