Skip to content

wheelercj/Stardown

Repository files navigation

Stardown's icon Stardown

Copy the web as markdown

Firefox badge Chrome badge Edge badge

You can also install from the source code to get updates early.

demo gif

  • Click the extension's icon to copy a link for the current page.
  • Right-click part of a page to copy it as markdown. Select before right-clicking to copy multiple parts.
  • Double-click the extension's icon to copy links for all tabs.
  • Select tabs before double-clicking the icon to copy links for only those tabs.
  • Press Ctrl+Shift+U (Mac: Cmd+Shift+U) or whichever keyboard shortcut you prefer in your browser's settings to copy a link for the current page.
  • Use the options page to customize these features.

By default, the markdown created when selecting and right-clicking part of a page includes a link that navigates to the specific part of the page you selected, when possible. This is accomplished with text fragments and/or HTML element IDs. 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.

Stardown requires permission to display notifications so it can show you important error messages.

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 copied a link for the entire page, not a specific part

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 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 options disappeared

Due to browser limitations, Stardown's context menu options cannot appear for certain kinds of links, images, and videos. Specifically, they cannot appear for canvases, background images, inline SVGs, HTML anchors that contain both text and image(s), videos that don't have a <video> HTML element, and videos with a <video> HTML element that's covered by other elements.

Besides those possibilities, browsers have an occasionally reoccuring bug that makes the context menu options disappear. Reinstalling Stardown should fix this.

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 of 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.

Download an entire page

Although Stardown can be used to copy an entire page's content as markdown all at once, other tools that specialize in that sometimes give better results.

  • MarkDownload was developed by an Obsidian community moderator.
  • Obsidian Web Clipper Bookmarklet is a bookmarklet for saving web pages directly to Obsidian.
  • Omnivore doesn't save pages as markdown but can export them as markdown.
  • Zotero doesn't save pages as markdown (at least by default), but is one of the best tools for research.

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 as Markdown is similar to Stardown but has a popup menu with different options, and different priorities in what markdown it generates.

Copy just a URL with a text fragment

Why use Stardown?

Unlike the extensions linked above, Stardown:

  • requires only one click to create a markdown link for the current page
  • can create markdown links for specific parts of pages (using text fragments and/or HTML element IDs)
  • can create markdown of specific parts of pages while keeping almost all formatting supported by markdown
  • can create markdown of YouTube videos that renders well in GitHub
  • is focused on the most important features so it's more likely to be maintained and bug-free

Install from source

Follow these steps to install Stardown using the source code. If you also want to change Stardown's code, instead follow the directions in Installing Stardown from source for development.

Chrome and Edge

  1. in a terminal, run git clone https://github.com/wheelercj/Stardown.git && cd Stardown
  2. then run npm run build-chrome
  3. in your browser, open chrome://extensions/
  4. turn on developer mode
  5. click "Load unpacked"
  6. select Stardown's chrome folder

To get updates:

  1. run npm run update-chrome
  2. in your browser, open chrome://extensions/
  3. click Stardown's reload button

Firefox

  1. in a terminal, run git clone https://github.com/wheelercj/Stardown.git && cd Stardown
  2. then npm run build-firefox
  3. in Firefox, open about:debugging#/runtime/this-firefox
  4. click "Load Temporary Add-on..."
  5. select Stardown's firefox/manifest.json file

To get updates:

  1. run npm run update-firefox
  2. in Firefox, open about:debugging#/runtime/this-firefox
  3. click Stardown's reload button

Development

Contributions are welcome! Let me know (such as in an issue or a discussion) what you have in mind ahead of time if you think there's a chance it won't be approved.

Also, please read docs/develop.md.