diff --git a/xul/content/commands.js b/xul/content/commands.js --- a/xul/content/commands.js +++ b/xul/content/commands.js @@ -1322,49 +1322,48 @@ function cmdNetwork(e) var network = client.networks[e.networkName]; dispatch("create-tab-for-view", { view: network }); dispatch("set-current-view", { view: network }); } function cmdNetworks(e) { - var span = document.createElementNS(XHTML_NS, "html:span"); - - span.appendChild(newInlineText(MSG_NETWORKS_HEADA)); + var wrapper = newInlineText(MSG_NETWORKS_HEADA); var netnames = keys(client.networks).sort(); var lastname = netnames[netnames.length - 1]; for (var n in netnames) { var net = client.networks[netnames[n]]; - var a = document.createElementNS(XHTML_NS, "html:a"); /* Test for an all-SSL network */ var isSecure = true; for (var s in client.networks[netnames[n]].serverList) { if (!client.networks[netnames[n]].serverList[s].isSecure) { isSecure = false; break; } } - a.setAttribute("class", "chatzilla-link"); - a.setAttribute("href", (isSecure ? "ircs://" : "irc://") + net.canonicalName); - var t = newInlineText(net.unicodeName); - a.appendChild(t); - span.appendChild(a); + + var linkData = { + "data": net.unicodeName, + "href": (isSecure ? "ircs://" : "irc://") + net.canonicalName + }; + wrapper.appendChild(newInlineText(linkData, "chatzilla-link", "a")); + if (netnames[n] != lastname) - span.appendChild(newInlineText (MSG_COMMASP)); - } - - span.appendChild(newInlineText(MSG_NETWORKS_HEADB)); - - display(span, MT_INFO); + wrapper.appendChild(document.createTextNode(MSG_COMMASP)); + } + + wrapper.appendChild(document.createTextNode(MSG_NETWORKS_HEADB)); + + display(wrapper, MT_INFO); } function cmdServer(e) { var ary = e.hostname.match(/^(.*):(\d+)$/); if (ary) { // Foolish user obviously hasn't read the instructions, but we're nice. diff --git a/xul/content/output-base.css b/xul/content/output-base.css --- a/xul/content/output-base.css +++ b/xul/content/output-base.css @@ -17,30 +17,30 @@ * description of the msg-type attribute below. * * You can modify these styles on your local system by placing your desired * styles in a file called chatzilla.css in your /chrome directory. * (the file won't be there already, you have to create it.) Add the line * * @import url(chatzilla.css); * - * to the to your userContent.css (also in your /chrome directory, and + * to your userContent.css (also in your /chrome directory, and * also not there unless you created it already.) End all CSS rules in your * new chatzilla.css with !important to override any styles declared here. * For example, on a Linux system, you would create a file called * /home//.mozilla//chrome/userContent.css (if it * doesn't already exist), and add the line @import url(chatzilla.css) to it. * Next, create /home//.mozilla//chrome/chatzilla.css, and * add the text: * * .msg { * font-size: 14pt !important; * } * - * body.chatzilla-body { + * .chatzilla-body { * background: green !important; * } * * Close your browser and restart. When you bring up ChatZilla, it should have * a 14pt font and a green background. * * To learn how to make more useful changes to the ChatZilla output style, read * on. @@ -118,25 +118,31 @@ * EVEN: It'll deep fat fry a whole buffalo in 30 seconds. * ODD: but I'm hungry *now*! * * + important is either the text "true", or it is not set at all. If * important is true, then the message triggered ChatZilla /stalk function. * This occurs when someone with a nickname matching a pattern in your * /stalk list speaks, when someone says a word that matches a pattern in * your /stalk list, or when someone says your nickname. - * - * */ +#splash-wrapper { + display: flex; + height: 100vh; + justify-content: center; + align-items: center; + overflow: hidden; +} + /****************************************************************************** * basic classes * ******************************************************************************/ -body.chatzilla-body { /* The topmost container in the ChatZilla */ +.chatzilla-body { /* The topmost container in the ChatZilla */ margin: 0px 0px 0px 0px; /* output window. */ background: #FFFFFF; color: #000000; } a:link { color: #0000EE; } diff --git a/xul/content/output-window.html b/xul/content/output-window.html --- a/xul/content/output-window.html +++ b/xul/content/output-window.html @@ -1,18 +1,16 @@ - - + - + - +
diff --git a/xul/content/output-window.js b/xul/content/output-window.js --- a/xul/content/output-window.js +++ b/xul/content/output-window.js @@ -114,24 +114,22 @@ function stock_initOutputWindow(newClien // changes are in the "log" as well, normally. // We're setting the attribute here instead of in the HTML to cope with // custom output windows and so we set it only on the Right header // for this view. header["container"].setAttribute("aria-live", "off"); header.update = headers[view.TYPE].update; } - var splash = document.getElementById("splash"); var name; if ("unicodeName" in view) name = view.unicodeName; else name = view.name; - splash.appendChild(document.createTextNode(name)); - onResize(); + updateSplash(name); setTimeout(initHeader, 500); initialized = true; } function onTopicNodesClick(e) { @@ -163,24 +161,16 @@ function onTopicKeypress(e) view.dispatch("focus-input"); break; default: client.mainWindow.onInputKeyPress(e); } } -function onResize() -{ - var halfHeight = Math.floor(window.innerHeight / 2); - var splash = document.getElementById("splash"); - splash.style.paddingTop = halfHeight + "px"; - splash.style.paddingBottom = halfHeight + "px"; -} - function startTopicEdit() { var me = view.getUser(view.parent.me.unicodeName); if (!me || (!view.mode.publicTopic && !me.isOp && !me.isHalfOp) || !hasAttribute("topicinput", "hidden")) { return; } @@ -585,8 +575,14 @@ function updateDCCFile() setText("file", view.filename); setText("progress", getMsg(MSG_DCCFILE_PROGRESS, [pcent, mainWindow.getSISize(view.position), mainWindow.getSISize(view.size), mainWindow.getSISpeed(view.speed)])); setAttribute("progressbar", "width", pcent + "%"); } + +function updateSplash(content) +{ + var splash = document.getElementById("splash"); + splash.appendChild(document.createTextNode(content)); +} \ No newline at end of file diff --git a/xul/content/static.js b/xul/content/static.js --- a/xul/content/static.js +++ b/xul/content/static.js @@ -4573,17 +4573,17 @@ function this_getFontCSS(format) fn = "font-family: " + this.prefs["font.family"] + ";"; else fn = "font-family: inherit;"; if (this.prefs["font.size"] != 0) fs = "font-size: " + this.prefs["font.size"] + "pt;"; else fs = "font-size: medium;"; - css = "body.chatzilla-body { " + fs + fn + " }"; + css = ".chatzilla-body { " + fs + fn + " }"; if (format == "data") return "data:text/css," + encodeURIComponent(css); return css; } client.display = client.displayHere = diff --git a/xul/skin/output-dark.css b/xul/skin/output-dark.css --- a/xul/skin/output-dark.css +++ b/xul/skin/output-dark.css @@ -5,17 +5,17 @@ /* * a dark background/light text version of the output window. * see output-base.css for details. */ @import url(chrome://chatzilla/content/output-base.css); -body.chatzilla-body { /* The topmost container in the ChatZilla */ +.chatzilla-body { /* The topmost container in the ChatZilla */ background: black; /* output window. */ color: lightgrey; } a.chatzilla-link { color: #fffdd6; } @@ -25,18 +25,16 @@ a.chatzilla-link:visited { .header-outer { background-color: black; } .header { color: lightslategrey; background-color: #333333; -/* opacity: 0.9; causes memory leak? */ - -moz-border-radius: 7px; border-radius: 7px; } .progress-fg { background-color: silver; } .value { diff --git a/xul/skin/output-light.css b/xul/skin/output-light.css --- a/xul/skin/output-light.css +++ b/xul/skin/output-light.css @@ -5,36 +5,34 @@ /* * a light background/dark text version of the output window. * see output-base.css for details. */ @import url(chrome://chatzilla/content/output-base.css); -body.chatzilla-body { /* The topmost container in the ChatZilla */ +.chatzilla-body { /* The topmost container in the ChatZilla */ background: white; /* output window. */ color: #222222; } a.chatzilla-link { font-weight: bold; color: #342ecc; } .header-outer { background-color: #d1d0ea; } .header { color: darkslategrey; background-color: #EEEEEE; -/* opacity: 0.9;*/ border: 1px #777499 solid; - -moz-border-radius: 7px; border-radius: 7px; } #splash { color: #DDDDDD; } #usr-descnodes, @@ -129,40 +127,35 @@ a.chatzilla-link { color: #555555; /* subtle brightness change when */ } /* the speaker changes. */ .msg[msg-type="JOIN"] .msg-data, .msg[msg-type="PART"] .msg-data { color: #0e9e0e; background-color: #c3f7c3; font-weight: bold; - -moz-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; - /*border: thin darkblue solid;*/ } .msg[msg-type="QUIT"] .msg-data { background: #fff196; color: #ff8d02; font-weight: bold; - -moz-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; } .msg[msg-type="HELLO"] .msg-data { background: #1342a5; color: white; - -moz-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; font-weight: bold; } .msg[msg-type="ERROR"] .msg-data, .msg[msg-type="DISCONNECT"] .msg-data { - -moz-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; background: #a8221e; color: white; } .msg[msg-type="USAGE"] .msg-data { color: black; } @@ -187,26 +180,24 @@ a.chatzilla-link { color: #2709ed; font-weight: bold; } .msg[msg-type="KICK"] .msg-data { color: #ff1a0a; background: #ffdbcc; font-weight: bold; - -moz-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; } /* important="true" means that the message has text from your /stalk list in * it, has your nickname in it, or was spoken by someone in your /stalk list. */ .msg[important="true"] .msg-user { background: #d4d8d4; - -moz-border-radius: 5px 0px 0px 5px; border-radius: 5px 0px 0px 5px; } .msg[important="true"] .msg-data { background: #eaefeb; }