⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 outbar.js

📁 采用工厂模式
💻 JS
📖 第 1 页 / 共 2 页
字号:
	if(this.sliding)
		return;		
	if(item.link.indexOf("javascript")!=-1) 
		eval(item.link);
	else if(item.targetFrame=="parent.main.content"){
		eval(item.targetFrame+".location='"+item.link+"'");
		parent.main.outborder.style.borderRight="1 solid buttonhighlight";
		parent.main.outborder.style.borderBottom="1 solid buttonhighlight";
		parent.main.outborder.style.borderLeft="1 solid buttonshadow";
		parent.main.outborder.style.borderTop="1 solid buttonshadow";
		parent.main.innerborder.style.borderRight="1 solid buttonshadow";
	}
	else {
		eval("parent.main.content.location='"+item.link+"'");
		parent.main.outborder.style.border="none";
		parent.main.innerborder.style.border="none";
	}
	parent.bar.itemnow.innerText=" "+item.now+" ";
	parent.bar.itemnow.title=item.title;
}

function itemover(item)
{
	if(this.sliding)
		return;		
	itemborder=eval("itemborder"+item);
	itemborder.style.border="1 solid highlight";
	eval("itembg"+item).style.background="highlight";
	eval("itembgmask"+item).filters.alpha.opacity=70;
}

function itemdown(item)
{
	if(this.sliding)
		return;		
	itemborder=eval("itemborder"+item);
	itemborder.style.border="1 solid highlight";
	eval("itembg"+item).style.background="highlight";
	eval("itembgmask"+item).filters.alpha.opacity=52;
}

function itemout(item)
{
	if(this.sliding)
		return;		
	itemborder=eval("itemborder"+item);
	itemborder.style.border="none";
	eval("itembg"+item).style.background="buttonface";
	eval("itembgmask"+item).filters.alpha.opacity=15;
}

function ArrowSelected(arrow)
{
	if(this.sliding)
		return;		
	this.SlideItems(arrow.id=="OB_SlideUp");
}

function OutFolder(folder)
{
	if(this.sliding)
		return;		
	folder.style.border="1 solid buttonface";
}

function OverFolder(folder)
{
	if(this.sliding)
		return;		
	folder.style.borderRight="1px solid buttonshadow";
	folder.style.borderLeft="1px solid buttonface";
	folder.style.borderBottom="1px solid buttonshadow";
	folder.style.borderTop="1px solid buttonface";
}

function FolderSelected(folder)
{
	if(this.sliding)
		return;		
    folder.style.borderTop="1px solid buttonshadow";
	folder.style.borderBottom="1px solid buttonface";
	folder.style.borderLeft="1px solid buttonshadow";
	folder.style.borderRight="1px solid buttonface";
}

function ClipFolder(folder,top,right,bottom,left)
{
	document.all["OB_Folder"+folder].style.clip=clip='rect('+top+' '+right+' '+bottom+' '+left+')';
}

function Start()
{
	if(!this.started)
	{
		this.ClipFolder(1,0,this.visibleAreaWidth,this.visibleAreaHeight,0);
		this.SetArrows();
	}		
}

function SetArrows()
{
	document.all["OB_SlideDown"].style.pixelTop=document.all["OB_Button"+this.currentFolder].style.pixelTop+document.all["OB_Button"+this.currentFolder].style.pixelHeight+4;
	document.all["OB_SlideDown"].style.pixelLeft=68;
	document.all["OB_SlideUp"].style.pixelTop=document.all["OB_Button"+this.currentFolder].style.pixelTop+document.all["OB_Button"+this.currentFolder].style.pixelHeight+this.visibleAreaHeight-26;
	document.all["OB_SlideUp"].style.pixelLeft=68;

	var folder=document.all["OB_Folder"+this.currentFolder].style;
	var startTop=document.all["OB_Button"+this.currentFolder].style.pixelTop+document.all["OB_Button"+this.currentFolder].style.pixelHeight;

	if(folder.pixelTop<startTop)
		document.all["OB_SlideDown"].style.visibility="visible";
	else		
		document.all["OB_SlideDown"].style.visibility="hidden";

	if(folder.pixelHeight-(startTop-folder.pixelTop)>this.visibleAreaHeight)
		document.all["OB_SlideUp"].style.visibility="visible";
	else		
		document.all["OB_SlideUp"].style.visibility="hidden";
}

function HideArrows()
{
	document.all["OB_SlideUp"].style.visibility="hidden";
	document.all["OB_SlideDown"].style.visibility="hidden";
}

