Bug 238050 - Update colours to match mIRC even more, and make reversing colours not assume anything about the defaults.

ChatZilla only.
r=samuel
p=gijskruitbosch+bugs@gmail.com (Gijs Kruitbosch)
This commit is contained in:
silver%warwickcompsoc.co.uk 2005-11-26 21:06:19 +00:00
Родитель c5d79e2a47
Коммит 2355001ea2
3 изменённых файлов: 61 добавлений и 68 удалений

Просмотреть файл

@ -216,131 +216,131 @@ a.chatzilla-link:hover {
/* mirc colors */
.chatzilla-fg00 {
color: #000000;
color: #FFFFFF;
}
.chatzilla-fg01 {
color: #c8c8c8;
color: #000000;
}
.chatzilla-fg02 {
color: #0000c8;
color: #00007F;
}
.chatzilla-fg03 {
color: #00c800;
color: #009300;
}
.chatzilla-fg04 {
color: #c80000;
color: #FF0000;
}
.chatzilla-fg05 {
color: #c8c800;
color: #7F0000;
}
.chatzilla-fg06 {
color: #c800c8;
color: #9C009C;
}
.chatzilla-fg07 {
color: #ffb000;
color: #FC7F00;
}
.chatzilla-fg08 {
color: #ffff00;
color: #FFFF00;
}
.chatzilla-fg09 {
color: #00ff00;
color: #00FC00;
}
.chatzilla-fg10 {
color: #00c8c8;
color: #009393;
}
.chatzilla-fg11 {
color: #00ffff;
color: #00FFFF;
}
.chatzilla-fg12 {
color: #0000ff;
color: #0000FC;
}
.chatzilla-fg13 {
color: #ff00ff;
color: #FF00FF;
}
.chatzilla-fg14 {
color: #808080;
color: #7F7F7F;
}
.chatzilla-fg15 {
color: #989898;
color: #D2D2D2;
}
.chatzilla-bg00 {
background: #000000;
background-color: #FFFFFF;
}
.chatzilla-bg01 {
background: #c8c8c8;
background-color: #000000;
}
.chatzilla-bg02 {
background: #0000c8;
background-color: #00007F;
}
.chatzilla-bg03 {
background: #00c800;
background-color: #009300;
}
.chatzilla-bg04 {
background: #c80000;
background-color: #FF0000;
}
.chatzilla-bg05 {
background: #c8c800;
background-color: #7F0000;
}
.chatzilla-bg06 {
background: #c800c8;
background-color: #9C009C;
}
.chatzilla-bg07 {
background: #ffb000;
background-color: #FC7F00;
}
.chatzilla-bg08 {
background: #ffff00;
background-color: #FFFF00;
}
.chatzilla-bg09 {
background: #00ff00;
background-color: #00FC00;
}
.chatzilla-bg10 {
background: #00c8c8;
background-color: #009393;
}
.chatzilla-bg11 {
background: #00ffff;
background-color: #00FFFF;
}
.chatzilla-bg12 {
background: #0000ff;
background-color: #0000FC;
}
.chatzilla-bg13 {
background: #ff00ff;
background-color: #FF00FF;
}
.chatzilla-bg14 {
background: #808080;
background-color: #7F7F7F;
}
.chatzilla-bg15 {
background: #989898;
background-color: #D2D2D2;
}
.chatzilla-control-char:before {

Просмотреть файл

@ -103,13 +103,13 @@
<box class="colorGrid chatzilla-bg01 chatzilla-fg00">
<label value="1"/>
</box>
<box class="colorGrid chatzilla-bg02 chatzilla-fg01">
<box class="colorGrid chatzilla-bg02 chatzilla-fg00">
<label value="2"/>
</box>
<box class="colorGrid chatzilla-bg03 chatzilla-fg01">
<box class="colorGrid chatzilla-bg03 chatzilla-fg00">
<label value="3"/>
</box>
<box class="colorGrid chatzilla-bg04 chatzilla-fg01">
<box class="colorGrid chatzilla-bg04 chatzilla-fg00">
<label value="4"/>
</box>
<box class="colorGrid chatzilla-bg05 chatzilla-fg00">
@ -123,16 +123,16 @@
</box>
</row>
<row>
<box class="colorGrid chatzilla-bg08 chatzilla-fg00">
<box class="colorGrid chatzilla-bg08 chatzilla-fg01">
<label value="8"/>
</box>
<box class="colorGrid chatzilla-bg09 chatzilla-fg00">
<box class="colorGrid chatzilla-bg09 chatzilla-fg01">
<label value="9"/>
</box>
<box class="colorGrid chatzilla-bg10 chatzilla-fg00">
<box class="colorGrid chatzilla-bg10 chatzilla-fg01">
<label value="10"/>
</box>
<box class="colorGrid chatzilla-bg11 chatzilla-fg00">
<box class="colorGrid chatzilla-bg11 chatzilla-fg01">
<label value="11"/>
</box>
<box class="colorGrid chatzilla-bg12 chatzilla-fg01">

Просмотреть файл

@ -1024,41 +1024,31 @@ function mircChangeColor (colorInfo, containerTag, data)
var ary = colorInfo.match (/.(\d{1,2}|)(,(\d{1,2})|)/);
var fgColor = ary[1];
if (fgColor > 16)
fgColor &= 16;
switch (fgColor.length)
// Do we have a BG color specified...?
if (!arrayHasElementAt(ary, 1) || !ary[1])
{
case 0:
delete data.currFgColor;
delete data.currBgColor;
return;
case 1:
data.currFgColor = "0" + fgColor;
break;
case 2:
data.currFgColor = fgColor;
break;
// Oops, no colors.
delete data.currFgColor;
delete data.currBgColor;
return;
}
if (fgColor == 1)
delete data.currFgColor;
if (arrayHasElementAt(ary, 3))
var fgColor = String(Number(ary[1]) % 16);
if (fgColor.length == 1)
data.currFgColor = "0" + fgColor;
else
data.currFgColor = fgColor;
// Do we have a BG color specified...?
if (arrayHasElementAt(ary, 3) && ary[3])
{
var bgColor = ary[3];
if (bgColor > 16)
bgColor &= 16;
var bgColor = String(Number(ary[3]) % 16);
if (bgColor.length == 1)
data.currBgColor = "0" + bgColor;
else
data.currBgColor = bgColor;
if (bgColor == 0)
delete data.currBgColor;
}
data.hasColorInfo = true;
@ -1122,13 +1112,16 @@ function mircReverseColor (text, containerTag, data)
return;
}
var tempColor = ("currFgColor" in data ? data.currFgColor : "01");
var tempColor = ("currFgColor" in data ? data.currFgColor : "");
if ("currBgColor" in data)
data.currFgColor = data.currBgColor;
else
data.currFgColor = "00";
data.currBgColor = tempColor;
delete data.currFgColor;
if (tempColor)
data.currBgColor = tempColor;
else
delete data.currBgColor;
data.hasColorInfo = true;
}