Created
July 8, 2014 22:32
-
-
Save n8henrie/70e821d57ca24f974c01 to your computer and use it in GitHub Desktop.
Improved Buffer bookmarklet that *should* work on iPhone, iPad, and Mac.
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()%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