This can be changed to `} else if (!PDFView.toolbarClosed && !timeout) {`.