Extension that intercepts VTOP reference material downloads and opens PDFs directly in the native viewer
Table of Contents
VTOP Reference Auto-Open hooks into the VTOP course page’s hidden download form and button clicks to:
- Intercept the form submission or programmatic
.submit()call for “Reference Material.” - Fetch the PDF via
fetch()using the authenticated session. - Convert the binary blob to a
data:URL. - Open that
data:URL in a new tab, letting the browser's native PDF viewer render it.
- Prototype-patch: Overrides
HTMLFormElement.prototype.submitto catch any direct form-submit call. - Click-capture: Listens on the capture phase for reference-material button clicks.
- Seamless preview: Streams the PDF bytes, converts to Base64 data-URL, and opens in a new tab.
- Zero prompts: No “Save as…” dialogs, even under strict CSP.
- JavaScript – Core scripting for content script & service worker
- WebExtension APIs –
browser.tabs,browser.runtime,fetch,FileReader
- Clone or download this repo to a folder, e.g.
vtop-autoopen. - In your browser, go to
chrome://extensions, load unpacked, select that folder and you're good to go.
- Log in and navigate to any VTOP Course Page.
- Click any Reference Material download button.
- The PDF will open instantly in a new tab via your browser's built-in PDF viewer—no file-save dialog.
Bug reports, feature requests, and pull requests are welcome!
- Fork the repository.
- Create a new branch:
git checkout -b feature-name. - Make your changes and commit:
git commit -m "Add feature". - Push to your fork:
git push origin feature-name. - Open a Pull Request here on GitHub.
Please ensure any additions maintain MV3 compatibility and do not introduce CSP conflicts.