function SlideItems(up)
{
	this.sliding=true;
	this.slideCount=Math.floor(this.slideArrowValue/this.ArrowSlideSpeed);
	up ? this.SlideItemsAction(-this.ArrowSlideSpeed) : this.SlideItemsAction(this.ArrowSlideSpeed);
}

function SlideItemsAction(value)
{
	document.all["OB_Folder"+this.currentFolder].style.pixelTop+=value;
    filter = /rect\((\d*)px (\d*)px (\d*)px (\d*)px\)/;
    var clipString=document.all["OB_Folder"+this.currentFolder].style.clip;
    var clip=clipString.match(filter);
    this.ClipFolder(this.currentFolder,(parseInt(clip[1])-value),parseInt(clip[2]),(parseInt(clip[3])-value),parseInt(clip[4]));
	this.slideCount--;
	if(this.slideCount>0)
		setTimeout("OutlookLikeBar.SlideItemsAction("+value+")",20);
	else
	{
		if(Math.abs(value)*this.ArrowSlideSpeed!=this.slideArrowValue)		
		{
			document.all["OB_Folder"+this.currentFolder].style.pixelTop+=(value/Math.abs(value)*(this.slideArrowValue%this.ArrowSlideSpeed));
		    filter = /rect\((\d*)px (\d*)px (\d*)px (\d*)px\)/;
			var clipString=document.all["OB_Folder"+this.currentFolder].style.clip;
			var clip=clipString.match(filter);
		    this.ClipFolder(this.currentFolder,(parseInt(clip[1])-(value/Math.abs(value)*(this.slideArrowValue%this.ArrowSlideSpeed))),parseInt(clip[2]),(parseInt(clip[3])-(value/Math.abs(value)*(this.slideArrowValue%this.ArrowSlideSpeed))),parseInt(clip[4]));
		}		    
		this.SetArrows();
		this.sliding=false;
	}		
}

function arrowdown() {  
		if(this.sliding)
		return;		

OB_SlideUp.style.borderTop="1px solid buttonshadow";
OB_SlideUp.style.borderLeft="1px solid buttonshadow";
OB_SlideUp.style.borderRight="1px solid white";
OB_SlideUp.style.borderBottom="1px solid white";

arrowinner.style.borderTop="1px solid threeddarkshadow";
arrowinner.style.borderLeft="1px solid threeddarkshadow";
arrowinner.style.borderRight="1px solid buttonface";
arrowinner.style.borderBottom="1px solid buttonface";

arrow.style.border="1px solid buttonface";
}

function arrowup() {  
		if(this.sliding)
		return;		

OB_SlideUp.style.borderTop="1px solid buttonface";
OB_SlideUp.style.borderLeft="1px solid buttonface";
OB_SlideUp.style.borderRight="1px solid threeddarkshadow";
OB_SlideUp.style.borderBottom="1px solid threeddarkshadow";

arrowinner.style.borderTop="1px solid white";
arrowinner.style.borderLeft="1px solid white";
arrowinner.style.borderRight="1px solid buttonshadow";
arrowinner.style.borderBottom="1px solid buttonshadow";

arrow.style.border="none";
}

function arrowdownd() {  
			if(this.sliding)
		return;		

OB_SlideDown.style.borderTop="1px solid buttonshadow";
OB_SlideDown.style.borderLeft="1px solid buttonshadow";
OB_SlideDown.style.borderRight="1px solid white";
OB_SlideDown.style.borderBottom="1px solid white";

arrowdinner.style.borderTop="1px solid threeddarkshadow";
arrowdinner.style.borderLeft="1px solid threeddarkshadow";
arrowdinner.style.borderRight="1px solid buttonface";
arrowdinner.style.borderBottom="1px solid buttonface";

arrowd.style.border="1px solid buttonface";
}

function arrowupd() {  
			if(this.sliding)
		return;		

OB_SlideDown.style.borderTop="1px solid buttonface";
OB_SlideDown.style.borderLeft="1px solid buttonface";
OB_SlideDown.style.borderRight="1px solid threeddarkshadow";
OB_SlideDown.style.borderBottom="1px solid threeddarkshadow";

arrowdinner.style.borderTop="1px solid white";
arrowdinner.style.borderLeft="1px solid white";
arrowdinner.style.borderRight="1px solid buttonshadow";
arrowdinner.style.borderBottom="1px solid buttonshadow";

arrowd.style.border="none";
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -