Clean up the demo page JS code

Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>