GitHub README Image Viewer

Preview GitHub markdown images in a viewer with switching, wheel zoom, and drag pan.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

نووسەر
Jiayang Xi
Daily installs
0
Total installs
4
Ratings
1 0 0
وەشان
1.0.4
Created
2026-05-19
Updated
2026-05-19
Size
17.6 KB
مۆڵەت
MIT
Applies to

功能简介

GitHub 默认点击 README 或 Markdown 正文中的图片时,通常会跳转到图片文件页面,查看多张截图或示例图时需要频繁返回,体验不够顺畅。

本脚本会为 GitHub 的 Markdown 图片增加悬浮预览能力:点击图片后直接在当前页面打开预览窗口,不打断阅读上下文。

主要功能

  • 点击 README、Issue、PR、评论等 Markdown 正文图片时,在悬浮窗口中预览
  • 支持当前页面所有图片之间快速切换
  • 支持底部缩略图列表,点击即可跳转到指定图片
  • 支持鼠标滚轮放大、缩小图片
  • 支持拖动平移放大后的图片
  • 支持键盘快捷键:
    • / :上一张 / 下一张
    • Esc:关闭预览
    • + / -:放大 / 缩小
    • 0:还原大小
  • 支持双击图片还原缩放
  • 兼容 GitHub 的局部页面切换

使用方式

安装脚本后打开 GitHub 仓库页面,点击 README 或 Markdown 正文中的图片即可打开预览窗口。

适用场景

  • 浏览项目 README 中的截图、流程图、效果图
  • 查看含有多张图片的 Issue 或 Pull Request
  • 阅读文档时避免频繁跳转图片文件页面
  • 快速对比同一页面中的多张图片

隐私与权限说明

脚本仅在 github.com 页面运行,不会上传、收集或存储任何用户数据。