Skip to content

shawnlinboy/github-assets-preview

Repository files navigation

GitHub Assets Preview (Tampermonkey)

Preview text-based GitHub release assets directly in the browser, without downloading to local storage.

This userscript adds a Preview button next to supported release asset links on GitHub release pages.

Greasy Fork

Greasy Fork Total Installs Greasy Fork Daily Installs Greasy Fork Version

Screenshot

Preview screenshot

Features

  • In-page preview modal for text assets
  • Works on GitHub release pages (/releases)
  • Handles dynamically loaded content via MutationObserver
  • Graceful fallback for request errors and timeouts
  • Large file protection with content truncation

Supported File Types

  • .txt
  • .md
  • .json
  • .log
  • .csv
  • .xml
  • .yaml
  • .yml
  • .ini
  • .conf

If you want more file types supported, send a PR or let me know.

Installation

  1. Install Tampermonkey.
  2. Open the script page on Greasy Fork:
  3. Click Install this script.

Usage

  1. Open any GitHub release page, for example:
    • https://github.com/<owner>/<repo>/releases
  2. For supported text assets, click Preview next to the download link.
  3. Read file content in the modal. The script fetches content over HTTP in memory, but does not trigger browser file-save download behavior.

License

Copyright 2026 Shen Lin

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

A Tampermonkey script helps you preview text-based files directly rather than downloading everything

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors