Calculate percentage viewed and display on new tab