Skip to content

imdj/HNRelevant

Repository files navigation

preview of the relevant submissions section on hacker news

Chrome Web Store Mozilla Add-on Stars Edge Add-ons

HNRelevant

A browser extension that adds a "Related" section to Hacker News. Don't miss out on relevant interesting discussions.

Features

  • Instant list of related submissions
  • Customize search queries in place (search for something different)
  • Matches and blend with Hacker News's design like a native feature
  • Choose how it works:
    • Automatic: Results load when you open a page
    • Manual: Fetch on demand
  • Available on Firefox for Android™
  • Ability to change defaults to your preference in the extension's popup menu

Installation

Available on:

  • Chrome web store: HNRelevant
  • Firefox (Desktop & Android) add-on: HNRelevant
  • Microsoft Edge add-ons: HNRelevant
  • As a Userscript. This option also has the benefit of supporting further browsers:
    1. Make sure to have one of the userscripts extensions installed e.g: Tampermonkey, Violentmonkey, or Greasemonkey.
    2. The userscript file can be found here HNRelevant.user.js.
    3. Load the script into the extension of your choice.

How it works

It is based on the HN Algolia search API and builds a short query by selecting keywords from the title and top level comments.

Build

The generated artifacts now come from a single build entry point instead of being maintained by hand.

  • Install the Node dependency once with npm install
  • Run node build.mjs to regenerate the manifests, the userscript, and the publishable ZIP packages
  • Use node build.mjs --minor or node build.mjs --major to bump the version and rebuild everything in one step
  • Use node build.mjs --userscript-only when you only want to refresh HNRelevant.user.js

The shared manifest source lives in manifest.base.json. Generated manifests and extension ZIPs are written under output/.

License

Released under the MIT License. See LICENSE file for details.