refactor(watchPage): view to js

move functions to global namespace; to fire it from markup

time: 0h:15