Skip to content

Instantly share code, notes, and snippets.

@benhughes
Last active October 27, 2025 17:34
Show Gist options
  • Select an option

  • Save benhughes/eb9485add32a480de5aa6349ecf8999d to your computer and use it in GitHub Desktop.

Select an option

Save benhughes/eb9485add32a480de5aa6349ecf8999d to your computer and use it in GitHub Desktop.

Revisions

  1. benhughes revised this gist Oct 27, 2025. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion save-to-things.js
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,12 @@
    // bookmarklet-title: Save to Things
    // bookmarklet-about: Saves the current page to things
    // bookmarklet-var: tag
    // bookmarklet-var: project

    const title = encodeURIComponent(document.title)
    const text = encodeURIComponent(window.location);
    const listParam = project ? `&list=${project}` : '';
    const tagParam = tag ? `&tags=${tag}` : '';

    window.location=`things:///add?title=${title}&notes=${text}&list=${listParam}`
    window.location=`things:///add?title=${title}&notes=${text}${listParam}${tagParam}`

  2. benhughes revised this gist Oct 27, 2025. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions save-to-things.js
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    // bookmarklet-title: Save to Things
    // bookmarklet-about: Saves the current page to things
    // bookmarklet-var: project

    const title = encodeURIComponent(document.title)
    const text = encodeURIComponent(window.location);
  3. benhughes revised this gist Oct 27, 2025. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion save-to-things.js
    Original file line number Diff line number Diff line change
    @@ -3,6 +3,7 @@

    const title = encodeURIComponent(document.title)
    const text = encodeURIComponent(window.location);
    const listParam = project ? `&list=${project}` : '';

    window.location=`things:///add?title=${title}&notes=${text}`
    window.location=`things:///add?title=${title}&notes=${text}&list=${listParam}`

  4. benhughes renamed this gist Mar 22, 2025. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.txt → save-to-things.js
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    // bookmarklet-title: playground
    // bookmarklet-about: Build your own bookmarklet. Once you're happy, save the code to a GitHub gist (http://gist.github.com).
    // bookmarklet-title: Save to Things
    // bookmarklet-about: Saves the current page to things

    const title = encodeURIComponent(document.title)
    const text = encodeURIComponent(window.location);
  5. benhughes created this gist Mar 22, 2025.
    8 changes: 8 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    // bookmarklet-title: playground
    // bookmarklet-about: Build your own bookmarklet. Once you're happy, save the code to a GitHub gist (http://gist.github.com).

    const title = encodeURIComponent(document.title)
    const text = encodeURIComponent(window.location);

    window.location=`things:///add?title=${title}&notes=${text}`