Javascript ソースコードの確認
(function(){var D=document,i,j,k,t,x,xp,H=location.href,L=H.replace(/[^\/]*$/,''),a=[],Ll=[],Ls=[[],[],[],[],[],[],[]],Pa,
labs=['下位ページ','兄弟ページ','上位ページ','サイト内ページ','別のサブドメイン','サイト外リンク','他'];
for (i=0;x=document.links[i];++i){
if (k=x.href ){
if(a[k]){
a[k]=a[k]+1;
}else{
a[k]=1;
Ll.push(x);
}
}
}
for (i=0;i < Ll.length;++i){
x = Ll[i];
xp = x.href.replace(/[^\/]*$/,'');
if( ! x.hostname){
setA(Ls[6],'-',x);
}else if( xp.substr( 0,L.length) == L){
if(x.href.substr(L.length ,999).match(/\//)){
setA(Ls[0],getPath(xp),x);
}else{
setA(Ls[1],getPath(xp),x);
}
}else if( L.substr(0,xp.length)== xp ){
setA(Ls[2],getPath(xp),x);
}else if( location.hostname == x.hostname){
setA(Ls[3],getPath(xp),x);
}else if( getDomain(location.hostname) == getDomain(x.hostname) ){
setA(Ls[4],x.hostname,x);
}else {
setA(Ls[5],getDomain(x.hostname),x);
}
}
function setA(arr,sym,con){
if( arr[sym]){
arr[sym].push(con);
}else{
arr[sym]=new Array(con);
}
}
function getDomain(u){
return '' + u.match(/[\w-]{3,}(?:\.[A-Za-z]{2,3})?\.[A-Za-z]{2,}$/);
}
function getPath(u){
return '' + u.replace(/^.*\/\/[^\/]+\//,'')
}
D.getElementsByTagName('html')[0].style.cssText='margin-left:250px;';
D.getElementsByTagName('body')[0].appendChild(Pa=D.createElement('div'));
Pa.style.cssText='position:fixed;top:0px;left:0px;width:250px;height:100%;overflow:auto;background:#eee;border-right:1px solid #ccc;text-align:left; opacity:0.9;filter:alpha(opacity=90);z-index:99999';
function addElm(Tx){
Pa.appendChild( t=D.createElement('div'));
t.innerHTML=Tx;
return t;
}
for(i=0;i < 7; i ++){
t=addElm(labs[i]);
t.style.cssText='font-size:11.5px;font-weight:bold;background:#ddd;';
for(j in Ls[i] ){
if(j.match(/^\w+$/)) continue;
t=addElm(j);
t.style.cssText='font-size:10.5px;font-weight:bold;padding-left:24px;color:#888;';
for(k=0; k < Ls[i][j].length; k++){
Pa.appendChild(t=D.createElement('a'));
t.innerHTML = Ls[i][j][k].textContent;
t.href = Ls[i][j][k].href;
t.style.cssText = 'display:block;font-size:11px;padding-left:48px;'
}
}
}
})()