Skip to content

Instantly share code, notes, and snippets.

@n8henrie
Created July 8, 2014 22:32
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n8henrie/70e821d57ca24f974c01 to your computer and use it in GitHub Desktop.
Save n8henrie/70e821d57ca24f974c01 to your computer and use it in GitHub Desktop.
Improved Buffer bookmarklet that *should* work on iPhone, iPad, and Mac.
// javascript:(function()%20%7Bvar%20platform%20=%20window.navigator.platform;if%20(platform%20==%20'iPhone')%20%7Bvoid(location.href='bufferapp://?u='+encodeURIComponent(location.href)+'&t='+encodeURIComponent(document.title))%7Delse%20%7Bvar%20a=document.getElementsByTagName('head')%5B0%5D%2Cb=document.createElement('script');b.type='text/javascript';b.src='http://bufferapp.com/js/bookmarklet.v1.js?';a.appendChild(b);%7D%7D)();void%200;
javascript:(function() {
var platform = window.navigator.platform;
if (platform == 'iPhone') {
void(location.href='bufferapp://?u='+encodeURIComponent(location.href)+'&t='+encodeURIComponent(document.title))
}
else {
var a=document.getElementsByTagName('head')[0],b=document.createElement('script');
b.type='text/javascript';
b.src='http://bufferapp.com/js/bookmarklet.v1.js?'+Math.floor(Math.random()*99999);
a.appendChild(b);
}
})
();
void 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment