今日已更新 350 条资讯 | 累计 25009 条内容
关于我们

开发者

编程技术、框架工具、最佳实践

6941
篇文章

共 6941 篇 · 第 141/348 页

Dev.to

NanoScript can finally create real projects!

Hey everyone! 👋 I'm super excited to share this. After a lot of work, NanoScript is finally ready to build real-world projects. It's a modern, ultra-lightweight JavaScript library designed for edge environments, and it makes DOM manipulation, event handling, and animations a breeze. To show you what it can do, I built a small but complete project: The Kasane Teto Song Finder . It's a fun, fully-functional web app that uses almost every NanoScript plugin. 🎵 What is the Kasane Teto Song Finder? It's a simple single-page app for fans of the UTAU voicebank, Kasane Teto. It lets you search through a list of songs, save your input, toggle themes, copy text, and more. Here's a quick look at the code: <input id= "teto-songs-input" type= "text" placeholder= "Enter song name.." /> <div class= "songs-list" > <div class= "song" > Voices In My Head feat. Kasane Teto </div> <div class= "song" > Execution Clap feat. Kasane Teto </div> <div class= "song" > YARARARA feat. Kasane Teto </div> </div> <script> // NanoScript in action! NS . getGhostState (); // Restore saved input NS . ghostState ( " #teto-songs-input " , " value " ); // Auto-save input // Live search filter NS . findArray ({ items : document . querySelectorAll ( " .song " ), element : " #teto-songs-input " }); // Live character counter NS . liveCounter ({ element : " #teto-songs-input " , max : 50 , showCounter : true , counterElement : " #count " , onLimit : () => { alert ( " No Kasane Teto song name is that tall 😅. " ); } }); /* Rest of the code */ </script> ✨ What This Project Shows This tiny app is a perfect demonstration of NanoScript's core philosophy: do more with less. Here's what it uses in a few lines of code: State Management: NS.ghostState and NS.getGhostState automatically save and restore the user's input using localStorage. This is a full-featured persistence system with zero setup. Real-time Search: NS.findArray filters a list of songs as you type, proving that NanoScript isn't just a utility library—it

Codemaster_121482 2026-07-03 23:52 👁 2 查看原文 →