/Stardown

Copy the web as markdown

Primary LanguageJavaScriptApache License 2.0Apache-2.0

Stardown's icon Stardown

A browser extension that copies a markdown link for the current page.

Firefox badge Chrome badge Edge badge

demo gif

After installing, there are multiple ways you can copy markdown links:

  • click the extension's icon
  • press Ctrl+Shift+U (Mac: Cmd+Shift+U), or whichever keyboard shortcut you prefer in your browser's settings
  • double-click the extension's icon to copy links for all tabs, or press Ctrl+Shift+UU (Mac: Cmd+Shift+UU)
  • select tabs before double-clicking the icon to copy links for only those tabs
  • right-click where you want to link to and choose "Copy markdown link to here"
  • select text before using the right-click option to create a link with a text fragment

Stardown's right-click option only adds a text fragment if you have selected text, but always tries to find an id attribute in the HTML elements you right-clicked so you can still link to specific parts of pages without text fragments. Firefox does not support text fragments yet, but the Firefox version of Stardown allows you to create links with text fragments.

How I use Stardown

Privacy

Stardown will never sell any data to anyone, and does not collect nor send any of your data anywhere besides putting markdown text into your clipboard.

In Chrome and Edge, if you use Stardown's feature that copies links for multiple tabs simultaneously, the first time you do, Stardown will request to "read your browsing history" because that's the only way for Chrome and Edge extensions to see the titles and URLs of all tabs (source). Granting this permission does NOT give access to existing browsing history; the request message only sounds like it does because malicious extensions that can see the titles and URLs of all tabs could start manually gathering your browsing activity. The permission can be revoked at any time. The Firefox version of Stardown requests the exact same permission but has a less misleading request message. Other Chrome and Edge browser extensions that request immediate and complete access to browsing history, unlike Stardown, use the request message "read and change your browsing history on all signed-in devices".

Settings

To open Stardown's options page, right-click the extension's icon and choose:

  • Firefox: "Manange extension" and then "Options"
  • Chrome: "Options"
  • Edge: "Extension options"

How to change the keyboard shortcut

  • Firefox
  • Chrome: chrome://extensions/shortcuts
  • Edge: edge://extensions/shortcuts

Troubleshooting

The right-click option doesn't always create links for specific parts of pages

Stardown looks for an HTML element ID where you right-clicked, but some parts of websites don't have any IDs. If there is no HTML element ID where you right-click and you don't select text before right-clicking, the link Stardown creates will be for the entire page, not for the part of the page where you right-clicked. Most websites assign an ID to each section title.

It's also not possible to link to text within the rarely used HTML iframes because text fragments don't support iframes. Lastly, a small number of sites allow creating text-fragment links but don't allow using them.

The right-click option disappeared

This is an occasionally reoccuring bug in browsers. Reinstalling Stardown should fix it.

Stardown displayed a red X and didn't do anything

This may happen if the current website is not focused, such as if you just clicked the address bar. In this case, click the page and try again.

Another possibility is that some websites limit what extensions can do and may prevent Stardown from working. A few examples are the Chrome Web Store and Chrome pages that start with chrome://. Fortunately, very few websites do this and it doesn't prevent Stardown from copying links for multiple tabs simultaneously if the current tab is not one of those limiting websites.

Something else is wrong

If reinstalling Stardown doesn't fix it and the issues page doesn't have an issue for it yet, please make a new issue.

Feature requests

You're welcome to make a feature request, and there may already be another browser extension that meets all your needs. I am not affiliated with any of the below extensions and have not tried all of them. Use them at your own risk.

Copy links in other formats besides markdown

  • url2clipboard supports HTML, Markdown, BBCode, Textile, AsciiDoc, MediaWiki, Jira, reStructuredText, LaTeX, Org Mode, and text.
  • TabCopy might only be on the Chrome Web Store, but supports many formats including HTML, Markdown, BBCode, CSV, and JSON, and lets you create custom link formats.

Copy just the titles or just the URLs of all tabs

Copy a website's content as markdown

Copy just a URL with a text fragment

Save a page for research

Why use Stardown?

Unlike the extensions linked above, Stardown:

  • can create markdown links for specific parts of pages (using text fragments and/or HTML element IDs)
  • requires only one click to create a markdown link for the current page
  • is focused on just the most important features so it's more likely to be maintained and bug-free

Development

I wrote some tips in Making browser extensions.

There are different versions of Stardown for Firefox and the Chromium browsers because of bugs or limitations in them:

text fragments

Text fragments and how to generate them is explained in this web.dev article. The article mentions a minified version of the text fragment generation code, but Stardown doesn't use the minified version because extension stores need to be able to review the code and minifying code doesn't really help extensions.