GitHub Stars Pagination

Add clickable page number navigation to GitHub Stars pages

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

Autor
dyxang
Denně instalací
0
Celkem instalací
0
Hodnocení
0 0 0
Verze
0.4.3
Vytvořeno
03. 04. 2026
Aktualizováno
03. 04. 2026
Size
25,9 KB
Licence
MIT
Spustit na

GitHub Stars Pagination

A UserScript that adds clickable page number navigation to GitHub Stars pages

License: MIT Version

中文

Features

  • Adds clickable page numbers between "Previous" and "Next" buttons
  • Auto-updates navigation when page changes
  • Preloads pages for faster navigation
  • Includes cache clearing in Tampermonkey menu

Installation

  1. Install Tampermonkey or Violentmonkey
  2. Install the script: github-stars-pagination.user.js
  3. Go to any GitHub stars page (e.g., https://github.com/your-username?tab=stars)

How It Works

  1. Detects when you're on a GitHub stars page
  2. Finds the pagination container
  3. Preloads page information
  4. Stores data in localStorage for 24 hours
  5. Adds styled page number buttons
  6. Updates navigation when page changes

Configuration

Configurable constants at the top of the script:

const STARS_PER_PAGE = 30;      // Items per page
const MAX_PAGES = 15;           // Maximum pages to preload
const REQUEST_DELAY = 800;      // Delay between requests (ms)
const CACHE_EXPIRY = 24 * HOUR; // Cache duration

Troubleshooting

If pagination doesn't appear:

  1. Refresh the page
  2. Clear cache via Tampermonkey menu
  3. Ensure you're on a valid stars page (?tab=stars)
  4. Check browser console for errors

License

MIT


GitHub 标星分页导航

为 GitHub 标星页面添加可点击页码导航的用户脚本

License: MIT Version

English

功能

  • 在 "Previous" 和 "Next" 按钮之间添加可点击页码
  • 页面变化时自动更新导航
  • 预加载页面以加快导航速度
  • 在 Tampermonkey 菜单中包含清除缓存选项

安装

  1. 安装 TampermonkeyViolentmonkey
  2. 安装脚本:github-stars-pagination.user.js
  3. 打开任何 GitHub 标星页面(例如:https://github.com/your-username?tab=stars

工作原理

  1. 检测你何时访问 GitHub 标星页面
  2. 找到分页容器
  3. 预加载页面信息
  4. 将数据存储在 localStorage 中24小时
  5. 添加样式化的页码按钮
  6. 页面变化时更新导航

配置

脚本顶部的可配置常量:

const STARS_PER_PAGE = 30;      // 每页项目数
const MAX_PAGES = 15;           // 最大预加载页数
const REQUEST_DELAY = 800;      // 请求之间的延迟(毫秒)
const CACHE_EXPIRY = 24 * HOUR; // 缓存持续时间

故障排除

如果分页没有显示:

  1. 刷新页面
  2. 通过 Tampermonkey 菜单清除缓存
  3. 确保你在有效的标星页面上(?tab=stars
  4. 检查浏览器控制台是否有错误

许可证

MIT