2009年12月5日土曜日

google chromeでgoogleツールバーの代わりにブックマークレット

google chromeでgoogleツールバーの代わりにブックマークレット

google chromeが軽くて早くて便利なのでメインのブラウザとして使っています。
唯一不満なのが、googleツールバーが使えない事。

という事で、ブックマークレットを使用します。

■gmailへ送信
javascript:(function(){ document.location.href='http://mail.google.com/mail/?view=cm&fs=1&su='+escape(document.title)+'%20(link)&body='+escape(document.location.href) })();

■google readerへ登録
javascript:var%20f=false;var%20ls=document.getElementsByTagName('link');for(var%20i=0,l;l=ls[i];i++){var%20t=l.getAttribute('type');var%20r=l.getAttribute('rel');if(t&&(t=='application/rss+xml'||t=='application/atom+xml')&&r&&r=='alternate'){var%20h= l.getAttribute('href');if(h.indexOf('http')!=0){var%20p=(h.indexOf('/')!=0)?'/':location.pathname;h='http://'+location.hostname+p+h;}location=' http://google.com/reader/preview/*/feed/'+h;f=true;break;}}if(!f)alert('Oops.%20Can\'t%20find%20a%20feed.');

■bloggerへ送信
javascript:(function(){x=document;y=window;if(x.selection)%20{Q=x.selection.createRange().text;}%20else%20if%20(y.getSelection)%20{Q=y.getSelection();}%20else%20if%20(x.getSelection)%20{Q=x.getSelection();};m='http://beta.blogger.com/blog-this.g?source=toolbar&ie=UTF-8&oe=UTF-8&u='%20+%20escape(location.href)%20+%20'&n='%20+%20escape(document.title)%20+%20'&t=';y.open(m,'bloggerForm','scrollbars=no,width=475,height=300,top=175,left=75,status=yes,resizable=yes');})();

■google bookmarkへ追加
javascript:location.href='http://www.google.com/bookmarks/mark?op=add&bkmk='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)