住所をGoogle Mapへのはてな記法リンクに変換するbookmarklet

http://d.hatena.ne.jp/p-_-q/20080812/p2
javascript:
d=document;
w=window;
t='';
if(d.selection)
  t=d.selection.createRange().text;
else{
  if(d.getSelection)
    t=d.getSelection();
  else{
    if(w.getSelection)
      t=w.getSelection()
  }
}
t=t.replace(/\s+/g,'').replace(/(\uff0d)/g,'-').replace(/(\uff10)/g,'0').replace(/(\uff11)/g,'1').replace(/(\uff12)/g,'2').replace(/(\uff13)/g,'3').replace(/(\uff14)/g,'4').replace(/(\uff15)/g,'5').replace(/(\uff16)/g,'6').replace(/(\uff17)/g,'7').replace(/(\uff18)/g,'8').replace(/(\uff19)/g,'9');
void(w.prompt('Google%20Maps','[http://maps.google.co.jp/maps?q='+encodeURI(t)+':title='+t+']'))