update
Revert "pull out the js code into a js file."

This reverts commit 296f975f1f352e4b3d50dddc1d25e16d584a20a7.