Overly complicated html + js recorder