Skip to content

Instantly share code, notes, and snippets.

@davidjbeveridge
Last active March 1, 2024 07:51
Show Gist options
  • Save davidjbeveridge/53a4b3593e900df79806 to your computer and use it in GitHub Desktop.
Save davidjbeveridge/53a4b3593e900df79806 to your computer and use it in GitHub Desktop.
Buffer bookmarklet
(function() {
function bufferUrl(url, title) {
baseUrl = "http://bufferapp.com/add?";
return [baseUrl,
"url=",
encodeURIComponent(url),
"&text=",
encodeURIComponent(title)
].join('');
}
location.href = bufferUrl(window.location.href, document.title);
})();
javascript:(function()%7Bvar%20a%3Ba%3Dwindow.location.href%3Bvar%20b%3Ddocument.title%3BbaseUrl%3D%22http%3A%2F%2Fbufferapp.com%2Fadd%3F%22%3Ba%3D%5BbaseUrl%2C%22url%3D%22%2CencodeURIComponent(a)%2C%22%26text%3D%22%2CencodeURIComponent(b)%5D.join(%22%22)%3Blocation.href%3Da%7D)()%3B%0A
@neonleif
Copy link

neonleif commented Feb 16, 2017

Nice, now I don't have to use the Buffer Chrome extension that changes the DOM. The iFrame'd version is even better: https://gist.github.com/davidjbeveridge/cdb8484c45ad170a6a88

@TS6ix2GaH3q679h5
Copy link

Thanks. The bookmarklet I was using somehow lost functionality. This appeared as the top Google search. Can confirm it works well in 2024. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment