Hacker News new | ask | show | jobs
by nullgeo 3773 days ago
What's up with decoding the JS and using eval?
1 comments

any time you see 'encoded' JS it's just the canvas-based icons (like this: http://codepen.io/tomhodgins/pen/VvjNKq ) being minified and encoded just to keep it out the way.

If I made the icons as PNG's I'd have embedded them as `base64` encoded blobs of data, but in this case the icons are JS that gets decoded and run to draw the icon, then attach it to the page as favicon and apple-touch-icon.

I wrote a short post about how I put together these teeny tiny HTML5 apps if you're interested: http://codepen.io/tomhodgins/post/building-an-html5-app-for-...