Added Javascript for viewport