gabrielecirulli / 2048

A small clone of 1024 (https://web.archive.org/web/20140328011720/https://play.google.com/store/apps/details?id=com.veewo.a1024)
MIT License
12.09k stars 16.92k forks source link

PWA #531

Open bolbolamir opened 2 years ago

bolbolamir commented 2 years ago

Hello, @iirelu and @sigod I used to play this game a lot! and I love it. In this branch (and PR) I developed a service worker for this game so, it is now playable ofline (without the internet) and installable on all OSs. if you don't know about PWAs in general, this is a great article: https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API

There are some finishing touches I need to work on but, basically, it caches everything using sw.js file. For installation, I created the manifest.json file with some metadata, feel free to change any data there. thanks for reading.