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

📄 client.js

📁 SQLiteDBMS是SQLite数据库的管理服务器软件
💻 JS
字号:
var _init=false;var _inspector={};var _libVersion=0.0;var _tmp=null;function clientInit() {	_inspector['inspector']=oFindChild(document, 'TABLE', 'inspector');	if (!_inspector['inspector']) {		alert('Error. inspector division not found.');		return;	}	if (_isIE) {		addEvent(document, 'selectstart', clientSelect);		addEvent(_inspector['inspector'], 'selectstart', _eventBubble);	}	_inspector['button']=oFindChild(_inspector['inspector'], 'TD', 'button');	_inspector['content']=oFindChild(_inspector['inspector'], 'TD', 'content');		_inspector['title_table']=oFindChild(_inspector['inspector'], 'A', 'title_table');		_inspector['title_view']=oFindChild(_inspector['inspector'], 'A', 'title_view');		_inspector['title_index']=oFindChild(_inspector['inspector'], 'A', 'title_index');		_inspector['title_trigger']=oFindChild(_inspector['inspector'], 'A', 'title_trigger');		_inspector['table']=oFindChild(_inspector['inspector'], 'DIV', 'table');		_inspector['view']=oFindChild(_inspector['inspector'], 'DIV', 'view');		_inspector['index']=oFindChild(_inspector['inspector'], 'DIV', 'index');		_inspector['trigger']=oFindChild(_inspector['inspector'], 'DIV', 'trigger');	_inspector['ddl']=oFindChild(_inspector['inspector'], 'DIV', 'ddl');	_inspector['inspectorHider']=oFindChild(document, 'A', 'hider');	_inspector['canvas']=oFindChild(document, 'DIV', 'canvas');	/*	addEvent(document, 'mousemove', eventListener);	addEvent(document, 'mousedown', eventListener);	addEvent(document, 'mouseup', eventListener);	addEvent(document, 'scroll', eventListener);	*/	addEvent(window, 'resize', clientResize);	addEvent(document, 'click', divHide);	addEvent(document, 'keyup', clientCopyHook);	addEvent(_inspector['inspectorHider'], 'click', inspectorToggle);	_init=true;	authInit();	boxInit();	boxGridInit();	clientResize();}function clientResize() {	if (_init) {		_inspector['inspectorHider'].style.top=document.body.clientHeight-_inspector['inspectorHider'].offsetHeight;		_inspector['content'].style.height=Math.max(1, document.body.clientHeight-_inspector['button'].offsetHeight-_inspector['ddl'].parentNode.offsetHeight-(30+(_isIE?0:12)));	}}function clientVersionCheck(dbRes) {	if (dbRes && dbRes.message)		_libVersion=parseFloat(dbRes.message[0].replace(/^3\./, ''));}function clientLoginFinish(dbRes) {	_inspector['content'].style.display='block';	_inspector['ddl'].style.display='block';	_inspector['inspector'].style.display='none';	inspectorToggle();	inspectorDdlClear();	inspectorTableListDraw(dbRes);	lHide();	if (_libVersion <= 0)		dbExecCommand('show version', clientVersionCheck);	dbExecCommand('show index', inspectorIndexListDraw);	dbExecCommand('show trigger', inspectorTriggerListDraw);}function clientSelect(e) {	if (!e) return false;	var eventSrc=(_isIE)?e.srcElement:e.target;	if (eventSrc.tagName == 'INPUT' || eventSrc.tagName == 'TEXTAREA') return true;	return false;}function clientCopyHook(e) {	if (!e) return true;	if (e.ctrlKey && e.keyCode == 67) {		var eventSrc=(_isIE)?e.srcElement:e.target;		if (eventSrc.tagName == 'INPUT' || eventSrc.tagName == 'TEXTAREA') return true;		if (_isIE) {			var selection=document.selection.createRange();			if (selection.text)				return true;		}else{			var selection=window.getSelection();			if (selection.toString())				return true;		}		if (_boxFocus) {			var div=_boxFocus.tab[_boxFocus.selectedTab];			var table=oFindChildByTagName(div, 'TABLE');			if (!table || !table.grid) return true;			var data=[];			for (var i=0; i < table.rows.length; i++) {				var arr=[];				for (var p=0; p < table.rows[i].cells.length; p++) {					if (i == 0 || table.rows[i].className == 'select')						arr.push(innerText(table.rows[i].cells[p]));				}				if (arr.length > 0)					data.push(arr);			}			for (var i=0; i < data.length; i++)				data[i]=data[i].join('	');			copy_clip(data.join('\n'));			return false;		}	}	return true;}loadJs('auth.js');loadJs('inspector.js');loadJs('box.js');loadJs('db.js');loadJs('syntax.js');

⌨️ 快捷键说明

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