How to create a running list of links from Safari in Bear Writer

I’m building a daily habit of journalling and reflecting on what I read during the day. Often this includes articles I find on the internet. It’s easy to read one and move on without really taking in the information. To help improve more active reading I keep a running list of links in Bear. I may also add brief comments to remind me about specific areas when I come to review it during my journalling sessions.

My running list of links
My running list

To make adding one quick and painless I created a bookmarklet which adds the page title and url of the current web page to the top of a note in Bear. It opens the note in a new window so I can jot any comments. To make it more readable, since Bear uses markdown (or it’s own variant), I use a formatted bullet list item of the page title and url.

I mostly use Safari on Mac OS X so I get the extra benefit of the bookmark automatically syncing with all my devices. The bookmarklet works fine on iOS too so I can also add pages while I’m browsing and reading on my phone.

Let’s get down to the nitty gritty

First, in Bear you’ll need to create or find the note you want to use. I keep mine pinned so that it’s easily accessible at the top of the notes list. Right-click on the note in the notes list and choose Copy Note’s Identifier. Copy the snippet below, pasting your identifier into the appropriate place. If you are familiar with url parameters you can reference Bear’s x-callback-url guide and amend any of the other parameters to your preference. My snippet adds the entry, prepending it to the top of the list and opens the note in a new separate Bear window.

javascript:window.location='bear://x-callback-url/add-text?text=*%20%5B'+encodeURIComponent(document.title)+'%5D('+encodeURIComponent(location.href)+')&id=<paste your note identifier here>&mode=prepend&new_window=yes&open_note=yes'

Next, in Safari go to Bookmarks ➡ Add Bookmark. This will add the current page you have open (don’t worry, we’re going to edit it in a moment) and add it to Favorites. Give it a name - mine is called Add to Bear Reading List. Then go to Bookmarks ➡ Edit Bookmarks, find your newly added entry, right-click and choose Edit Address. Copy and paste your snippet into it.

Finally, make sure you also have your favourites bar shown. Go to View ➡ Show Favorites Bar.

Safari window showing the bookmarklet
It should look something like this.

One final thing to note, when you click on the bookmarklet in recent versions of Safari, you’ll get hit with a prompt of “Do you want to allow this page to open in Bear app”. Unfortunately at the time of writing there appears to be no way of suppressing this.