Update script to provide functionality to popupviewer.