Skip to content

Instantly share code, notes, and snippets.

@FranciscoG
Last active August 30, 2022 18:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FranciscoG/76a6881a00ad555cd06f6736adb2bedb to your computer and use it in GitHub Desktop.
Save FranciscoG/76a6881a00ad555cd06f6736adb2bedb to your computer and use it in GitHub Desktop.
Hacker News - open both links at the same time

This snippet inserts a button into the row of actionable links under each submission that allows a user to open both the submission and the comments in one click

WARNING

Since this opens up 2 tabs from one click, you'll need to grant the site popup permissions.

// this needs to be minified and url encoded: https://chriszarate.github.io/bookmarkleter/
// raw url will change if gist is updated
(async function () {
const id = "4a89a1e108b8ee7d8f03666c93287cacea096a3b";
const response = await fetch(
`https://gist.githubusercontent.com/FranciscoG/76a6881a00ad555cd06f6736adb2bedb/raw/${id}/hn-links.js`
);
eval(await response.text());
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment