📄 chat.js
字号:
drag = 0;
move = 0;
scale=0;
dragObj=null;
action=1;
window.document.onmousemove = mouseMove
window.document.onmousedown = mouseDown
window.document.onkeydown = keydown
window.document.onkeyup = keyup
window.document.onmouseup=mouseUp
window.document.body.onscroll = screenScroll
function keydown(){
}
function keyup(){
}
function mouseUp() {
move = 0;
drag = 0;
action=0;
scale=0;
}
function mouseDown() {
if (drag) {
clickleft = window.event.x - parseInt(dragObj.style.left)
clicktop = window.event.y - parseInt(dragObj.style.top)
eventX=window.event.x
objLeft=parseInt(dragObj.style.left)
eventY=window.event.y
objTop=parseInt(dragObj.style.top)
move = 1
}
}
function mouseStop() {
window.event.returnValue = false
}
function screenScroll(){
toolbar.style.top=parseInt(toolbar.tmptop)+document.body.scrollTop
}
function mouseMove() {
if (move) {
if( window.event.x>0 & window.event.y>0) {
if (window.event.x<window.screen.width & window.event.y<window.screen.height ){
dragObj.style.left = window.event.x - eventX + objLeft
dragObj.style.top = window.event.y - eventY + objTop
}
}
}
if(scale){
if( window.event.x>0 & window.event.y>0) {
if (window.event.x<window.screen.width & window.event.y<window.screen.height ){
dragObj.style.height = window.event.y - parseInt(dragObj.style.top)-50;
}
}
}
}
function chatmin(){
imgsrc=document.getElementById("chat_min").src;
imgsrcs=imgsrc.split("/");
imgsrc=imgsrcs[imgsrcs.length-2]+"/"+imgsrcs[imgsrcs.length-1]
if(imgsrc=="chat/-.jpg")
{
document.getElementById("chatcontent").style.display="none";
document.getElementById("chatset").style.display="none";
document.getElementById("chatbottom").style.display="none";
document.getElementById("toolbar").style.height="10";
document.getElementById("chat_min").src="chat/+.jpg";
}else{
document.getElementById("chatcontent").style.display="";
document.getElementById("chatset").style.display="";
document.getElementById("chatbottom").style.display="";
document.getElementById("toolbar").style.height="350";
document.getElementById("chat_min").src="chat/-.jpg";
}
}
function hiddenChat(){
document.getElementById("toolbar").style.display="none";
window.open("chat/closechat.asp","","top=1000,left=1000,width=10,height=10")
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -