A Tampermonkey userscript that filters the new GitHub feed — hide, collapse or keep each kind of card, block cards by keyword, cut off old items by age, and auto-load the feed while you scroll. It also adds a Stargazers button on your own repositories. Fully configurable.
-
Three filtering modes, configured independently per category:
Show— do not filter (default)Collapse— wrap the card in a collapsible container with a one-line header; click the header to expand or fold againHide— hide the card entirely (uncheck to restore immediately)
-
Fine-grained categories (recognized from the card's
data-hydro-view, fieldfeed_card.card_type):Category card_type Merged pull requests MERGED_PULL_REQUESTReleases RELEASETrending repositories TRENDING_REPOSITORYRecommended for you REPOSITORY_RECOMMENDATION(STARRED/CONTRIBUTED)Popular among people you follow REPOSITORY_RECOMMENDATION(FOLLOWED)Created repositories CREATED_REPOSITORYForked repositories FORKED_REPOSITORYMade public PRIVATE_TO_PUBLIC_REPOSITORYFollows FOLLOWOther activity fallback for unrecognized cards Stars & lists (group) STARRED_REPOSITORY,ADDED_TO_LIST; sub-items supportInherit -
Keyword blocking: one keyword per line, matched as a case-insensitive substring against the card text. Keyword mode is its own
Show / Collapse / Hideswitch and takes precedence over the category mode. The container header shows the matched keyword. -
Per-URL feature gating: each feature has its own enable switch and URL rules (one glob per line,
*matches any characters). Defaults:- Feed filter:
https://github.com/feed* - Right column:
https://github.com/ - Stargazers:
https://github.com/*/*
- Feed filter:
-
Right column (Explore):
Universe bannerandChangelogcan be filtered separately; when both are set to Hide, the whole sidebar is removed as well. -
Time filter (off by default): set a threshold in days (default 3). Each card is checked on its own, so only cards older than the threshold are hidden even if the feed is not strictly chronological. Cards without a visible timestamp (recommendations, trending) are left untouched. When at least one card is hidden this way, the feed ends with a "You've reached the end of the feed" marker and the
Morebutton is removed. -
Auto-load (off by default): when enabled, scrolling to the bottom of the feed automatically clicks
Moreto load the next page — no manual clicks needed. Page limit defaults to 30 (enter0for unlimited); loading stops when the time cutoff is reached or the tab is backgrounded. -
Stargazers button: on repository pages the script detects whether you are the owner or belong to the owning organization (GitHub settings are fetched once and cached for 24 hours, with a manual override list) and injects a
Stargazersbutton next to the Fork button. It links to/{owner}/{repo}/stargazers. Disable "Only my repositories and organizations" to add the button on every repository. -
Live counter and reset: the settings panel shows how many items are currently filtered, and
Reset to defaultsat the bottom of the panel restores everything in one click. -
Settings access: a small Feed Filter badge in the bottom-right corner opens the settings panel; the Tampermonkey menu only has a
Settingsentry. -
Changes apply immediately and are persisted (
GM_setValue) — no page reload required.
The latest build is published to the release branch as main.js. That branch is generated by the release workflow and is overwritten on every release; do not edit it by hand.
- Install Tampermonkey (>= 4.19).
- Open
main.js. - Because the file is named
main.jsrather than*.user.js, Tampermonkey does not offer its install page automatically. Create a new script in the Tampermonkey dashboard, paste the file contents, and save. Alternatively, downloadmain.jsand import it from the dashboard's Utilities tab. - Click the Feed Filter badge in the bottom-right corner (or use the Tampermonkey menu) to configure the script.
The script runs on
https://github.com/feed*,https://github.com/andhttps://github.com/*/*. Features only act on the URLs configured in the settings panel.
Click the Feed Filter badge in the bottom-right corner to open the settings panel. The Tampermonkey menu has a single entry:
- GitHub Feed Filter — Settings — open the full-screen settings panel.
Reset to defaults lives at the bottom of the settings panel.
Settings panel layout:
FEATURES
[x] Feed filter URLs: https://github.com/feed*
[x] Right column URLs: https://github.com/*
[x] Stargazers button URLs: https://github.com/*/*
[x] Only my repositories and organizations
Signed in as: Pfolg
Organizations: acme, other [Refresh]
Additional organizations (one per line): [textarea]
FEED FILTERS
Merged pull requests [Show|Collapse|Hide]
Releases [Show|Collapse|Hide]
...
Stars & lists > [Show|Collapse|Hide] (expand for sub-items)
Starred repositories [Inherit|Show|Collapse|Hide]
Added to a list [Inherit|Show|Collapse|Hide]
KEYWORDS
[x] Block by keyword
When matched [Show|Collapse|Hide]
One keyword per line: [textarea]
RIGHT COLUMN
Universe banner [Show|Collapse|Hide]
Changelog [Show|Collapse|Hide]
Hiding both removes the whole Explore sidebar.
TIME FILTER
[ ] Hide items older than [3] day(s)
AUTO-LOAD
[ ] Auto-load feed (auto-expand while scrolling)
Page limit [30] (0 = unlimited)
Hidden: 42 items [Reset to defaults]
- Every change takes effect immediately and is saved automatically.
- Cards in
Collapsemode are wrapped in a collapsible container; click its header to temporarily expand that card. The header shows the category, or the matched keyword when keyword blocking caused the collapse. - The panel closes when you click outside it or press
Esc.
Each item in the new feed is an <article class="js-feed-item-component"> carrying an inline JSON blob in its data-hydro-view attribute:
{ "payload": { "feed_card": {
"card_type": "MERGED_PULL_REQUEST",
"resource_relationship": "STARRED",
"created_at": "2026-11-14T20:14:04.000-08:00",
"gatherer": "pullrequest_for_you_feed_mysql"
} } }The script uses card_type (plus resource_relationship) as the classification key, falling back to the card's text when the attribute is missing or unparsable. Grouped cards (for example "starred 3 repositories") nest child <article> elements; only top-level cards are processed, so children follow their parent automatically. Because the feed appends content through an infinitely scrolling turbo-frame, a MutationObserver keeps applying the current configuration to newly added cards (idempotently).
For Stargazers, the signed-in login comes from meta[name="user-login"] and the repository from meta[name="octolytics-dimension-repository_nwo"]. Organizations are read from https://github.com/settings/organizations (same-origin request) and cached in GM storage for 24 hours; the settings panel lets you refresh the list or add organizations manually.
Requires Node.js 20 or newer.
npm ci # install dev dependencies from the lockfile
npm run build # build github-feed-filter.user.js
npm run watch # rebuild on change
npm run typecheck # tsc --noEmit
npm test # build + typecheck + unit + source + DOM tests
npm run coverage # unit + source tests under c8, writes coverage/- Tests run against synthetic fixtures (no personal data needed).
test/unit.test.tscovers pure logic: classification, URL matching, keywords, config migration and organization parsing.test/coverage.test.tsdrives the TypeScript modules directly inside jsdom soc8can measure source coverage.test/dom.test.tsruns the built userscript inside jsdom and exercises feature gating, filtering, the settings panel and the Stargazers button.
.github/workflows/release.yml runs on a v* tag push or manually from the Actions tab. It builds with the requested version, runs all tests and coverage, fills README.template.md through scripts/gen-readme.mjs, and publishes only main.js and README.md to the release branch. The generated README records the source branch and commit, build date, trigger, tag, workflow run, bundle size, test counts and a collapsible per-file coverage table.
- Bug reports and feature requests: open an Issue
- Usage questions are welcome too — tag them with
[Question]in the title - Pull requests: target the
masterbranch and keep the UI copy in English
When reporting a problem, the following information helps a lot:
- Tampermonkey version and browser
- URL of the page where the problem occurs
- Console (F12) error output
- The relevant script settings (a panel screenshot is enough)
MIT (c) 2026 Pfolg