/already-seen

Auto-hide Reddit links after you've seen them once. :eyes: (also Hacker News links)

Primary LanguageTypeScriptMIT LicenseMIT

"I've already seen that..." you think to yourself, dozens or hundreds of times per day.

Auto-hide Reddit links after you've seen them once. 👀 (also Hacker News links)

99 links are hidden in this image.

  • Hiding links is done automatically
  • Easily toggle links show/hide if you need it
  • Works on Old Reddit and Hacker News

How to use

  1. install browser extension Tampermonkey for Chrome or Greasemonkey for Firefox
  2. optional security config: Tampermonkey/Greasemonkey have a lot of permissions, I recommend allowing it to run only on specific sites
    • sites I allow tampermonkey to run on:
      1. https://raw.githubusercontent.com/* to install/update this script in Tampermonkey/Greasemonkey
      2. https://www.reddit.com/* so this script works on reddit
      3. https://news.ycombinator.com/* so this script works on Hacker News
  3. Install by clicking below. It works automatically!

How does it know when you've seen a link?

already-seen permanently hides all links on the previous page after you click "next page".

You can also click "I've seen all the links on this page" at the bottom of each page instead of clicking "next page".

Developers

Small Gitcoin bounties are available for certain issues. Bounties will be added in Gitcoin upon request.

Testing Tampermonkey script locally

Use yarn dev to test Tampermonkey locally by installing a test script from a local webserver. (Open the webserver page and click the file to install the dev script to Tampermonkey.)

  • Requires that Tampermonkey/Greasemonkey have browser permissions to run on http://127.0.0.1:38736/*
  • The yarn dev script installs to Tampermonkey with the name already-seen-dev; make sure to disable the regular already-seen while you're testing

Toolchain

  • tsc isn't a bundler, so we need a bundler
  • I wanted to try closure-compiler, which does optimizations and bundling, but leaves some comments in the output which breaks browser bookmarklets.
    • (previously this was targeting a bookmarklet before upgrading to Tampermonkey; uglify-js used to remove the comments from closure-compiler output)
    • closure-compiler doesn't do src file discovery, so each dependency is manually added in package.json (just jquery right now)
    • closure-compiler's -O ADVANCED results in the script not compiling properly when used with Tampermonkey. Currently using no -O flag.