Skip to content

Instantly share code, notes, and snippets.

@fastfingertips
Last active January 20, 2025 20:24
Show Gist options
  • Save fastfingertips/e4267a987f7513e71307766ca868cc47 to your computer and use it in GitHub Desktop.
Save fastfingertips/e4267a987f7513e71307766ca868cc47 to your computer and use it in GitHub Desktop.
Block GitHub Gists from Specific Users

Block GitHub Gists from Specific Users using uBlock Origin

If you want to block Gists from certain users on GitHub, you can use custom filter rules for uBlock Origin. This method will hide Gist snippets created by the specified users from appearing on the GitHub website, including on the discover page (https://gist.github.com/discover).

How to Use

  1. Install the uBlock Origin browser extension if you haven’t already.

  2. Open uBlock Origin settings.

  3. Go to the My Filters tab.

  4. Add the following filter rules:

    github.com##div.gist-snippet:has(a[href^="/choco-bot/"])
    github.com##div.gist-snippet:has(a[href^="/DolphinOfficial/"])
    
  5. Click on Apply Changes to save.

Once applied, all Gists created by the users choco-bot and DolphinOfficial will be hidden from your view, including when browsing on Discover Gists.


Example: Blocking Additional Users

To block Gists from other users, simply add a new line to the filter with the username of the person you want to block. Replace USERNAME in the example below with the GitHub username:

github.com##div.gist-snippet:has(a[href^="/USERNAME/"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment