Trying to change viewport with javascript