Skip to content

theg1239/VTOP-AutoOpen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

VTOP AutoOpen

Extension that intercepts VTOP reference material downloads and opens PDFs directly in the native viewer


Table of Contents
  1. About
  2. Built With
  3. Installation
  4. Usage
  5. Contributing

About

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.

Features

  • Prototype-patch: Overrides HTMLFormElement.prototype.submit to 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.

Built With

  • JavaScript – Core scripting for content script & service worker
  • WebExtension APIsbrowser.tabs, browser.runtime, fetch, FileReader

Installation

  1. Clone or download this repo to a folder, e.g. vtop-autoopen.
  2. In your browser, go to chrome://extensions, load unpacked, select that folder and you're good to go.

Usage

  1. Log in and navigate to any VTOP Course Page.
  2. Click any Reference Material download button.
  3. The PDF will open instantly in a new tab via your browser's built-in PDF viewer—no file-save dialog.

Contributing

Bug reports, feature requests, and pull requests are welcome!

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature-name.
  3. Make your changes and commit: git commit -m "Add feature".
  4. Push to your fork: git push origin feature-name.
  5. Open a Pull Request here on GitHub.

Please ensure any additions maintain MV3 compatibility and do not introduce CSP conflicts.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published