Skip to content

a lightweight offline compatible stitch counter for the web

License

Notifications You must be signed in to change notification settings

a-viv-a/stitchcounter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stitchcounter

A lightweight offline compatible stitch counter for the web. Using service workers, the entire page is cached when it is first viewed, at which point it no longer requires internet connection. And why should it? Keeping track of a few numbers is very simple, but popular alternatives always require internet connection or heavy app installs. This requires neither, but does support PWA installation if you desire, although the experience is identical to the web experience. All stitch data is stored to localstorage, so it should be persistent across reloads and reboots. Hosted with github pages, at https://stitchcount.xyz.

Warning This project was made in 2021 for my sister. It was the first time I did any web UI, and I have no intention of maintaining or improving this project--but it seems like a shocking number of people are using it, so I'll leave it up untouched (except for adding opengraph support) out of fear of breaking something. If you fork it and fix things, please let me know so I can link to your version.

screenshots

full size squished

development

Run the ./devserver.sh script with npx installed, and the requisite files will be served locally on port 9000. While they are hosted for the entire network, service workers require a secure context, so they will not work anywhere other than localhost:9000. If you are making changes to any of the cached files (so any files as of the time of writing this), make sure to enable bypass for network in application/service workers in chrome dev tools, so you can see your new variant, not the cached version. Before merging to main, a dev branch must bump the version number in sw.js or the new version will not override the old, cached version. If you add text that uses unicode that is currently being stripped from the fonts, remember to add it to the bash. Pull Requests are welcome and encouraged.