Javascript interaction framework for paper interfaces