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

📄 rte_debug.js

📁 极限网络智能办公系统—MYOA26—100%—源程序。
💻 JS
字号:
// DBG(): Get the debug window handle in a safe manaer.
function DBGGetWindow(el) {
	if (el) {
		// Debug window closed?
		try { el.className; } catch(e) {
			if (e.number == -2147418094) {
				return null;
			}
		}
	}
	return el;
}

// DBG(): Debug routine activated by the debugWindow property
function DBG(n, str)
{
	// Initialise debug functionality, first time in or if DBG() is called
	// with no arguments (as called from put_debugWindow).
	if (typeof(n) == "undefined" || !DBG.fInitialised) {
		var el = DBGGetWindow(public_description.debugWindow);
		if (el) {
			el.className = "debugWindow";
			el.innerHTML = '<table width="100%" id="debug">'
							+ '<tr><th>Seq</th><th>Caller</th><th>Debug</th></tr>'
							+ '</table>';
			DBG.idTable = el.all("debug");
		}
		DBG.fInitialised = true;
		DBG.seq = 0;
	}

	// If debug window supplied, then output debug message, assuming one was
	// supplied.
	if (typeof(str) != "undefined") {
		var el = DBGGetWindow(DBG.idTable);
		if (el) {
			var row = el.insertRow(1);
			var caller = DBG.caller.toString().substr(9);
			var cell = row.insertCell();
			cell.innerText = DBG.seq++;
			cell.nowrap = '';
			cell = row.insertCell();
			cell.innerText = caller.substr(0, caller.indexOf('\n'));
			cell.nowrap = '';
			row.insertCell().innerText = str;
		} else {
			// If no debug window, but RichEdit.debug is true, then output
			// debugs to status bar.
			if (RichEditor.debug) {
				window.status = str;
			}
		}
	}
}

⌨️ 快捷键说明

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