Download script.js from shlskc/mathy-notes-apple-style-clone: direct link, hf CLI and curl.
- Browser
- Download file 1.23 kB
-
https://huggingface.co/spaces/shlskc/mathy-notes-apple-style-clone/resolve/main/script.js
- Command line
-
hf download hf://spaces/shlskc/mathy-notes-apple-style-clone/script.js
-
curl -L -o script.js https://huggingface.co/spaces/shlskc/mathy-notes-apple-style-clone/resolve/main/script.js
1.23 kB
| document.addEventListener('DOMContentLoaded', function() { | |
| // Initialize math keyboard functionality | |
| const mathButtons = document.querySelectorAll('.bg-gray-100.hover\\:bg-gray-200'); | |
| mathButtons.forEach(button => { | |
| button.addEventListener('click', function() { | |
| const symbol = this.textContent; | |
| // In a real app, this would insert the symbol at the cursor position | |
| console.log(`Inserting math symbol: ${symbol}`); | |
| }); | |
| }); | |
| // Toolbar button functionality | |
| const toolbarButtons = document.querySelectorAll('.hover\\:bg-gray-100'); | |
| toolbarButtons.forEach(button => { | |
| button.addEventListener('click', function() { | |
| const icon = this.querySelector('i'); | |
| const iconName = icon.getAttribute('data-feather'); | |
| console.log(`Toolbar action: ${iconName}`); | |
| }); | |
| }); | |
| // Add section button functionality | |
| const addSectionButton = document.querySelector('.text-blue-500'); | |
| if (addSectionButton) { | |
| addSectionButton.addEventListener('click', function() { | |
| console.log('Adding new section'); | |
| // In a real app, this would add a new section to the note | |
| }); | |
| } | |
| }); |