Created
July 1, 2010 14:25
-
-
Save silverjam/460026 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* Buzz bookmarklet, this should work on older browsers*/ | |
var e=encodeURIComponent; | |
var b='http://www.google.com/buzz/post'; | |
var u=e(document.location.href); | |
var els=document.getElementsByTagName('meta'); | |
var o=null; | |
for(var i=0;i<els.length;i++){ | |
if(els[i].name=='description'){ | |
o=els[i]; | |
break; | |
}} | |
var m='';if(o!=null)m=e(o.content); | |
var a='resizable=0,scrollbars=0,width=690,height=415'; | |
window.open(b+'?url='+u+'&message='+m,'_blank',a); | |
void(0) | |
/* Compressed version, this would be placed in "location" of bookmark: | |
javascript:e=encodeURIComponent;b='http://www.google.com/buzz/post';u=e(document.location.href);els=document.getElementsByTagName('meta');o=null;for(i=0;i<els.length;i++){if(els[i].name=='description'){o=els[i];break;}}m='';if(o!=null)m=e(o.content);a='resizable=0,scrollbars=0,width=690,height=415';window.open(b+'?url='+u+'&message='+m,'_blank',a);void(0) | |
*/ |
This file contains hidden or 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
/*Buzz bookmarklet, uses querySelector, works on FF 3.5+, Chrome, IE8+, Safari 4*/ | |
var e=encodeURIComponent; | |
var b='http://www.google.com/buzz/post'; | |
var u=e(document.location.href); | |
var o=document.querySelector('meta[name=description]'); | |
var m='';if(o!=null)m=e(o.content); | |
var a='resizable=0,scrollbars=0,width=690,height=415'; | |
window.open(b+'?url='+u+'&message='+m,'_blank',a); | |
void(0) | |
/* Compressed version, this would be placed in "location" of bookmark: | |
javascript:var e=encodeURIComponent;var b='http://www.google.com/buzz/post';var u=e(document.location.href);var o=document.querySelector('meta[name=description]');var m='';if(o!=null)m=e(o.content);var a='resizable=0,scrollbars=0,width=690,height=415';window.open(b+'?url='+u+'&message='+m,'_blank',a);void(0) | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment