зеркало из https://github.com/mozilla/gecko-dev.git
-- CHATZILLA CHANGES ONLY --
* index.html Updated sll.js changes, added link to the m.o chatzilla page. * test3-handlers.js, test3-static.js Added input-history stuff.
This commit is contained in:
Родитель
06d6ba655f
Коммит
ae6347dc49
|
@ -35,7 +35,10 @@
|
||||||
</script>
|
</script>
|
||||||
Welcome to the Mozilla IRC client tests page. If you are generally
|
Welcome to the Mozilla IRC client tests page. If you are generally
|
||||||
impatient, you can jump right to
|
impatient, you can jump right to
|
||||||
<a href="#samples">the sample clients</a>, if not, read on.
|
<a href="#samples">the sample clients</a>, if not, read on. For even more
|
||||||
|
information, see the
|
||||||
|
<a href="http://www.mozilla.org/projects/rt-messaging/chatzilla/">
|
||||||
|
Chatzilla homepage</a>.
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
<table border="1" bgcolor="lightgrey">
|
<table border="1" bgcolor="lightgrey">
|
||||||
|
@ -92,18 +95,20 @@
|
||||||
Currently, the security code which prevents unsigned scripts from
|
Currently, the security code which prevents unsigned scripts from
|
||||||
doing Bad Things is incomplete. If the status boxes above are blank,
|
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,
|
this is most likely the cause. In order to work around this limitation,
|
||||||
you must edit your <b>all.js</b> file, changing line:
|
you must edit your <b>all.js</b> file, changing lines:
|
||||||
<pre>
|
<pre>
|
||||||
|
pref("security.checkdomprops", true);
|
||||||
pref("security.checkxpconnect", true);
|
pref("security.checkxpconnect", true);
|
||||||
</pre>
|
</pre>
|
||||||
To read:
|
To read:
|
||||||
<pre>
|
<pre>
|
||||||
|
pref("security.checkdomprops", false);
|
||||||
pref("security.checkxpconnect", false);
|
pref("security.checkxpconnect", false);
|
||||||
</pre>
|
</pre>
|
||||||
This will disable the security code so that the IRC client can create
|
This will disable the security code so that the IRC client can create
|
||||||
the XPCOM component it needs.
|
the XPCOM component it needs.
|
||||||
<p>
|
<p>
|
||||||
<a name="samples">
|
<a name="samples"></a>
|
||||||
<hr>
|
<hr>
|
||||||
<h2>Sample clients...</h2>
|
<h2>Sample clients...</h2>
|
||||||
<br>
|
<br>
|
||||||
|
@ -149,7 +154,7 @@ pref("security.checkxpconnect", false);
|
||||||
<address><a href="mailto:rginda@ndcico.com"></a></address>
|
<address><a href="mailto:rginda@ndcico.com"></a></address>
|
||||||
<!-- Created: Wed Sep 15 23:34:25 XXX 1999 -->
|
<!-- Created: Wed Sep 15 23:34:25 XXX 1999 -->
|
||||||
<!-- hhmts start -->
|
<!-- hhmts start -->
|
||||||
Last modified: Thu Oct 28 20:07:26 PDT 1999
|
Last modified: Tue Dec 7 03:32:00 XXX 1999
|
||||||
<!-- hhmts end -->
|
<!-- hhmts end -->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -95,10 +95,26 @@ function onInputKeyUp (e)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 38: /* up */
|
case 38: /* up */
|
||||||
|
if (client.lastHistoryReferenced < client.inputHistory.length - 1)
|
||||||
|
e.target.value =
|
||||||
|
client.inputHistory[++client.lastHistoryReferenced];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 40: /* down */
|
case 40: /* down */
|
||||||
|
if (client.lastHistoryReferenced > 0)
|
||||||
|
e.target.value =
|
||||||
|
client.inputHistory[--client.lastHistoryReferenced];
|
||||||
|
else
|
||||||
|
{
|
||||||
|
client.lastHistoryReferenced = -1;
|
||||||
|
e.target.value = client.incompleteLine;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
client.incompleteLine = e.target.value;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,6 +154,15 @@ function onInputCompleteLine(e)
|
||||||
if (e.target.getAttribute ("expanded") != "YES")
|
if (e.target.getAttribute ("expanded") != "YES")
|
||||||
{
|
{
|
||||||
e.line = e.line.replace (/\n/g, "");
|
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)
|
if (e.line[0] == client.COMMAND_CHAR)
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,6 +32,7 @@ client.UPDATE_DELAY = 500;
|
||||||
client.EXPAND_HEIGHT = "200px";
|
client.EXPAND_HEIGHT = "200px";
|
||||||
client.COLLAPSE_HEIGHT = "25px";
|
client.COLLAPSE_HEIGHT = "25px";
|
||||||
client.MAX_MESSAGES = 200;
|
client.MAX_MESSAGES = 200;
|
||||||
|
client.MAX_HISTORY = 2; //50;
|
||||||
client.TYPE = "IRCClient";
|
client.TYPE = "IRCClient";
|
||||||
client.OP1_IMG = "g_green_on.gif"; /* user is op image */
|
client.OP1_IMG = "g_green_on.gif"; /* user is op image */
|
||||||
client.OP0_IMG = "g_green.gif"; /* user isnt 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.name = "*client*";
|
||||||
client.viewsArray = new Array();
|
client.viewsArray = new Array();
|
||||||
client.lastListType = "chan-users";
|
client.lastListType = "chan-users";
|
||||||
|
client.inputHistory = new Array();
|
||||||
|
client.lastHistoryReferenced = -1;
|
||||||
|
client.incompleteLine = "";
|
||||||
|
|
||||||
CIRCNetwork.prototype.INITIAL_NICK = "IRCMonkey";
|
CIRCNetwork.prototype.INITIAL_NICK = "IRCMonkey";
|
||||||
CIRCNetwork.prototype.INITIAL_NAME = "chatzilla";
|
CIRCNetwork.prototype.INITIAL_NAME = "chatzilla";
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@import url(chrome://global/skin/);
|
||||||
|
|
||||||
window {
|
window {
|
||||||
|
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
@ -130,11 +132,14 @@ toolbar {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* input textbox */
|
/* input textbox */
|
||||||
|
/*
|
||||||
.input-window {
|
.input-window {
|
||||||
|
|
||||||
|
overflow: clip;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
.output-container {
|
.output-container {
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче