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

📄 pz_chromeless_2.1.js

📁 本系统采用B/S架构
💻 JS
📖 第 1 页 / 共 3 页
字号:
// chromeless windows v2.1
// www.microbians.com / Gabriel Suchowolski power[z]one - powerz@microbians.com
//
// Distributed under the terms of the GNU Library General Public License
//
// - Chromeless trick by webFX. http://www.eae.net/webfx/
// - Chromeless mouse control to handled like a normal window by Gabriel Suchowolski power[z]one

function openchromeless(theURL, wname, W, H, posx, posy, windowTIT, windowREALtit ,
										windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel,
											bCenter, sFontFamily, sFontSize, sFontColor) {
	
	var windowCERRARa = "close_a.gif";
	var windowCERRARd = "close_d.gif";
	var windowCERRARo = "close_o.gif";
	var windowNONEgrf = "none.gif";
	var windowCLOCK = "clock.gif";
	var windowW = W;
	var windowH = H;
	var windowX = -1;
	var windowY = -1;
	
	if(bCenter){	
		windowX = Math.ceil( (window.screen.width  - windowW) / 2 );
		windowY = Math.ceil( (window.screen.height - windowH) / 2 );
	} else {
		windowX = posx;
		windowY = posy;
	}

	if (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion)>=4) isie=true
	else											     isie=false

	if (isie) { H=H+20+2; W=W+2; }

	s = ",width="+W+",height="+H;

	if (isie && (navigator.userAgent.toLowerCase().indexOf("win")!=-1) ) {

var dowin = theURL != "" ? true : false;

var chromeTIThtml = '\n' +
'<html>																							'+ '\n'+
'<head>                                                                                                                                                                         	'+ '\n'+
'<title>&nbsp;CHROMELESS WINDOWS / TITLEBAR</title>                                                                                                                      		'+ '\n'+
'<style type="text/css">                                                                                                                                                        	'+ '\n'+
'#mywindowTITLE 	{ position: absolute; left:   0px; top:   0px; width: 100%; height: 22px; z-index: 1; background-color: '+windowTITBGCOLOR+'; clip:rect(0,100%,22,0); }         '+ '\n'+
'#mywindow 		{ position: absolute; left:   0px; top:   0px; width: 100%; height: 22px; z-index: 2;                            	      clip:rect(0,100%;22,0); }         '+ '\n'+
'#mywindowCLOSE 	{ position: absolute; left: -22px; top: -22px; width: 11px; height: 11px; z-index: 3;                            	      clip:rect(0,11,11,0);   }         '+ '\n'+
'#mywindowCLOCK 	{ position: absolute; left: -22px; top: -22px; width: 11px; height: 11px; z-index: 3;                            	      clip:rect(0,11,11,0);   }         '+ '\n'+
'</style>                                                                                                                                                                       	'+ '\n'+
'<script language="javascript">																				'+ '\n'

if ( theURL != "" ) {

chromeTIThtml = chromeTIThtml + 
'	theURL 	    	    = "'+theURL			+'"                                                                                                                             '+ '\n'+
'	windowCERRARa 	    = "'+windowCERRARa		+'"                                                                                                                             '+ '\n'+
'	windowCERRARd 	    = "'+windowCERRARd		+'"                                                                                                                             '+ '\n'+
'	windowCERRARo 	    = "'+windowCERRARo		+'"                                                                                                                             '+ '\n'+
'	windowCLOCK         = "'+windowCLOCK            +'"                                                                                                                             '+ '\n'+
'	windowBORDERCOLOR   = "'+windowBORDERCOLOR	+'"                                                                                                                             '+ '\n'+
'	windowBORDERCOLORsel= "'+windowBORDERCOLORsel	+'"                                                                                                                             '+ '\n'+
'	windowTITBGCOLOR    = "'+windowTITBGCOLOR	+'"                                                                                                                             '+ '\n'+
'	windowTITBGCOLORsel = "'+windowTITBGCOLORsel	+'"                                                                                                                             '+ '\n'

} else {

chromeTIThtml = chromeTIThtml + 
'	theURL="about:blank"                                                                                                                                                            '+ '\n'+
'	windowCERRARa 		= "img/close_a.gif"                                                                                                                                     '+ '\n'+
'	windowCERRARd 		= "img/close_d.gif"                                                                                                                                     '+ '\n'+
'	windowCERRARo 		= "img/close_o.gif"                                                                                                                                     '+ '\n'+
'	windowCLOCK         	= "img/clock.gif"                                                                                                                             		'+ '\n'+
'	windowTIT 	    	= "<font face=verdana size=1>&nbsp;?window title</font>"                                                                                               '+ '\n'+
'	windowBORDERCOLOR   	= "#000000"                                                                                                                                             '+ '\n'+
'	windowBORDERCOLORsel	= "#FF8A00"                                                                                                                                             '+ '\n'+
'	windowTITBGCOLOR    	= "#d7dcd9"                                                                                                                                             '+ '\n'+
'	windowTITBGCOLORsel 	= "#ffffff"                                                                                                                                             '+ '\n'

}

chromeTIThtml = chromeTIThtml + 
'var windowCERRARImg_a = new Image(); windowCERRARImg_a.src = windowCERRARa;                                                                                                            '+ '\n'+
'var windowCERRARImg_d = new Image(); windowCERRARImg_d.src = windowCERRARd;                                                                                                            '+ '\n'+
'var windowCERRARImg_o = new Image(); windowCERRARImg_o.src = windowCERRARo;                                                                                                            '+ '\n'+
'var windowCLOCKImg    = new Image();    windowCLOCKImg.src = windowCLOCK;                                                                                                              '+ '\n'+
'                                                                                                                                                                                       '+ '\n'+
'function mouseSTATUS() {                                                                                                                                                               '+ '\n'+
'	this.x       = null;                                                                                                                                                            '+ '\n'+
'	this.y       = null;                                                                                                                                                            '+ '\n'+
'	this.bt      = "up";                                                                                                                                                            '+ '\n'+
'	this.oldx    = null;                                                                                                                                                            '+ '\n'+
'	this.oldy    = null;                                                                                                                                                            '+ '\n'+
'	this.dx      = null;                                                                                                                                                            '+ '\n'+
'	this.dy      = null;                                                                                                                                                            '+ '\n'+
'	this.screeny = null;                                                                                                                                                            '+ '\n'+
'	this.screenx = null;                                                                                                                                                            '+ '\n'+
'                                                                                                                                                                                       '+ '\n'+
'	this.element = null;                                                                                                                                                            '+ '\n'+
'	this.event   = null;                                                                                                                                                            '+ '\n'+
'}                                                                                                                                                                                      '+ '\n'+
'                                                                                                                                                                                       '+ '\n'+
'var mouse = new mouseSTATUS();                                                                                                                                                         '+ '\n'+

⌨️ 快捷键说明

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