Added logic for interacting with pageres
Added client-side havascript for handling screenshot