// ==UserScript==
// @name		-	Breadcrumb URL
// @author		-	Ayush
// ==/UserScript==


(function(){
var d=document,w=window,x,y=w['location'],t='getElementById',s='createElement',b=y['protocol']+'//';
y=(y['host']+y['pathname']).split("/")


if(window!=top||(d[t]&&d[t]("AddBBcb")))return;
x=d[s]("DIV");x.id="AddBBcb"
t={
	position : 'fixed'	,
	top		 : '0'		,
	left	 : '0'		,
	width	 : 'auto'	,
	height	 : 'auto'	,
	opacity	 : '0.9'	,
	border	 : '1px dashed Silver'
  }

for(var SN in t)
	x.style[SN]=t[SN]+" !important"


for(var iX=0,temp,curr=b,X;iX<y.length;iX++){
	if(!y[iX])continue
	X=y[iX]+"/";
	curr+=X;temp=d[s]("A")
	temp.textContent=X
	temp.href=curr
	x.appendChild(temp)
}


	

(function(){
	if(d.body){
		d.body.appendChild(x);
		d.getElementsByTagName("HEAD")[0].appendChild(d[s]("style")).text="DIV#AddBBcb>A:hover{font-weight:bold}"
	}else
		setTimeout(arguments.callee,100); 
})()

})()
