faehnri.ch

Handy Bookmarklets

tiny scripts for a button in your browser

2020-08-17


Bookmarklets are a small bit of code you can put in a bookmark button in a browser. Here are a couple I keep that are handy.

Archive.org's Wayback Machine

You can instantly archive the webpage you're on with the click of a button. Add a new bookmark to your browser. In Firefox, I right click the shortcut menu bar and say add new bookmark.

Give it a name like "💾 Archive". Under location put this:

javascript:location.href = '//web.archive.org/save/' + location.href.split('?')[0];

That code is run on the current web page when you click your bookmark. It'll direct you to the archive.org site to save the page.

Looking at the script, you could also just load "web.archive.org/save/[URL]" in a browser.

Pinboard

I use pinboard a lot. I have this bookmarklet with the name "📌Pinboard" and code:

javascript:q=location.href;if(document.getSelection){d=document.getSelection();}else{d='';};p=document.title;void(open('https://pinboard.in/add?url='+encodeURIComponent(q)+'&description='+encodeURIComponent(d)+'&title='+encodeURIComponent(p),'Pinboard','toolbar=no,width=700,height=350'));