about summary refs log tree commit diff stats
path: root/js
diff options
context:
space:
mode:
authorelioat <hi@eli.li>2024-01-15 17:26:21 -0500
committerelioat <hi@eli.li>2024-01-15 17:26:21 -0500
commit8a375e3797fbda8cbd738c3e5343880cc5a7ee0f (patch)
treee8fcea831e32b4f901330f46cf6e3b732760707c /js
parent8b8fdf45ef7bdf8c00cc327f6b5a27ee5863b5e1 (diff)
downloadtour-8a375e3797fbda8cbd738c3e5343880cc5a7ee0f.tar.gz
*
Diffstat (limited to 'js')
-rw-r--r--js/inknswitch/ink.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/js/inknswitch/ink.js b/js/inknswitch/ink.js
index 70a2231..b9fc758 100644
--- a/js/inknswitch/ink.js
+++ b/js/inknswitch/ink.js
@@ -145,6 +145,21 @@ toggleButton.addEventListener('click', toggle);
 
 const helpText = "This is a modal note taking tool. With it, you can type text that'll be saved to the browser, and you can draw pictures that'll also be saved to the browser. You are in typing mode right now. To toggle between modes tap either cmd + d, ctrl + d or cmd + 1, or ctrl + 1. When in drawing mode, tap c to clear the canvas, tap s to save the contents of the canvas to a png."
 
+// Currently unused
+// const saveTextAsFile() => {
+//     const textToWrite = document.getElementById('noteArea').value;
+//     const textFileAsBlob = new Blob([textToWrite], { type: 'text/plain' });
+//     const fileNameToSaveAs = 'notes.txt';
+
+//     const downloadLink = document.createElement('a');
+//     downloadLink.download = fileNameToSaveAs;
+//     downloadLink.href = window.URL.createObjectURL(textFileAsBlob);
+//     downloadLink.style.display = 'none';
+//     document.body.appendChild(downloadLink);
+//     downloadLink.click();
+//     document.body.removeChild(downloadLink);
+// }
+
 const handleSelectChange = () => {
     if (selectElement.value === 'clear') {
         const confirmClear = confirm('Do you really want to clear the canvas?');