Skip to content

About

Filter, collapse or hide GitHub feed cards by type, age the feed with time cutoff and auto-load. Fully configurable.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

GitHub Feed Filter

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.

license Tampermonkey

Features

  • 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 again
    • Hide — hide the card entirely (uncheck to restore immediately)
  • Fine-grained categories (recognized from the card's data-hydro-view, field feed_card.card_type):

    Category card_type
    Merged pull requests MERGED_PULL_REQUEST
    Releases RELEASE
    Trending repositories TRENDING_REPOSITORY
    Recommended for you REPOSITORY_RECOMMENDATION (STARRED / CONTRIBUTED)
    Popular among people you follow REPOSITORY_RECOMMENDATION (FOLLOWED)
    Created repositories CREATED_REPOSITORY
    Forked repositories FORKED_REPOSITORY
    Made public PRIVATE_TO_PUBLIC_REPOSITORY
    Follows FOLLOW
    Other activity fallback for unrecognized cards
    Stars & lists (group) STARRED_REPOSITORY, ADDED_TO_LIST; sub-items support Inherit
  • Keyword blocking: one keyword per line, matched as a case-insensitive substring against the card text. Keyword mode is its own Show / Collapse / Hide switch 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/*/*
  • Right column (Explore): Universe banner and Changelog can 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 More button is removed.

  • Auto-load (off by default): when enabled, scrolling to the bottom of the feed automatically clicks More to load the next page — no manual clicks needed. Page limit defaults to 30 (enter 0 for 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 Stargazers button 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 defaults at 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 Settings entry.

  • Changes apply immediately and are persisted (GM_setValue) — no page reload required.

Installation

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.

  1. Install Tampermonkey (>= 4.19).
  2. Open main.js.
  3. Because the file is named main.js rather 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, download main.js and import it from the dashboard's Utilities tab.
  4. 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/ and https://github.com/*/*. Features only act on the URLs configured in the settings panel.

Usage

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 Collapse mode 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.

How it works

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.

Development and tests

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.ts covers pure logic: classification, URL matching, keywords, config migration and organization parsing.
  • test/coverage.test.ts drives the TypeScript modules directly inside jsdom so c8 can measure source coverage.
  • test/dom.test.ts runs the built userscript inside jsdom and exercises feature gating, filtering, the settings panel and the Stargazers button.

Release builds

.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.

Feedback

  • Bug reports and feature requests: open an Issue
  • Usage questions are welcome too — tag them with [Question] in the title
  • Pull requests: target the master branch and keep the UI copy in English

When reporting a problem, the following information helps a lot:

  1. Tampermonkey version and browser
  2. URL of the page where the problem occurs
  3. Console (F12) error output
  4. The relevant script settings (a panel screenshot is enough)

License

MIT (c) 2026 Pfolg

About

Filter, collapse or hide GitHub feed cards by type, age the feed with time cutoff and auto-load. Fully configurable.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages