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

📄 move.js

📁 空间音乐查询工具1.9 1122 本工具采集php抓取QQ空间音乐。 换播放器可直接去qq空间音乐播放器 系统要求 PHP+ZEND3.3以后 cache 目录可写 cfg_
💻 JS
字号:
var g_OO = null; // g_OperatingObject
var g_oldX, g_oldY;
var g_OT= 0; // g_OT
var g_Direction = null;
var g_CtrlPressed= false;
function LayerOnMouseOver() {

	if (g_OT!=0) return;
	g_OO= musicPlayer;
	if(g_OO.resiziable==true) {
		g_Direction= getDirection(musicPlayer);
		if (g_Direction != "") {
			g_OO.style.cursor= g_Direction + "-resize";
		}
	}
	g_OO.style.cursor="default";
	document.onmousemove= LayerOnMouseMove;
	
	top.g_type=musicPlayer.type;
	top.g_itemno=musicPlayer.itemno;
	
}

function LayerEndOperate() {
	if (g_OT == 0) return false;
	g_OT= 0;
	document.onmousemove= null;
	if(g_OO.id != "dset")	g_OO.style.zIndex = 0;
	g_OO.style.cursor= "default";
	document.onmouseup= null;
	g_Direction= null;
	document.body.onselectstart = null;
	//window.status="x="+g_OO.style.pixelLeft+";y="+g_OO.style.pixelTop;
	return false;
}

function LayerOnMouseMove () {
	g_Direction= getDirection(g_OO);
	if (g_Direction != "") {
		g_OO.style.cursor= g_Direction + "-resize";
	}
	else {
		g_OO.style.cursor="default";
	}
}

function LayerOnMouseOut () 
{

	if (g_OT!=0) return;
	//document.oncontextmenu = function() {return false;}

	if(g_OO)
		g_OO.onmousemove = null;
	
	g_OO= null;
	document.onmousemove= null;
	//document.oncontextmenu = function() {return false;}
	
}

function getDirection (el) {
	var dir = "";
	var xPos = event.offsetX; 
	var yPos = event.offsetY;
	
	//var offset = 4 * (parseInt(el.style.padding,10) + parseInt(el.style.borderWidth,10));
	//if(offset < 3)
	var offset = 4;
	
	if (yPos <= offset)
	{
		dir = "n"; 
	}
	else if(yPos >= el.offsetHeight - offset)
	{
		dir = "s";
	};
	
	if (xPos <= offset) 
	{
		dir += "w"; 
	}
	else if (xPos >= el.offsetWidth - offset)
	{ 
		dir += "e"; 
	};

	return dir;
}
function LayerStartOperate()
{	
	if(event.button==1) {
		if (g_OO == null ) return;
		if(g_OO.id != "dset")	g_OO.style.zIndex=100; // 把当前操作的层提到最上层
		/// 判断操作类型
		g_Direction= getDirection(g_OO);
		if (g_Direction != "") {
			g_OT= 2;
			if(g_OO.resiziable==true)
			{
				document.onmousemove= LayerResize;
			}
		}
		else {
			g_OT= 1;
			document.onmousemove= LayerMoving;
			g_OO.style.cursor="move";
		}
		//-

		g_oldX= event.x;
		g_oldY= event.y;
		
		document.onmouseup= LayerEndOperate;
		
		// 禁止文字选择
		document.body.onselectstart = new Function("return false");
		return false;
	}
	else if (event.button==2&&top.g_type==2||event.button==2&&top.g_type==3||event.button==2&&top.g_type==12) {
		top.document.oncontextmenu = showmenuie5;
		top.document.onclick = hidemenuie5;
	}else {
		return false;
	}
}

function LayerMoving()
{
	if (g_OT != 1) return;
	g_OO.style.pixelLeft = g_OO.style.pixelLeft + (event.x- g_oldX);
	g_OO.style.pixelTop = g_OO.style.pixelTop + (event.y- g_oldY);
	g_oldX= event.x;
	g_oldY= event.y;
	top.g_EditFlag= 1;
}

⌨️ 快捷键说明

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