Hacker News new | ask | show | jobs
by dolmen 1519 days ago
Does it really need to be 12 Kb of obfuscated JS+CSS?

That seems huge for the task.

1 comments

Most of the JavaScript is two empty videos encoded in WebM or MP4, encoded using Base64 to be stored in plain text, and picked depending on what the web browser supports. Considering I doubt that video formats are designed with empty videos in mind, this is probably not too bad. As for why videos are here, they are a fallback in case web browser doesn't provide Screen Wake Lock API (in particular, Safari and Firefox don't).