[fix] javascript snippet to defined current page