about summary refs log tree commit diff stats
path: root/js
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2024-01-12 22:22:22 -0500
committerelioat <elioat@tilde.institute>2024-01-12 22:22:22 -0500
commitc31a29fa54b77d4bd238ac7d576c190c0c46d7cb (patch)
tree54351a6238f0bff7891ccdb964fd411a6d96a9e1 /js
parent0aa2204c4edf9ec483f7aeffc2fc24b52375e0d5 (diff)
downloadtour-c31a29fa54b77d4bd238ac7d576c190c0c46d7cb.tar.gz
*
Diffstat (limited to 'js')
-rw-r--r--js/inknswitch/index.html6
-rw-r--r--js/inknswitch/ink.js23
2 files changed, 6 insertions, 23 deletions
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;
         }
-        
+        */
     </style>
 </head>
 <body>
-    <button id="toggleButton">Toggle</button>
+    <!-- <button id="toggleButton">Toggle</button> -->
     <textarea id="noteArea" rows="10" cols="30" placeholder="This is a modal note taking tool. With it, you can type text that'll be saved to the browser, and you can draw images that'll also be saved to the browser. You are in typing mode right now. To toggle between modes tap cmd or ctrl + d. When in drawing mode, tap c to clear the canvas, tap s to save the contents of the canvas to a png."></textarea>
     <canvas id="drawingArea" width="500" height="500"></canvas>
     <script src="ink.js"></script>
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