Skip to content

Instantly share code, notes, and snippets.

@ward
Created November 26, 2011 21:01
Show Gist options
  • Save ward/1396284 to your computer and use it in GitHub Desktop.
Save ward/1396284 to your computer and use it in GitHub Desktop.
Google +1 Bookmarklet
(function() {
var a,b;
a=document.createElement('script');
a.type='text/javascript';
a.async=true;
a.src='https://apis.google.com/js/plusone.js';
b=document.createElement('div');
b.id='ward_plusone';
b.style.position='fixed';
b.style.top='10px';
b.style.right='10px';
b.style.padding='10px';
b.style.zIndex=99999;
b.style.background='#FFFFFF';
b.style.border='1px solid #000000';
b.innerHTML='<g:plusone></g:plusone>';
document.body.insertBefore(b, document.body.firstChild);
document.body.insertBefore(a, document.body.firstChild);
})();
@ward
Copy link
Author

ward commented Nov 26, 2011

From a blog post.

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