Last active
March 1, 2024 07:51
-
-
Save davidjbeveridge/53a4b3593e900df79806 to your computer and use it in GitHub Desktop.
Buffer bookmarklet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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); | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
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
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