c4se記:さっちゃんですよ☆

.。oO(さっちゃんですよヾ(〃l _ l)ノ゙☆)

.。oO(此のblogは、主に音樂考察Programming に分類されますよ。ヾ(〃l _ l)ノ゙♬♪♡)

音樂は SoundCloud に公開中です。

考察は現在は主に Scrapbox で公表中です。

Programming は GitHub で開發中です。

titleを表示するだけかもしれない #js #bookmarklet

小ネタな。


TitleとURLを表示する丈の…… #javascript #bookmarklet - c4se記:さっちゃんですよ☆ http://d.hatena.ne.jp/Kureduki_Maari/20100108/1262950332
結局此れ使い続けてたんですが。
ちょっと更新したので。

javascript:(function(){
  var _temp,_doc=document,loc=location.href,f=_doc.createElement('div'),fs=f.style,ww=window.innerWidth,wh=window.innerHeight;
  if(_temp=loc.match(/^https?:\/\/twitter.com\/#!\/[A-Za-z0-9_]+\/status(?:es)?\/(\d+)\/?$/)){
    loc='http://'+Number(_temp[1]).toString(36).toUpperCase()+'.itter.ch/';
  }else if(_temp=loc.match(/^http:\/\/www.amazon.co.jp\/[^\/]+\/dp\/([0-9X]+)\//)){
    loc='http://www.amazon.co.jp/dp/'+_temp[1]+'/';
  }
  f.setAttribute('id','c4se_title_location');
  fs.zIndex=(function(){
    var a=_doc.querySelectorAll('*'),i=-1,e,z=0,_z;
    while(e=a[++i]){_z=Number(getComputedStyle(e,null).zIndex);if(_z>z){z=_z}}
    return z+1;
  })();
  fs.position='fixed';
  fs.margin=fs.padding=fs.top=fs.right=fs.bottom=fs.left='0';
  fs.width=ww; fs.height=wh;
  fs.border='none';
  fs.background='rgba(0,0,0,0.5)';
  f.innerHTML='<textarea style="position:absolute;top:'+(ww/2-250)+'px;left:'+(wh/2-75)+'px;width:500px;height:150px">'+_doc.title+' '+loc+'</textarea><a style="position:absolute;top:50px;left:50px;margin:0;padding:0;width:50px;height:50px;font-size:30px;color:#fc3;text-decoration:none" href="javascript:var%20f=document.getElementById(\'c4se_title_location\');f.parentNode.removeChild(f);void(0)">X</a>';
  _doc.body.appendChild(f);
})();
void(0)


bookmarklet

javascript:(function(){var%20_temp,_doc=document,loc=location.href,f=_doc.createElement('div'),fs=f.style,ww=window.innerWidth,wh=window.innerHeight;if(_temp=loc.match(/^https?:\/\/twitter.com\/#!\/[A-Za-z0-9_]+\/status(?:es)?\/(\d+)\/?$/)){loc='http://'+Number(_temp[1]).toString(36).toUpperCase()+'.itter.ch/'}else if(_temp=loc.match(/^http:\/\/www.amazon.co.jp\/[^\/]+\/dp\/([0-9X]+)\//)){loc='http://www.amazon.co.jp/dp/'+_temp[1]+'/'}f.setAttribute('id','c4se_title_location');fs.zIndex=(function(){var a=_doc.querySelectorAll('*'),i=-1,e,z=0,_z;while(e=a[++i]){_z=Number(getComputedStyle(e,null).zIndex);if(_z>z){z=_z}}return z+1;})();fs.position='fixed';fs.margin=fs.padding=fs.top=fs.right=fs.bottom=fs.left='0';fs.width=ww; fs.height=wh;fs.border='none';fs.background='rgba(0,0,0,0.5)';f.innerHTML='<textarea style="position:absolute;top:'+(ww/2-250)+'px;left:'+(wh/2-75)+'px;width:500px;height:150px">'+_doc.title+' '+loc+'</textarea><a style="position:absolute;top:50px;left:50px;margin:0;padding:0;width:50px;height:50px;font-size:30px;color:#fc3;text-decoration:none" href="javascript:var%20f=document.getElementById(\'c4se_title_location\');f.parentNode.removeChild(f);void(0)">X</a>';_doc.body.appendChild(f)})();void(0)


読み難いね。TwitterとAmazonのURLを、短くする様に。
Twitterを短くするのには[2010-03-21 - u_ http://d.hatena.ne.jp/unetori/20100321#1269186809 ]を。
もっと素早く更新したい。交信もしたい。
あ、Operaでしか確かめてません。
ブラウザでタイトルをコピーするのって、素人にはそんなに簡単じゃないと思う。