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.
- 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
.txt.md.json.log.csv.xml.yaml.yml.ini.conf
If you want more file types supported, send a PR or let me know.
- Install Tampermonkey.
- Open the script page on Greasy Fork:
- Click Install this script.
- Open any GitHub release page, for example:
https://github.com/<owner>/<repo>/releases
- For supported text assets, click Preview next to the download link.
- Read file content in the modal. The script fetches content over HTTP in memory, but does not trigger browser file-save download behavior.
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.
