2 ms·
I wrote the thing with mobile and desktop on mind (touch and keyboard controls, render to several types of screen). Then this line does the magic: const isM
by atum47 7y ago
I wrote the thing with mobile and desktop on mind (touch and keyboard controls, render to several types of screen). Then this line does the magic:
const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
if isMobile = true, I show you the touch controls
I'm holding the source code on this one for now, cause I'm trying to make a bucket out of it. But I'll release it soon enough. Check out my github for some other fun projects as well
- alanbernstein 7y agoCool, thanks for sharing that.
- atum47 7y agoyou're welcome