[JavaScript]ブックマークレットまとめ

サンプル

twitter

var t="frasio report | /";
var url="http://twitter.com/home?status="+encodeURIComponent(t);
window.open(url, "_blank");

はてなブックマーク

var t="frasio report";
var u="/";
var url="http://b.hatena.ne.jp/add?mode=confirm&url="+u+"&title="+encodeURIComponent(t);
window.open(url, "_blank");

Yahoo!ブックマーク

var t="frasio report";
var u="/";
var url="http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t="+encodeURIComponent(t)+"&u="+encodeURIComponent(u)+"&ei=UTF-8";
window.open(url, "_blank");

Googleブックマーク

var t="frasio report";
var u="/";
var te=encodeURIComponent((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection &&document.selection.createRange&&document.selection.createRange().text));
var url;
if(te==""){
	url="http://www.google.com/bookmarks/mark?op=add&bkmk="+u+"&title="+encodeURIComponent(t)
}else{
	url="http://www.google.com/bookmarks/mark?op=add&bkmk="+u+"&title="+encodeURIComponent(t)+"&annotation="+te;
}
window.open(url, "_blank");

facebook

var t="frasio report";
var u="/";
var url="http://www.facebook.com/sharer.php?u="+u+"&t="+encodeURIComponent(t);
window.open(url, "_blank");

delicious.

var t="frasio report";
var u="/";
var url="http://delicious.com/save?v=5&noui&jump=close&url="+encodeURIComponent(u)+"&title="+encodeURIComponent(t);
window.open(url, "_blank");

Yahoo!カレンダー

var std=new Date();
var st=std.getFullYear()+pzero(std.getMonth()+1,2)+pzero(std.getDate(),2)+"T"+pzero(std.getHours().toString(), 2)+pzero(std.getMinutes().toString(), 2);
var dur="0100";
var t="frasio report";
var s="flashやflashとかflashなど・・・最近はそうでもない";
var url='https://calendar.yahoo.co.jp/?';
url+='V=60';
url+='&ENC=UTF-8';
url+='&ST='+st;
url+='&DUR='+dur;
url+='&TITLE='+encodeURIComponent(t);
url+='&DESC='+encodeURIComponent(s);
url+='&URL='+"/";
url+='&chgp=1';
window.open(url, "_blank");