diff --git a/extensions/irc/xul/tests/index.html b/extensions/irc/xul/tests/index.html index 81eec169467c..31d9c4f978f2 100644 --- a/extensions/irc/xul/tests/index.html +++ b/extensions/irc/xul/tests/index.html @@ -35,7 +35,10 @@ Welcome to the Mozilla IRC client tests page. If you are generally impatient, you can jump right to - the sample clients, if not, read on. + the sample clients, if not, read on. For even more + information, see the + + Chatzilla homepage.
@@ -92,18 +95,20 @@ Currently, the security code which prevents unsigned scripts from doing Bad Things is incomplete. If the status boxes above are blank, this is most likely the cause. In order to work around this limitation, - you must edit your all.js file, changing line: + you must edit your all.js file, changing lines:
+pref("security.checkdomprops", true);
 pref("security.checkxpconnect", true);
       
To read:
+pref("security.checkdomprops", false);
 pref("security.checkxpconnect", false);
       
This will disable the security code so that the IRC client can create the XPCOM component it needs.

- +


Sample clients...


@@ -149,7 +154,7 @@ pref("security.checkxpconnect", false);
-Last modified: Thu Oct 28 20:07:26 PDT 1999 +Last modified: Tue Dec 7 03:32:00 XXX 1999 diff --git a/extensions/irc/xul/tests/test3-handlers.js b/extensions/irc/xul/tests/test3-handlers.js index 79c5e7318521..df4482aba319 100644 --- a/extensions/irc/xul/tests/test3-handlers.js +++ b/extensions/irc/xul/tests/test3-handlers.js @@ -95,10 +95,26 @@ function onInputKeyUp (e) break; case 38: /* up */ + if (client.lastHistoryReferenced < client.inputHistory.length - 1) + e.target.value = + client.inputHistory[++client.lastHistoryReferenced]; break; case 40: /* down */ + if (client.lastHistoryReferenced > 0) + e.target.value = + client.inputHistory[--client.lastHistoryReferenced]; + else + { + client.lastHistoryReferenced = -1; + e.target.value = client.incompleteLine; + } + break; + + default: + client.incompleteLine = e.target.value; + } @@ -138,6 +154,15 @@ function onInputCompleteLine(e) if (e.target.getAttribute ("expanded") != "YES") { e.line = e.line.replace (/\n/g, ""); + + if (client.inputHistory[0] != e.line) + client.inputHistory.unshift (e.line); + + if (client.inputHistory.length > client.MAX_HISTORY) + client.inputHistory.pop(); + + client.lastHistoryReferenced = -1; + client.incompleteLine = ""; if (e.line[0] == client.COMMAND_CHAR) { diff --git a/extensions/irc/xul/tests/test3-static.js b/extensions/irc/xul/tests/test3-static.js index 58104a32d969..7d3426691394 100644 --- a/extensions/irc/xul/tests/test3-static.js +++ b/extensions/irc/xul/tests/test3-static.js @@ -32,6 +32,7 @@ client.UPDATE_DELAY = 500; client.EXPAND_HEIGHT = "200px"; client.COLLAPSE_HEIGHT = "25px"; client.MAX_MESSAGES = 200; +client.MAX_HISTORY = 2; //50; client.TYPE = "IRCClient"; client.OP1_IMG = "g_green_on.gif"; /* user is op image */ client.OP0_IMG = "g_green.gif"; /* user isnt op image */ @@ -46,6 +47,9 @@ client.PRINT_DIRECTION = 1; /*1 => new messages at bottom, -1 => at top */ client.name = "*client*"; client.viewsArray = new Array(); client.lastListType = "chan-users"; +client.inputHistory = new Array(); +client.lastHistoryReferenced = -1; +client.incompleteLine = ""; CIRCNetwork.prototype.INITIAL_NICK = "IRCMonkey"; CIRCNetwork.prototype.INITIAL_NAME = "chatzilla"; diff --git a/extensions/irc/xul/tests/test3.css b/extensions/irc/xul/tests/test3.css index 4a9158ca8599..8c2f540242a6 100644 --- a/extensions/irc/xul/tests/test3.css +++ b/extensions/irc/xul/tests/test3.css @@ -26,6 +26,8 @@ * */ +@import url(chrome://global/skin/); + window { font-size: 12px; @@ -130,11 +132,14 @@ toolbar { } /* input textbox */ +/* .input-window { + overflow: clip; width: 100%; } +*/ .output-container {