Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* All source code is (c) Mibbit.com. Unauthorized use/reverse engineering/copying is prohibited. */
- function q() {
- return function() {}
- }
- VERSION = 4136;
- var t, ba;
- (function() {
- function b(j) {
- return j < 10 ? "0" + j : j
- }
- function c(j) {
- f.lastIndex = 0;
- return f.test(j) ? '"' + j.replace(f, function(n) {
- var o = k[n];
- return typeof o === "string" ? o : "\\u" + ("0000" + n.charCodeAt(0).toString(16)).slice(-4)
- }) + '"' : '"' + j + '"'
- }
- function d(j, n) {
- var o, s, w = g,
- p, r = n[j];
- if (r && typeof r === "object" && typeof r.toJSON === "function") r = r.toJSON(j);
- if (typeof l === "function") r = l.call(n, j, r);
- switch (typeof r) {
- case "string":
- return c(r);
- case "number":
- return isFinite(r) ? String(r) : "null";
- case "boolean":
- case "null":
- return String(r);
- case "object":
- if (!r) return "null";
- g += h;
- p = [];
- if (Object.prototype.toString.apply(r) === "[object Array]") {
- s = r.length;
- for (j = 0; j < s; j += 1) p[j] = d(j, r) || "null";
- n = p.length === 0 ? "[]" : g ? "[\n" + g + p.join(",\n" + g) + "\n" + w + "]" : "[" + p.join(",") + "]";
- g = w;
- return n
- }
- if (l && typeof l === "object") {
- s = l.length;
- for (j = 0; j < s; j += 1) {
- o = l[j];
- if (typeof o === "string")
- if (n = d(o, r)) p.push(c(o) + (g ? ": " : ":") + n)
- }
- } else
- for (o in r)
- if (Object.hasOwnProperty.call(r, o))
- if (n = d(o, r)) p.push(c(o) + (g ? ": " : ":") + n);
- n = p.length === 0 ? "{}" : g ? "{\n" + g + p.join(",\n" + g) +
- "\n" + w + "}" : "{" + p.join(",") + "}";
- g = w;
- return n
- }
- }
- if (typeof Date.prototype.toJSON !== "function") {
- Date.prototype.toJSON = function() {
- return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + b(this.getUTCMonth() + 1) + "-" + b(this.getUTCDate()) + "T" + b(this.getUTCHours()) + ":" + b(this.getUTCMinutes()) + ":" + b(this.getUTCSeconds()) + "Z" : null
- };
- String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function() {
- return this.valueOf()
- }
- }
- var e = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
- f = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
- g, h, k = {
- "\u0008": "\\b",
- "\t": "\\t",
- "\n": "\\n",
- "\u000c": "\\f",
- "\r": "\\r",
- '"': '\\"',
- "\\": "\\\\"
- },
- l;
- if (typeof t !== "function") t = function(j, n, o) {
- var s;
- h = g = "";
- if (typeof o === "number")
- for (s = 0; s < o; s += 1) h += " ";
- else if (typeof o === "string") h = o;
- if ((l = n) && typeof n !== "function" && (typeof n !== "object" || typeof n.length !== "number")) throw new Error("JSON.stringify");
- return d("", {
- "": j
- })
- };
- if (typeof ba !==
- "function") ba = function(j, n) {
- function o(s, w) {
- var p, r, y = s[w];
- if (y && typeof y === "object")
- for (p in y)
- if (Object.hasOwnProperty.call(y, p)) {
- r = o(y, p);
- if (r !== undefined) y[p] = r;
- else delete y[p]
- }
- return n.call(s, w, y)
- }
- e.lastIndex = 0;
- if (e.test(j)) j = j.replace(e, function(s) {
- return "\\u" + ("0000" + s.charCodeAt(0).toString(16)).slice(-4)
- });
- if (/^[\],:{}\s]*$/.test(j.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g,
- ""))) {
- j = eval("(" + j + ")");
- return typeof n === "function" ? o({
- "": j
- }, "") : j
- }
- throw new SyntaxError("JSON.parse");
- }
- })();
- function ca(b) {
- this.p = b;
- this.document = b.ownerDocument;
- this.bc = null;
- this.ze = [];
- this.hc = document.createElement("div");
- u({
- display: "none",
- position: "absolute",
- top: "0%",
- left: "0%",
- width: "100%",
- height: "100%",
- backgroundColor: "black",
- zIndex: "1001"
- }, this.hc.style);
- u({
- MozOpacity: "0.6",
- opacity: ".66",
- filter: "alpha(opacity=66)"
- }, this.hc.style);
- this.p.appendChild(this.hc);
- this.Ja = document.createElement("div");
- u({
- display: "none",
- position: "absolute",
- top: "25%",
- left: "25%",
- width: "50%",
- height: "50%",
- padding: "8px",
- border: "14px solid #000",
- backgroundColor: "white"
- }, this.Ja.style);
- u({
- borderRadius: "12px",
- MozBorderRadius: "12px",
- WebKitBorderRadius: "12px"
- }, this.Ja.style);
- u({
- zIndex: "1002",
- overflow: "auto"
- }, this.Ja.style);
- this.p.appendChild(this.Ja)
- }
- ca.prototype.alert = function(b, c, d, e) {
- var f = document.createElement("div");
- u({
- border: "1px solid #ccc",
- background: "#eee",
- margin: "2px",
- padding: "4px",
- fontSize: "15px",
- textAlign: "center",
- color: "#000",
- fontWeight: "bold"
- }, f.style);
- f.appendChild(this.document.createTextNode(b));
- var g;
- if (c) {
- if (d) {
- f.appendChild(this.document.createElement("br"));
- var h = this.document.createElement("form");
- h.style.display = "inline";
- h.onsubmit = function(k) {
- return function() {
- try {
- c(g.value)
- } catch (l) {
- x && A("ErrorLog", "Issue " + l, C)
- }
- da(k);
- return false
- }
- }(this);
- f.appendChild(h);
- g = this.document.createElement("input");
- if (e) g.value = e;
- g.style.marginRight = "4px";
- g.style.marginLeft = "4px";
- u({
- type: "text",
- size: 32
- }, g);
- u({
- background: "#fff",
- padding: "2px",
- fontFamily: "Sans-Serif",
- fontSize: "13px",
- color: "#222",
- border: "1px solid #444",
- Vf: "4px",
- MozBorderRadius: "4px",
- WebkitBorderRadius: "4px"
- }, g.style);
- h.appendChild(g);
- e = this.document.createElement("div");
- u({
- cursor: "pointer",
- textDecoration: "underline"
- }, e.style);
- e.onclick = function(k) {
- return function() {
- try {
- c(g.value)
- } catch (l) {
- x &&
- A("ErrorLog", "Issue " + l, C)
- }
- da(k)
- }
- }(this);
- e.appendChild(this.document.createTextNode("OK"))
- } else {
- f.appendChild(this.document.createElement("br"));
- e = this.document.createElement("span");
- u({
- cursor: "pointer",
- textDecoration: "underline",
- fontSize: "19px",
- fontWeight: "bold",
- color: "#c00"
- }, e.style);
- e.onclick = function(k) {
- return function() {
- c(false);
- da(k)
- }
- }(this);
- e.appendChild(this.document.createTextNode("Cancel"));
- f.appendChild(e);
- f.appendChild(this.document.createTextNode(" | "));
- e = this.document.createElement("span");
- u({
- cursor: "pointer",
- textDecoration: "underline",
- fontSize: "19px",
- fontWeight: "bold",
- color: "#0c0"
- }, e.style);
- e.onclick = function(k) {
- return function() {
- c(true);
- da(k)
- }
- }(this);
- e.appendChild(this.document.createTextNode("Yes"))
- }
- f.appendChild(e)
- }
- b = {
- msg: b,
- cb: c
- };
- if (d) b.isprompt = true;
- b = {
- element: f,
- closecb: function() {
- c && c(false)
- },
- initcb: function() {
- if (g) try {
- g.focus()
- } catch (k) {}
- }
- };
- ea(this, b)
- };
- function ea(b, c) {
- b.bc == null ? b.Kd(c) : b.ze.push(c)
- }
- ca.prototype.Kd = function(b) {
- this.hc.style.display = "block";
- this.Ja.style.display = "block";
- var c = this.document.createElement("div");
- c.style.textAlign = "right";
- c.style.height = "16px";
- this.Ja.appendChild(c);
- var d = this.document.createElement("img");
- D(d, "https://s3.amazonaws.com/mibbit/gfx/close-win-red.png", 12, 12);
- d.onclick = function(e) {
- return function() {
- b.closecb && b.closecb();
- da(e)
- }
- }(this);
- d.style.margin = "2px";
- d.title = "Close window";
- c.appendChild(d);
- this.hc.onclick = d.onclick;
- this.bc = b.element;
- this.Ja.appendChild(this.bc);
- b.initcb && b.initcb()
- };
- function da(b) {
- if (b.bc != null) {
- b.hc.style.display = "none";
- for (b.Ja.style.display = "none"; b.Ja.firstChild;) b.Ja.removeChild(b.Ja.firstChild);
- b.bc = null;
- b.ze.length > 0 && b.Kd(b.ze.shift())
- }
- }
- function fa(b) {
- for (; b.bc != null;) da(b)
- }
- ca.prototype.Lc = function() {
- return this.bc != null
- };
- PermalinkInfo = {
- create: function(b, c, d) {
- function e(k, l) {
- var j = h.insertRow(-1),
- n = j.insertCell(-1);
- u({
- textAlign: "right",
- fontSize: "15px"
- }, n.style);
- j = j.insertCell(-1);
- n.appendChild(b.createTextNode(k));
- k = b.createElement("input");
- k.type = "text";
- k.zh = true;
- k.size = 32;
- k.value = l;
- u({
- border: "1px solid #888",
- padding: "2px",
- fontSize: "15px"
- }, k.style);
- j.appendChild(k)
- }
- var f = b.createElement("div");
- f.style.textAlign = "center";
- var g = b.createElement("h3");
- g.appendChild(b.createTextNode("Share a link to this channel with friends."));
- f.appendChild(g);
- g = b.createElement("h3");
- g.appendChild(b.createTextNode("Email, facebook, anywhere."));
- f.appendChild(g);
- g = b.createElement("form");
- g.style.textAlign = "center";
- f.appendChild(g);
- g.onsubmit = function() {
- return false
- };
- var h = b.createElement("table");
- h.style.margin = "auto";
- h.style.marginTop = "24px";
- h.style.fontSize = "15px";
- g.appendChild(h);
- g = "http://chat.mibbit.com/?channel=" + encodeURIComponent(d) + "&server=" + encodeURIComponent(c);
- e("Mibbit link:", g);
- if (d.substring(0, 1) == "#") d = d.substring(1, d.length);
- e("IRC:// link:", "irc://" + c + "/" + encodeURIComponent(d));
- return f
- }
- };
- var E = {};
- E.g = function(b) {
- if (!E[F.language] || !E[F.language][b]) return E.en[b];
- return E[F.language][b]
- };
- window.DisplayStrings = E;
- Adverts = {};
- Adverts.oe = 0;
- Adverts.nf = 0;
- Adverts.Ug = function(b, c) {
- if (Adverts.R) {
- Adverts.R.style.left = b + "px";
- Adverts.R.style.right = b + "px";
- Adverts.R.style.top = c + "px"
- }
- Adverts.oe = b;
- Adverts.nf = c
- };
- Adverts.Ee = function(b) {
- if (!G.ye) {
- !Adverts.R && b && Adverts.create();
- if (Adverts.R) u({
- position: "absolute",
- zIndex: "200",
- display: b ? "block" : "none"
- }, Adverts.R.style)
- }
- };
- Adverts.fe = function() {
- if (Adverts.R) {
- if (Adverts.Od) {
- window.clearInterval(Adverts.Od);
- Adverts.Od = null
- }
- document.body.removeChild(Adverts.R);
- Adverts.R = null
- }
- };
- Adverts.create = function() {
- if (!Adverts.sh) {
- if (document.body.clientWidth - F.cgmMargins * 2 < 728) {
- Adverts.height = 60;
- Adverts.width = 468
- } else {
- Adverts.height = 90;
- Adverts.width = 728
- }
- Adverts.R = document.createElement("div");
- Adverts.R.style.left = Adverts.oe + "px";
- Adverts.R.style.right = Adverts.oe + "px";
- Adverts.R.style.top = Adverts.nf + "px";
- Adverts.R.style.textAlign = "center";
- Adverts.R.style.overflow = "hidden";
- Adverts.R.style.width = Adverts.width;
- Adverts.R.style.height = Adverts.height;
- document.body.appendChild(Adverts.R);
- var b =
- document.createElement("iframe");
- Adverts.R.appendChild(b);
- u({
- border: "0",
- overflow: "hidden",
- margin: "0",
- width: Adverts.width + "px",
- height: Adverts.height + "px"
- }, b.style);
- b.setAttribute("framespacing", "0");
- b.setAttribute("frameborder", "no");
- b.setAttribute("scrolling", "no");
- if (Adverts.width == 728) {
- b.id = "a09d0787";
- b.name = "a09d0787";
- b.src = "http://a.mibbit.com/www/delivery/afr.php?refresh=180&zoneid=2&target=_blank&cb=" + Math.random();
- var c = document.createElement("a");
- c.href = "http://a.mibbit.com/www/delivery/ck.php?n=a9e8eb92&cb=" +
- Math.random();
- c.target = "_blank";
- var d = document.createElement("img");
- d.border = "0";
- d.src = "http://a.mibbit.com/www/delivery/avw.php?zoneid=2&n=a9e8eb92&cb=" + Math.random();
- b.appendChild(c);
- c.appendChild(d)
- } else if (Adverts.width == 468) {
- b.id = "ac1aff38";
- b.name = "ac1aff38";
- b.src = "http://a.mibbit.com/www/delivery/afr.php?refresh=180&zoneid=3&target=_blank&cb=" + Math.random();
- c = document.createElement("a");
- c.href = "http://a.mibbit.com/www/delivery/ck.php?n=a13e2b62&cb=" + Math.random();
- c.target = "_blank";
- d = document.createElement("img");
- d.border = "0";
- d.src = "http://a.mibbit.com/www/delivery/avw.php?zoneid=3&n=a13e2b62&cb=" + Math.random();
- b.appendChild(c);
- c.appendChild(d)
- }
- x && A("Adverts.create", "using an iframe", K)
- }
- };
- function ga(b, c, d, e) {
- this.B = b;
- this.d = b.ownerDocument;
- this.fd = c;
- this.a = d;
- u({
- background: this.a.ulistPaneBackground,
- border: "1px solid " + this.a.ulistPaneBorder,
- borderRadius: this.a.ulistPaneRounding + "px",
- MozBorderRadius: this.a.ulistPaneRounding + "px",
- WebkitBorderRadius: this.a.ulistPaneRounding + "px",
- padding: this.a.ulistPaneRounding + "px",
- userSelect: "none",
- MozUserSelect: "none",
- WebkitUserSelect: "none"
- }, this.B.style);
- this.xe = [];
- this.Ab = "icon";
- ia(this);
- this.clear();
- if (!e) this.Od = window.setInterval(function(f) {
- return function() {
- for (var g in f.c) f.c.hasOwnProperty(g) &&
- ja(f.c[g]) && la(f, g)
- }
- }(this), 1E4)
- }
- ga.prototype.fe = function() {
- window.clearInterval(this.Od)
- };
- function ia(b) {
- b.yc = [];
- for (var c = 0; c < b.a.userListGroups.length; c++) b.yc.push(new ma(b.B, b.a.userListGroups[c], b.a.userListSort, b.a))
- }
- ga.prototype.clear = function() {
- na(this);
- for (var b in this.c) this.c.hasOwnProperty(b) && oa(this, this.c[b]);
- this.c = {};
- delete this.V
- };
- function pa(b, c) {
- for (var d = 0; d < b.yc.length; d++)
- if (qa(c, b.yc[d].dg)) return b.yc[d];
- return false
- }
- ga.prototype.z = function() {
- na(this);
- for (var b in this.c)
- if (this.c.hasOwnProperty(b)) {
- this.c[b].z();
- oa(this, this.c[b])
- }
- for (; this.B.firstChild;) this.B.removeChild(this.B.firstChild);
- ia(this);
- for (b in this.c) this.c.hasOwnProperty(b) && ra(this, this.c[b]);
- u({
- background: this.a.ulistPaneBackground,
- border: "1px solid " + this.a.ulistPaneBorder,
- borderRadius: this.a.ulistPaneRounding + "px",
- MozBorderRadius: this.a.ulistPaneRounding + "px",
- WebkitBorderRadius: this.a.ulistPaneRounding + "px",
- padding: this.a.ulistPaneRounding +
- "px"
- }, this.B.style)
- };
- function sa(b, c, d) {
- b.xe.push({
- type: c,
- Ke: d
- })
- }
- ga.prototype.size = function() {
- for (var b = 0, c = 0; c < this.yc.length; c++) b += this.yc[c].Rc;
- return b
- };
- function oa(b, c) {
- b.V ? sa(b, "remove", c) : c.lf.nc(c)
- }
- function la(b, c) {
- if (b.V) sa(b, "refresh", c);
- else {
- oa(b, b.c[c]);
- ra(b, b.c[c])
- }
- }
- function ra(b, c) {
- if (b.V) sa(b, "add", c);
- else {
- c.lf = pa(b, c);
- c.lf.kd(c)
- }
- }
- ga.prototype.kd = function(b) {
- var c = {};
- c.click = function(d) {
- return function(e) {
- ta(d, e);
- return false
- }
- }(this);
- c.Bg = function(d) {
- return function(e) {
- if (!d.V || d.V != e) ua(e, true)
- }
- }(this);
- c.Ag = function(d) {
- return function(e) {
- if (!d.V || d.V != e) ua(e, false)
- }
- }(this);
- c.de = function(d) {
- return function() {
- if (d.Ab == "icon") d.Ab = "flag";
- else if (d.Ab == "flag") d.Ab = "time";
- else if (d.Ab == "time") d.Ab = "icon";
- var e = {};
- e[d.Ab] = true;
- for (var f in d.c) d.c.hasOwnProperty(f) && va(d.c[f], e)
- }
- }(this);
- b = new wa(b.id, b, this.d, this.a, c);
- c = {};
- c[this.Ab] =
- true;
- va(b, c);
- typeof this.c[b.yb] != "undefined" && this.nc(b.yb);
- ra(this, b);
- this.c[b.yb] = b
- };
- ga.prototype.nc = function(b) {
- if (typeof this.c[b] == "undefined") return false;
- this.V && this.V == this.c[b] && delete this.V;
- oa(this, this.c[b]);
- delete this.c[b];
- return true
- };
- function za(b, c, d) {
- if (typeof b.c[c] == "undefined") return false;
- b.c[c].setActive(d);
- la(b, c);
- return true
- }
- function Aa(b, c) {
- if (typeof b.c[c] == "undefined") return false;
- var d = b.c[c];
- d.Sa = true;
- d.Ha = Math.floor((new Date).getTime() / 1E3);
- if (d.a.userListBoldOnChat) d.Sb.style.fontWeight = "bold";
- Ba(d, d.description);
- la(b, c);
- return true
- }
- function Ca(b, c, d, e) {
- if (typeof b.c[c] == "undefined") return false;
- Da(b.c[c], d, e);
- la(b, c);
- return true
- }
- function Ea(b, c, d) {
- if (typeof b.c[c] == "undefined") return false;
- var e = b.c[c];
- e.h = d;
- e.Sb.firstChild.nodeValue = d;
- b.nc(c);
- e.yb = d;
- ra(b, e);
- b.c[e.yb] = e;
- return true
- }
- function Fa(b, c, d) {
- if (typeof b.c[c] == "undefined") return false;
- b.c[c].ac(d);
- return true
- }
- function ta(b, c) {
- if (b.V && b.V == c) {
- (new Date).getTime() - b.Ng < b.a.doubleClickTime && b.a.doubleClickToPM && b.fd(c.yb, "usermenu0");
- na(b);
- b.fd(c.yb, "closed")
- } else {
- b.Ng = (new Date).getTime();
- na(b);
- b.V = c;
- var d = b.d.createElement("div");
- c.B.onmouseout = function(h) {
- return function(k) {
- k || (k = event);
- for (k = k.relatedTarget || k.toElement; k != null && k != document.body;) {
- if (k == c.B) return;
- k = k.parentNode
- }
- h.Db && window.clearTimeout(h.Db);
- h.Db = window.setTimeout(function() {
- na(h)
- }, h.a.userListMenuAutoCloseTime)
- }
- }(b);
- c.B.onmouseover =
- function(h) {
- return function() {
- if (h.Db) {
- window.clearTimeout(h.Db);
- delete h.Db
- }
- }
- }(b);
- u({
- background: b.a.userListMenuBackground,
- borderBottom: "1px solid #444",
- padding: "2px"
- }, d.style);
- for (var e = b.fd(c.yb, "getoptions"), f = 0; f < e.length; f++) {
- var g = b.d.createElement("div");
- g.onclick = function(h, k) {
- return function() {
- h.fd && h.fd(c.yb, k);
- na(h)
- }
- }(b, e[f].id);
- g.appendChild(b.d.createTextNode(e[f].desc));
- u({
- cursor: "pointer",
- color: b.a.userListMenuColor,
- overflow: "hidden",
- whiteSpace: "nowrap",
- fontSize: b.a.userListMenuFontSize +
- "px",
- fontFamily: b.a.userListMenuFontFamily,
- textDecoration: "none",
- paddingLeft: "2px",
- paddingRight: "2px"
- }, g.style);
- if (f != e.length - 1) g.style.borderBottom = "1px solid #aaa";
- if (b.a.userListMenuBackgroundHover) {
- g.onmouseover = function(h, k) {
- return function() {
- h.style.background = k
- }
- }(g, b.a.userListMenuBackgroundHover);
- g.onmouseout = function(h, k) {
- return function() {
- h.style.background = k
- }
- }(g, b.a.userListMenuBackground)
- }
- d.appendChild(g)
- }
- c.B.appendChild(d);
- window.setTimeout(function(h, k) {
- return function() {
- var l = k.B.offsetTop +
- k.B.offsetHeight,
- j = h.clientHeight;
- if (k.B.offsetTop < h.scrollTop) h.scrollTop = k.B.offsetTop;
- if (l > h.scrollTop + j) h.scrollTop = l - j
- }
- }(b.B, c), 50);
- c.K.style.background = b.a.userListSelected
- }
- }
- function na(b) {
- if (b.V) {
- ua(b.V, false);
- b.V.B.removeChild(b.V.B.lastChild);
- b.V.B.onmouseover = null;
- b.V.B.onmouseout = null;
- if (b.Db) {
- window.clearTimeout(b.Db);
- delete b.Db
- }
- delete b.V
- }
- for (; b.xe.length > 0;) {
- var c = b.xe.shift();
- if (c.type == "add") ra(b, c.Ke);
- else if (c.type == "remove") oa(b, c.Ke);
- else c.type == "refresh" && la(b, c.Ke)
- }
- }
- function ma(b, c, d, e) {
- this.dg = c.def;
- this.title = c.title;
- this.og = c.hideOnEmpty;
- this.Yg = c.startHidden;
- this.a = e;
- this.Xg = d;
- this.Rc = 0;
- this.xb = [];
- this.vb = true;
- this.Y = b.ownerDocument.createElement("div");
- this.pd = b.ownerDocument.createElement("div");
- if (this.title != "") {
- this.Pd = b.ownerDocument.createElement("div");
- u({
- fontFamily: this.a.userGroupFontFamily,
- fontSize: this.a.userGroupFontSize + "px",
- color: this.a.userGroupColor,
- background: this.a.userGroupBackground,
- textAlign: "center",
- cursor: "pointer",
- userSelect: "none",
- MozUserSelect: "none",
- WebkitUserSelect: "none"
- }, this.Pd.style);
- this.Pd.onclick = function(f) {
- return function() {
- f.vb = !f.vb;
- f.Y.style.display = f.vb ? "block" : "none";
- Ga(f);
- return false
- }
- }(this);
- this.He = b.ownerDocument.createTextNode(this.title);
- this.Pd.appendChild(this.He);
- this.pd.appendChild(this.Pd)
- }
- this.pd.appendChild(this.Y);
- this.update();
- if (this.Yg) {
- this.vb = false;
- this.Y.style.display = "none"
- }
- b.appendChild(this.pd)
- }
- function Ga(b) {
- if (b.He) b.He.nodeValue = b.vb ? b.title : b.title + " (" + b.Rc + ")"
- }
- ma.prototype.update = function() {
- Ga(this);
- this.pd.style.display = this.Rc == 0 && this.og ? "none" : "block"
- };
- ma.prototype.nc = function(b) {
- this.Y.removeChild(b.B);
- for (var c = 0; c < this.xb.length; c++)
- if (this.xb[c] == b) {
- this.Rc--;
- this.xb.splice(c, 1);
- break
- }
- this.update()
- };
- ma.prototype.kd = function(b) {
- var c = Ha(this.xb, this.Xg, b, 0, this.xb.length);
- this.Rc++;
- if (c == this.xb.length) {
- this.Y.appendChild(b.B);
- this.xb.push(b)
- } else {
- this.Y.insertBefore(b.B, this.xb[c].B);
- this.xb.splice(c, 0, b)
- }
- this.update()
- };
- function wa(b, c, d, e, f) {
- this.a = e;
- this.ca = f;
- this.d = d;
- this.yb = b;
- this.h = c.nick;
- this.P = c.icon;
- this.description = c.desc;
- this.sd = c.ci;
- this.Ic = c.countrycode;
- if (typeof c.localtime != "undefined") this.te = parseInt(c.localtime) - (new Date).getTime();
- this.Ge = c.timezone;
- this.dc = {
- icon: true,
- country: false,
- time: false
- };
- this.wc = false;
- this.pa = c.modes.active;
- this.Ha = -1;
- if (c.idleTime != -1) this.Ha = Math.floor((new Date).getTime() / 1E3) - c.idleTime;
- Ia(this);
- this.sa = {
- owner: c.modes.owner,
- admin: c.modes.admin,
- op: c.modes.op,
- halfop: c.modes.halfop,
- voice: c.modes.voice
- };
- this.ma = {};
- this.B = this.d.createElement("div");
- this.K = this.d.createElement("div");
- this.B.appendChild(this.K);
- this.z()
- }
- function Ia(b) {
- b.Sa = b.Ha == -1 ? false : (new Date).getTime() / 1E3 - b.Ha < b.a.userListChattingTime
- }
- function va(b, c) {
- b.dc = c;
- if (b.ga) b.ga.style.display = b.dc.time ? "inline" : "none";
- if (b.Wa) b.Wa.style.display = b.dc.flag ? "inline" : "none";
- if (b.ja) b.ja.style.display = b.dc.icon ? "inline" : "none"
- }
- function ua(b, c) {
- b.K.style.background = c ? b.a.userListHover : "transparent"
- }
- wa.prototype.z = function() {
- for (; this.K.firstChild;) this.K.removeChild(this.K.firstChild);
- this.K.onmouseover = function(c) {
- return function() {
- c.ca.Bg(c)
- }
- }(this);
- this.K.onmouseout = function(c) {
- return function() {
- c.ca.Ag(c)
- }
- }(this);
- delete this.ga;
- delete this.Wa;
- delete this.ja;
- delete this.Xb;
- delete this.Ka;
- this.ga = this.d.createElement("img");
- u({
- marginRight: "2px",
- verticalAlign: this.a.userListIconAlign,
- display: this.dc.time ? "inline" : "none"
- }, this.ga.style);
- this.ga.onclick = function(c) {
- return function() {
- c.ca.de();
- return false
- }
- }(this);
- Ja(this);
- this.Wa = this.d.createElement("img");
- u({
- marginRight: "2px",
- verticalAlign: this.a.userListIconAlign,
- display: this.dc.flag ? "inline" : "none"
- }, this.Wa.style);
- this.Wa.onclick = function(c) {
- return function() {
- c.ca.de();
- return false
- }
- }(this);
- if (this.Ic) this.Wa.title = this.Ic;
- D(this.Wa, this.Ic ? "https://s3.amazonaws.com/mibbit/flags/" + this.Ic.toLowerCase() + ".png" : "https://s3.amazonaws.com/mibbit/gfx/mode_none.png", this.a.userListIconWidth, this.a.userListIconHeight);
- if (this.P && this.a.userListShowIcons) {
- this.ja =
- this.d.createElement("img");
- this.ja.style.marginRight = "2px";
- this.ja.style.display = this.dc.icon ? "inline" : "none";
- this.ja.onclick = function(c) {
- return function() {
- c.ca.de();
- return false
- }
- }(this);
- Ka(this, this.P)
- } else delete this.ja;
- this.K.onclick = function(c) {
- return function(d) {
- if (!d) d = window.event;
- d = d.target ? d.target : d.srcElement;
- if (!(d == c.ga || d == c.Wa || d == c.ja)) {
- c.ca.click(c);
- return false
- }
- }
- }(this);
- this.Sb = this.d.createElement("span");
- u({
- fontFamily: this.a.userListFontFamily,
- fontSize: this.a.userListFontSize +
- "px",
- cursor: "pointer",
- whiteSpace: "nowrap"
- }, this.Sb.style);
- this.Sb.appendChild(this.d.createTextNode(this.h));
- if (this.a.userListShowPrefixChars) {
- this.Xb = this.d.createElement("span");
- u({
- fontFamily: this.a.userListFontFamily,
- fontSize: this.a.userListFontSize + "px",
- color: this.a.userListColorNormal,
- fontWeight: "bold",
- cursor: "pointer"
- }, this.Xb.style)
- } else if (this.a.userListShowSingleMode) {
- this.Ka = this.d.createElement("img");
- this.Ka.style.verticalAlign = this.a.userListModeIconAlign;
- D(this.Ka, "https://s3.amazonaws.com/mibbit/gfx/mode_none.png",
- this.a.userListModeIconWidth, this.a.userListModeIconHeight)
- }
- this.ja && this.K.appendChild(this.ja);
- this.Wa && this.K.appendChild(this.Wa);
- this.ga && this.K.appendChild(this.ga);
- this.Xb && this.K.appendChild(this.Xb);
- if (this.Ka && this.a.userListShowModesLeft) {
- this.K.appendChild(this.Ka);
- this.Ka.style.paddingRight = this.a.userListModeSpacing + "px"
- }
- this.K.appendChild(this.Sb);
- if (this.Ka && !this.a.userListShowModesLeft) {
- this.K.appendChild(this.Ka);
- this.Ka.style.paddingLeft = this.a.userListModeSpacing + "px"
- }
- this.K.style.whiteSpace =
- "nowrap";
- this.K.style.padding = this.a.userListPadding + "px";
- Ba(this, this.description);
- this.ma = {};
- for (var b = 0; b < L.length; b++) Da(this, L[b], this.sa[L[b]]);
- this.B.style.overflow = "hidden";
- this.tb()
- };
- function La(b, c, d) {
- d = d.split(",");
- for (var e = 0; e < d.length; e++) {
- var f = d[e];
- if (f == "chatting") {
- if (b.Sa != c.Sa) return b.Sa && !c.Sa ? -1 : 1
- } else if (f == "active") {
- if (b.pa != c.pa) return b.pa && !c.pa ? -1 : 1
- } else if (f == "owner" || f == "admin" || f == "op" || f == "halfop" || f == "voice")
- if (b.sa[f] != c.sa[f]) return b.sa[f] && !c.sa[f] ? -1 : 1
- }
- if (b.h.toLowerCase() > c.h.toLowerCase()) return 1;
- if (b.h.toLowerCase() < c.h.toLowerCase()) return -1;
- return 0
- }
- function Ha(b, c, d, e, f) {
- var g = f - e;
- if (g == 0) return f;
- if (g == 1) {
- if (La(d, b[e], c) > 0) return f;
- return e
- }
- if (g == 2) return La(d, b[e], c) > 0 ? La(d, b[f - 1], c) > 0 ? f : f - 1 : e;
- g = Math.floor((e + f) / 2);
- var h = La(d, b[g], c);
- if (h < 0) return Ha(b, c, d, e, g);
- else if (h == 0) return g;
- else if (h > 0) return Ha(b, c, d, g, f)
- }
- function qa(b, c) {
- c = c.split(",");
- for (var d = 0; d < c.length; d++) {
- var e = c[d],
- f = true;
- if (e.substring(0, 1) == "!") {
- e = e.substring(1, e.length);
- f = false
- }
- if (e == "chatting") {
- if (b.Sa != f) return false
- } else if (e == "active") {
- if (b.pa != f) return false
- } else if (e == "owner" || e == "admin" || e == "op" || e == "halfop" || e == "voice")
- if (b.sa[e] != f) return false
- }
- return true
- }
- function ja(b) {
- Ja(b);
- var c = b.Sb.style,
- d = b.Sa;
- Ia(b);
- if (b.a.userListBoldOnChat) c.fontWeight = b.Sa ? "bold" : "normal";
- Ba(b, b.description);
- return d != b.Sa
- }
- function Ja(b) {
- function c(k) {
- return ("00" + k).substr(-2)
- }
- if (b.ga)
- if (typeof b.te == "undefined" || typeof b.Ge == "undefined") {
- b.ga.title = "";
- D(b.ga, "https://s3.amazonaws.com/mibbit/gfx/mode_none.png", 16, 16)
- } else {
- var d = new Date(b.te + (new Date).getTime()),
- e = d.getUTCHours() + ":" + c(d.getUTCMinutes()) + ":" + c(d.getUTCSeconds()),
- f = "+",
- g = b.Ge;
- if (g < 0) {
- f = "-";
- g = -g
- }
- var h = Math.floor(g / 60);
- g = g - 60 * h;
- b.ga.title = e + " UTC" + f + c(h) + c(g);
- d = d.getUTCHours();
- if (d > 22 || d < 8) D(b.ga, "https://s3.amazonaws.com/mibbit/gfx/night.png", b.a.userListIconWidth,
- b.a.userListIconHeight);
- else if (d >= 8 && d < 12) D(b.ga, "https://s3.amazonaws.com/mibbit/gfx/morning.png", b.a.userListIconWidth, b.a.userListIconHeight);
- else if (d >= 12 && d < 18) D(b.ga, "https://s3.amazonaws.com/mibbit/gfx/day.png", b.a.userListIconWidth, b.a.userListIconHeight);
- else d >= 18 && d <= 22 && D(b.ga, "https://s3.amazonaws.com/mibbit/gfx/evening.png", b.a.userListIconWidth, b.a.userListIconHeight)
- }
- }
- wa.prototype.tb = function() {
- var b = this.Sb.style;
- if (this.a.userListBoldOnChat) b.fontWeight = this.Sa ? "bold" : "normal";
- b.color = this.pa ? this.wc && this.a.userListColorTyping != "" ? this.a.userListColorTyping : this.a.ciUserListColorNormal && this.sd && this.sd.userListColorNormal ? this.sd.userListColorNormal : this.a.userListColorNormal : this.a.userListColorInactive
- };
- function Ka(b, c) {
- b.P = c;
- if (b.ja) {
- b.ja.style.verticalAlign = b.a.userListIconAlign;
- if (b.P.name) {
- c = b.a["ulicon_" + b.P.name];
- if (Ma && typeof DATA_URLS != "undefined" && DATA_URLS[c]) c = DATA_URLS[c];
- D(b.ja, c, b.a.userListIconWidth, b.a.userListIconHeight)
- } else D(b.ja, b.P.src, b.a.userListIconWidth, b.a.userListIconHeight);
- if (b.P.title) b.ja.title = b.P.title
- }
- }
- function Ba(b, c) {
- var d = b.description = c;
- if (b.Ha != -1) {
- d = Math.floor((new Date).getTime() / 1E3) - b.Ha;
- d = d < 60 ? "(" + d + "s) " + c : d < 3600 ? "(" + Math.floor(d / 60) + "m) " + c : "(" + Math.floor(d / 3600) + "h) " + c
- }
- b.K.setAttribute("title", d)
- }
- wa.prototype.ac = function(b) {
- this.wc = b;
- this.tb()
- };
- wa.prototype.setActive = function(b) {
- this.pa = b;
- this.tb()
- };
- function Da(b, c, d) {
- b.sa[c] = d;
- if (b.a.userListShowPrefixChars) {
- var e = "";
- if (b.a.userListShowSingleMode)
- for (f = 0; f < L.length; f++) {
- c = L[f];
- if (b.sa[c]) {
- d = Na(b, c, true);
- if (d.length > 0) e = d.substring(0, 1);
- break
- }
- } else
- for (var f = 0; f < L.length; f++) {
- c = L[f];
- if (b.sa[c]) {
- d = Na(b, c, true);
- if (d.length > 0) e += d.substring(0, 1)
- }
- }
- if (b.Xb.firstChild) b.Xb.firstChild.nodeValue = e;
- else b.Xb.appendChild(b.d.createTextNode(e))
- } else if (b.a.userListShowSingleMode) {
- d = "";
- e = "none";
- for (f = 0; f < L.length; f++) {
- c = L[f];
- if (b.sa[c]) {
- if (e == "none") e = c;
- if (d != "") d += ", ";
- d += Oa(b, c)
- }
- }
- f = Na(b, e);
- D(b.Ka, f, b.a.userListModeIconWidth, b.a.userListModeIconHeight);
- b.Ka.title = d
- } else {
- if (d && !b.ma[c]) {
- b.ma[c] = b.d.createElement("img");
- b.ma[c].style.verticalAlign = b.a.userListModeIconAlign;
- f = Na(b, c);
- D(b.ma[c], f, b.a.userListModeIconWidth, b.a.userListModeIconHeight);
- b.ma[c].title = Oa(b, c);
- b.ma[c].style.paddingLeft = b.a.userListModeSpacing + "px";
- e = null;
- var g = false;
- for (f = 0; f < L.length; f++) {
- if (g && b.ma[L[f]]) e = b.ma[L[f]];
- if (L[f] == c) g = true
- }
- e != null ? b.K.insertBefore(b.ma[c], e) :
- b.K.appendChild(b.ma[c])
- }
- if (!d && b.ma[c]) {
- b.K.removeChild(b.ma[c]);
- delete b.ma[c]
- }
- }
- }
- function Na(b, c) {
- var d = "https://s3.amazonaws.com/mibbit/gfx/mode_none.png";
- if (c == "owner") d = b.a.iconModeOwner;
- else if (c == "admin") d = b.a.iconModeAdmin;
- else if (c == "op") d = b.a.iconModeOp;
- else if (c == "halfop") d = b.a.iconModeHalfop;
- else if (c == "voice") d = b.a.iconModeVoice;
- return d
- }
- function Oa(b, c) {
- if (c == "owner") return E.g("ModeOwner");
- else if (c == "admin") return E.g("ModeAdmin");
- else if (c == "op") return E.g("ModeOp");
- else if (c == "halfop") return E.g("ModeHalfop");
- else if (c == "voice") return E.g("ModeVoice");
- return ""
- }
- var L = ["owner", "admin", "op", "halfop", "voice"];
- function Pa(b, c, d, e, f) {
- this.p = b;
- this.d = b.ownerDocument;
- this.a = c;
- this.ca = e;
- this.Ad = f;
- this.Aa = [];
- this.ib = this.zf = this.Dd = 10;
- this.h = "";
- this.p.style.border = "1px solid " + this.a.chatInputBarBorder;
- this.p.style.background = this.a.chatInputBarBackground;
- this.ha = this.d.createElement("div");
- u({
- padding: this.a.chatInputPadding + "px",
- margin: this.a.chatInputSpacing + "px",
- overflow: "hidden"
- }, this.ha.style);
- this.ea = this.d.createElement("input");
- this.ea.setAttribute("type", "text");
- u({
- width: "100%",
- padding: "0",
- border: "0",
- margin: "0",
- outline: "0"
- }, this.ea.style);
- this.ha.appendChild(d);
- d.appendChild(this.ea);
- this.ta = this.d.createElement("div");
- this.Hb = this.d.createElement("span");
- this.Hb.style.cursor = "pointer";
- this.Hb.onclick = function(g) {
- return function() {
- e.tf(g)
- }
- }(this);
- this.Hb.appendChild(this.d.createTextNode(""));
- this.ta.appendChild(this.Hb);
- u({
- height: 2 + this.ib + "px",
- top: this.a.chatInputSpacing + "px",
- left: this.a.chatInputSpacing + "px"
- }, this.ta.style);
- u({
- position: "absolute",
- textAlign: "right",
- paddingTop: this.a.chatInputPadding +
- "px",
- paddingBottom: this.a.chatInputPadding + "px"
- }, this.ta.style);
- u({
- fontFamily: this.a.chatInputFontFamily,
- fontSize: this.a.chatInputFontSize + "px",
- color: this.a.chatInputNickColor
- }, this.ta.style);
- this.ta.style.display = this.a.chatInputShowNick ? "block" : "none";
- this.La = this.d.createElement("div");
- this.La.appendChild(this.ha);
- this.La.appendChild(this.ta);
- b.appendChild(this.La);
- b.style.position = "relative";
- this.da = new Qa(d, this.ea, this.a.inputHistorySize, true, e.ig);
- this.da.xc = e.xc;
- this.v = {
- content: this.La,
- Gb: null
- };
- this.z();
- this.C()
- }
- Pa.prototype.uc = function(b) {
- for (this.h = b; this.Hb.firstChild;) this.Hb.removeChild(this.Hb.firstChild);
- this.Hb.appendChild(this.d.createTextNode(b + " :"));
- this.C()
- };
- Pa.prototype.z = function() {
- try {
- u({
- padding: this.a.chatInputPadding + "px",
- margin: this.a.chatInputSpacing + "px",
- background: this.a.chatInputBackground,
- border: "1px solid " + this.a.chatInputBorder
- }, this.ha.style);
- u({
- background: this.a.chatInputBackground,
- color: this.a.chatInputColor,
- fontFamily: this.a.chatInputFontFamily,
- fontSize: this.a.chatInputFontSize + "px"
- }, this.ea.style);
- u({
- borderRadius: this.a.chatInputRounding + "px",
- MozBorderRadius: this.a.chatInputRounding + "px",
- WebkitBorderRadius: this.a.chatInputRounding +
- "px",
- color: this.a.colorInText,
- background: this.a.chatInputBarBackground,
- border: "1px solid " + this.a.chatInputBarBorder
- }, this.p.style);
- u({
- position: "absolute",
- top: this.a.chatInputSpacing + "px",
- left: this.a.chatInputSpacing + "px"
- }, this.ta.style);
- u({
- textAlign: "right",
- paddingTop: this.a.chatInputPadding + "px",
- paddingBottom: this.a.chatInputPadding + "px"
- }, this.ta.style);
- u({
- fontFamily: this.a.chatInputFontFamily,
- fontSize: this.a.chatInputFontSize + "px",
- color: this.a.chatInputNickColor
- }, this.ta.style);
- this.ta.style.display =
- this.a.chatInputShowNick ? "block" : "none";
- Ra(this);
- if (this.wb) {
- this.p.removeChild(this.wb);
- delete this.wb
- }
- if (this.fb) {
- this.p.removeChild(this.fb);
- delete this.fb
- }
- if (this.rb) {
- this.p.removeChild(this.rb);
- delete this.rb
- }
- if (this.nb) {
- this.p.removeChild(this.nb);
- delete this.nb
- }
- if (this.pb) {
- this.p.removeChild(this.pb);
- delete this.pb;
- delete this.mb
- }
- delete this.sf;
- Sa(this)
- } catch (b) {
- x && A("RichInputElement.redraw(2)", t(b), C)
- }
- };
- Pa.prototype.C = function() {
- try {
- if (this.Ad) this.zf = this.mb.offsetHeight;
- if (this.v.content == this.La) {
- this.uf = this.ta.offsetWidth;
- if (window.getComputedStyle) {
- var b = window.getComputedStyle(this.ta, null).getPropertyValue("width");
- if (b.substring(b.length - 2, b.length) == "px") this.uf = parseFloat(b.substring(0, b.length - 2))
- }
- }
- b = false;
- if (this.v.content == this.La && this.ea.offsetHeight != 0 && this.ea.offsetHeight != this.Dd) {
- this.Dd = this.ea.offsetHeight;
- this.ib = this.ha.offsetHeight;
- if (window.getComputedStyle) {
- var c = window.getComputedStyle(this.ea,
- null).getPropertyValue("height");
- if (c.substring(c.length - 2, c.length) == "px") this.Dd = parseFloat(c.substring(0, c.length - 2));
- var d = window.getComputedStyle(this.ha, null).getPropertyValue("height");
- if (d.substring(d.length - 2, d.length) == "px") this.ib = parseFloat(d.substring(0, d.length - 2))
- }
- b = true
- }
- if (this.a.chatInputShowNick && this.h != "") this.ha.style.marginLeft = this.a.chatInputSpacing * 2 + this.uf + "px";
- this.ta.style.height = 2 + this.ib + "px";
- return b
- } catch (e) {
- x && A("RichInputElement.layout", "Exception: " + t(e), C)
- }
- return false
- };
- function Ta(b, c) {
- b.xf.nodeValue = c ? "TYPING" : ""
- }
- Pa.prototype.Va = function() {
- var b = this.Dd;
- b += this.a.chatInputPadding * 2;
- b += this.a.chatInputSpacing * 2;
- b += 2;
- if (this.Ad) {
- b += this.zf;
- b += this.a.chatInputSpacing;
- b += 2
- }
- return b
- };
- Pa.prototype.Ub = function(b) {
- window.setTimeout(function(c) {
- return function() {
- c.da.Ub(b)
- }
- }(this), 100)
- };
- function Ra(b) {
- if (b.v && b.v.content != b.La) {
- Ua(b, {
- content: b.La,
- Gb: null
- });
- b.ea.focus();
- window.setTimeout(function(c) {
- return function() {
- Va(c.da, c.Mg)
- }
- }(b), 10)
- }
- }
- function Wa(b) {
- var c = b.d.createTextNode(" | ");
- b.mb.appendChild(c)
- }
- function Xa(b, c) {
- b.v == b.Aa[c] ? Ra(b) : Ua(b, b.Aa[c]);
- b.Aa[c].Gb.blur()
- }
- function Ua(b, c) {
- if (c.content) {
- if (b.v) {
- b.v.content.style.display = "none";
- if (b.v.Gb != null) b.v.Gb.style.color = b.a.colorInMenu;
- b.v.mf && b.v.mf()
- }
- b.v = c;
- if (b.v.Gb != null) b.v.Gb.style.color = b.a.colorInMenuActive;
- b.v.content.style.display = "block";
- b.v.content != b.La && u({
- margin: b.a.chatInputSpacing + "px",
- border: "1px solid " + b.a.chatInputBorder,
- background: b.a.chatInputBackground,
- height: b.ib + 2 * b.a.chatInputPadding + "px"
- }, b.v.content.style);
- b.v && b.v.Zc && b.v.Zc()
- }
- }
- function Ya(b, c) {
- if (b.Aa[c])
- if (b.v == b.Aa[c]) Ra(b);
- else {
- if (b.v.content == b.La) b.Mg = Za(b.da);
- Ua(b, b.Aa[c])
- }
- }
- function $a(b, c, d) {
- var e = null;
- if (d == "/togglemenu smilies") e = "smilies";
- if (d == "/togglemenu colors") e = "colors";
- if (d == "/togglemenu pastebin") e = "pastebin";
- if (d == "/togglemenu minify") e = "minify";
- b.sf && Wa(b);
- b.sf = true;
- var f = b.d.createElement("span");
- f.appendChild(b.d.createTextNode(c));
- f.style.color = b.a.colorInMenu;
- f.style.cursor = "pointer";
- f.style.MozUserSelect = "none";
- f.style.Re = "none";
- f.onmouseover = function() {
- this.style.textDecoration = "underline"
- };
- f.onmouseout = function() {
- this.style.textDecoration = "none"
- };
- if (b.Aa[e]) b.Aa[e].Gb = f;
- f.onclick = function(g) {
- return function() {
- g.ca.mc(d, c);
- f.blur();
- return false
- }
- }(b);
- b.mb.appendChild(f)
- }
- function ab(b, c) {
- var d = b.d.createElement("div");
- d.style.padding = b.a.chatInputPadding + "px";
- u({
- color: b.a.colorInLinks,
- styleFloat: "left",
- cssFloat: "left",
- marginLeft: "4px",
- cursor: "pointer",
- textDecoration: "underline",
- fontFamily: b.a.chatInputFontFamily,
- fontSize: b.a.chatInputFontSize + "px"
- }, d.style);
- d.appendChild(b.d.createTextNode(E.g("InputMenuClose")));
- d.onclick = function(e) {
- return function() {
- Ra(e);
- return false
- }
- }(b);
- c.appendChild(d)
- }
- function bb(b) {
- b.wb = b.d.createElement("div");
- b.wb.style.display = "none";
- b.wb.style.overflow = "hidden";
- var c = {};
- b.Md = [];
- for (var d = 0; d < b.a.iconSmileys.length; d++) {
- var e = b.a.iconSmileys[d];
- if (!c[e.src] && e.src && e.code) {
- c[e.src] = true;
- var f = b.d.createElement("img");
- b.Md.push(f);
- u({
- width: "10px",
- height: "10px",
- border: "1px solid #fff",
- cssFloat: "left",
- styleFloat: "left"
- }, f.style);
- f.src = F.iconSmileysBase + e.src;
- f.onmouseover = function() {
- this.style.border = "1px solid #000"
- };
- f.onmouseout = function() {
- this.style.border =
- "1px solid #fff"
- };
- f.onclick = function(g, h) {
- return function() {
- try {
- g.Ub(h)
- } catch (k) {
- x && A("smiley click", k, C)
- }
- Ra(g)
- }
- }(b, e.code);
- b.wb.appendChild(f)
- }
- }
- b.p.appendChild(b.wb);
- b.wg = function(g) {
- return function() {
- for (var h = 0; h < g.Md.length; h++) {
- g.Md[h].style.width = g.ib + 2 * g.a.chatInputPadding - 2 + "px";
- g.Md[h].style.height = g.ib + 2 * g.a.chatInputPadding - 2 + "px"
- }
- }
- }(b);
- ab(b, b.wb)
- }
- function cb(b) {
- b.fb = b.d.createElement("div");
- b.fb.style.display = "none";
- b.fb.style.overflow = "hidden";
- b.ud = [];
- for (var c = 0; c < db.length; c++) {
- var d = b.d.createElement("div");
- b.ud.push(d);
- u({
- width: "10px",
- height: "10px",
- border: "1px solid #fff",
- cssFloat: "left",
- styleFloat: "left"
- }, d.style);
- d.style.background = db[c].color;
- d.onmouseover = function() {
- this.style.border = "1px solid #000"
- };
- d.onmouseout = function() {
- this.style.border = "1px solid #fff"
- };
- d.onclick = function(e, f) {
- return function() {
- eb(e, f);
- Ra(e)
- }
- }(b, db[c]);
- b.fb.appendChild(d)
- }
- b.p.appendChild(b.fb);
- b.ug = function(e) {
- return function() {
- for (var f = 0; f < e.ud.length; f++) {
- e.ud[f].style.width = e.ib + 2 * e.a.chatInputPadding - 2 + "px";
- e.ud[f].style.height = e.ib + 2 * e.a.chatInputPadding - 2 + "px"
- }
- }
- }(b);
- ab(b, b.fb)
- }
- function fb(b) {
- b.rb = b.d.createElement("div");
- b.rb.style.display = "none";
- b.rb.style.overflow = "hidden";
- var c = b.d.createElement("div");
- c.style.padding = b.a.chatInputPadding + "px";
- u({
- styleFloat: "left",
- cssFloat: "left",
- fontFamily: b.a.chatInputFontFamily,
- fontSize: b.a.chatInputFontSize + "px"
- }, c.style);
- b.rb.appendChild(c);
- var d = b.d.createElement("span");
- d.onclick = function(e) {
- return function() {
- Ra(e);
- e.ca.Rg();
- return false
- }
- }(b);
- u({
- color: b.a.colorInLinks,
- marginLeft: "4px",
- marginRight: "4px",
- cursor: "pointer",
- textDecoration: "underline"
- },
- d.style);
- d.appendChild(b.d.createTextNode("Paste"));
- c.appendChild(b.d.createTextNode("Paste text above, then click:"));
- c.appendChild(d);
- c.appendChild(b.d.createTextNode(" | "));
- b.p.appendChild(b.rb);
- ab(b, b.rb)
- }
- function gb(b) {
- b.nb = b.d.createElement("div");
- b.nb.style.display = "none";
- b.nb.style.overflow = "hidden";
- var c = b.d.createElement("form");
- c.style.display = "block";
- c.style.padding = b.a.chatInputPadding + "px";
- u({
- styleFloat: "left",
- cssFloat: "left",
- fontFamily: b.a.chatInputFontFamily,
- fontSize: b.a.chatInputFontSize + "px"
- }, c.style);
- var d = b.d.createElement("input");
- d.type = "text";
- d.size = "24";
- d.style.outline = "0";
- d.style.margin = "0";
- d.style.padding = "0";
- u({
- fontFamily: b.a.chatInputFontFamily,
- fontSize: b.a.chatInputFontSize +
- "px"
- }, d.style);
- d.style.border = "0";
- d.setAttribute("placeholder", "http://mibbit.com");
- d.style.background = "#eee";
- c.appendChild(b.d.createTextNode("URL:"));
- c.appendChild(d);
- var e = b.d.createElement("span");
- e.onclick = function(g) {
- return function() {
- try {
- Ra(g);
- g.ca.zg(d.value)
- } catch (h) {}
- return false
- }
- }(b);
- c.onsubmit = e.onclick;
- u({
- color: b.a.colorInLinks,
- marginLeft: "4px",
- marginRight: "4px",
- cursor: "pointer",
- textDecoration: "underline"
- }, e.style);
- e.appendChild(b.d.createTextNode("Minify"));
- c.appendChild(e);
- c.appendChild(b.d.createTextNode(" | "));
- b.nb.appendChild(c);
- b.p.appendChild(b.nb);
- var f = function() {
- return function() {
- d.value = "";
- d.focus()
- }
- }();
- b.vg = function() {
- window.setTimeout(f, 100)
- };
- ab(b, b.nb)
- }
- function eb(b, c) {
- if (b.lh) window.setTimeout(function(d) {
- return function() {
- try {
- d.execCommand("foreColor", false, c.color)
- } catch (e) {
- alert(e)
- }
- }
- }(b.d), 200);
- else b.ea.style.color = c.color;
- if (b.ca.De) c.code == 1 ? b.ca.De(null) : b.ca.De(c.code)
- }
- var db = [{
- code: 0,
- color: "#ffffff"
- }, {
- code: 1,
- color: "#000000"
- }, {
- code: 2,
- color: "#000080"
- }, {
- code: 3,
- color: "#008000"
- }, {
- code: 4,
- color: "#ff0000"
- }, {
- code: 5,
- color: "#800040"
- }, {
- code: 6,
- color: "#800080"
- }, {
- code: 7,
- color: "#ff8040"
- }, {
- code: 8,
- color: "#ffff00"
- }, {
- code: 9,
- color: "#80ff00"
- }, {
- code: 10,
- color: "#008080"
- }, {
- code: 11,
- color: "#00ffff"
- }, {
- code: 12,
- color: "#0000ff"
- }, {
- code: 13,
- color: "#ff00ff"
- }, {
- code: 14,
- color: "#808080"
- }, {
- code: 15,
- color: "#c0c0c0"
- }];
- function Sa(b) {
- b.v = {
- content: b.La,
- Gb: null
- };
- b.nh = null;
- bb(b);
- cb(b);
- fb(b);
- gb(b);
- b.Aa.smilies = {
- content: b.wb,
- Zc: b.wg
- };
- b.Aa.colors = {
- content: b.fb,
- Zc: b.ug
- };
- b.Aa.pastebin = {
- content: b.rb,
- Zc: b.ca.Ld,
- mf: b.ca.pg
- };
- b.Aa.minify = {
- content: b.nb,
- Zc: b.vg
- };
- if (b.Ad) {
- b.mb = b.d.createElement("div");
- u({
- color: b.a.colorInMenuSep,
- margin: b.a.chatInputSpacing + "px",
- paddingLeft: "4px",
- paddingTop: "1px",
- paddingBottom: "1px",
- fontFamily: b.a.chatInputMenuFontFamily,
- fontSize: b.a.chatInputMenuFontSize + "px"
- }, b.mb.style);
- b.mb.style.MozUserSelect =
- "none";
- b.mb.style.Re = "none";
- b.mb.style.marginTop = "auto";
- for (var c = [], d = 0; d < b.a.ioCustomMenus.length; d++) c.push({
- title: b.a.ioCustomMenus[d].title,
- command: b.a.ioCustomMenus[d].command
- });
- if (c.length == 0) {
- b.a.ioSmilies && c.push({
- title: E.g("MenuSmilies"),
- command: "/togglemenu smilies"
- });
- b.a.ioColors && c.push({
- title: E.g("MenuColors"),
- command: "/togglemenu colors"
- });
- b.a.ioPastebin && c.push({
- title: E.g("MenuPasteBin"),
- command: "/togglemenu pastebin"
- });
- b.a.ioMinify && c.push({
- title: "Minify URL",
- command: "/togglemenu minify"
- })
- }
- for (d =
- 0; d < c.length; d++) $a(b, c[d].title, c[d].command);
- b.pb = b.d.createElement("table");
- b.pb.setAttribute("border", "0");
- b.pb.setAttribute("cellpadding", "0");
- b.pb.setAttribute("cellspacing", "0");
- b.pb.style.width = "100%";
- b.p.appendChild(b.pb);
- c = b.pb.insertRow(-1);
- c.insertCell(-1).appendChild(b.mb);
- c = c.insertCell(-1);
- c.style.textAlign = "right";
- d = b.d.createElement("div");
- u({
- color: b.a.colorInMenuSep,
- margin: b.a.chatInputSpacing + "px",
- paddingRight: "4px",
- paddingTop: "1px",
- paddingBottom: "1px",
- fontFamily: b.a.chatInputMenuFontFamily,
- fontSize: b.a.chatInputMenuFontSize + "px"
- }, d.style);
- d.style.marginTop = "auto";
- var e = b.d.createElement("span");
- e.style.color = b.a.colorInMenu;
- e.style.marginRight = "4px";
- d.appendChild(e);
- b.xf = b.d.createTextNode("");
- e.appendChild(b.xf);
- if (b.ca.qf) {
- var f = b.d.createElement("span");
- f.appendChild(b.d.createTextNode("Menu"));
- f.style.color = b.a.colorInMenu;
- f.style.cursor = "pointer";
- f.onmouseover = function() {
- return function() {
- f.style.textDecoration = "underline"
- }
- }(b);
- f.onmouseout = function() {
- return function() {
- f.style.textDecoration =
- "none"
- }
- }(b);
- f.onclick = function(g) {
- return function() {
- g.ca.qf()
- }
- }(b);
- d.appendChild(f)
- }
- c.appendChild(d)
- }
- }
- function Qa(b, c, d, e, f) {
- function g(j) {
- return function() {
- hb(j);
- return false
- }
- }
- function h(j) {
- return function(n) {
- return ib(j, n)
- }
- }
- function k(j) {
- return function(n) {
- var o;
- n = n;
- if (!n) n = window.event;
- if (j.dd && n.keyCode != 9) j.dd = false;
- if (n.keyCode == 9) {
- if (j.Rb) {
- var s = j.Q.value,
- w = Za(j),
- p = s.substring(0, w);
- s = s.substring(w, s.length);
- if (j.dd) {
- p = p.substring(0, p.length - (j.bd[j.tabIndex] + j.cd).length);
- j.tabIndex++;
- if (j.tabIndex == j.bd.length) j.tabIndex = 0;
- w = p + j.bd[j.tabIndex] + j.cd;
- j.Q.value = w + s;
- Va(j, w.length)
- } else if ((w =
- p.match(new RegExp("[" + j.eg + "]+$"))) && w.length == 1) {
- w = w[0].toLowerCase();
- p = p.substring(0, p.length - w.length);
- j.cd = p == "" ? ": " : " ";
- var r = [];
- for (nick in j.Rb) j.Rb.hasOwnProperty(nick) && nick.substring(0, w.length).toLowerCase() == w && r.push(j.Rb[nick]);
- if (r.length !== 0)
- if (r.length == 1) {
- j.Q.value = p + r[0] + j.cd + s;
- Va(j, p.length + (r[0] + j.cd).length)
- } else {
- r.sort(j.fg);
- for (var y = r[0].length, z = 0; z < r.length - 1; z++)
- for (; y > 0;) {
- if (r[z].substring(0, y).toLowerCase() == r[z + 1].substring(0, y).toLowerCase()) break;
- y--
- }
- if (y > w.length) {
- w =
- p + r[0].substring(0, y).toLowerCase();
- j.Q.value = w + s;
- Va(j, w.length)
- } else {
- j.dd = true;
- j.bd = r;
- j.tabIndex = 0;
- w = p + j.bd[j.tabIndex] + j.cd;
- j.Q.value = w + s;
- Va(j, w.length)
- }
- }
- }
- }
- } else if (!n.shiftKey && !n.altKey && n.keyCode == 38) {
- if (j.Kb < j.history.length - 1) {
- j.Kb++;
- j.Q.value = j.history[j.Kb];
- Va(j, j.Q.value.length)
- }
- } else !n.shiftKey && !n.altKey && n.keyCode == 40 && jb(j);
- ib(j, n);
- return o
- }
- }
- function l(j) {
- return function() {
- j.history[j.Kb] = j.Q.value;
- j.xc && j.xc(j.Q.value)
- }
- }
- this.cg = e;
- this.history = [];
- this.Kb = 0;
- this.maxLength = d;
- this.Q = c;
- this.Rb = {};
- this.eg = "\\_\\|a-zA-Z0-9\\-\\[\\]\\\\`\\^\\{\\}";
- this.fg = f;
- this.dd = false;
- this.bd = [];
- this.tabIndex = 0;
- this.xc = null;
- c.setAttribute("autocomplete", "off");
- c.setAttribute("spellcheck", "true");
- if (b.addEventListener) {
- b.addEventListener("submit", g(this), false);
- c.addEventListener("keydown", k(this), false);
- c.addEventListener("keypress", h(this), false);
- c.addEventListener("keyup", l(this), false)
- } else {
- b.attachEvent("onsubmit", g(this));
- c.attachEvent("onkeydown", k(this));
- c.attachEvent("onkeypress", h(this));
- c.attachEvent("onkeyup", l(this))
- }
- }
- function kb(b, c) {
- b.Rb[c.toLowerCase()] = c
- }
- function lb(b, c) {
- delete b.Rb[c.toLowerCase()]
- }
- function hb(b) {
- b.dd = false;
- b.history[0] = b.Q.value;
- b.Q.value = "";
- if (b.cg && b.history[0] == b.history[1]) b.history[0] = "";
- else {
- b.history.length >= b.maxLength && b.history.pop();
- b.history.unshift("")
- }
- b.Kb = 0;
- return false
- }
- function jb(b) {
- if (b.Kb > 0) {
- b.Kb--;
- b.Q.value = b.history[b.Kb]
- }
- }
- Qa.prototype.Ub = function(b) {
- var c = this.Q.value,
- d = Za(this);
- this.Q.value = c.substring(0, d) + b + c.substring(d, c.length);
- Va(this, d + b.length)
- };
- function Va(b, c) {
- try {
- if (typeof b.Q.selectionStart != "undefined") b.Q.setSelectionRange(c, c);
- else if (b.Q.createTextRange) {
- var d = b.Q.createTextRange();
- d.move("character", c);
- d.select()
- }
- } catch (e) {}
- }
- function Za(b) {
- try {
- if (typeof b.Q.selectionStart != "undefined") return b.Q.selectionStart;
- else if (b.Q.createTextRange) return document.selection.createRange().getBookmark().charCodeAt(2) - 2
- } catch (c) {}
- return v.length
- }
- function ib(b, c) {
- if (!c) c = window.event;
- if (c.keyCode == 9 || !c.shiftKey && !c.altKey && c.keyCode == 38 && c.charCode == 0 || !c.shiftKey && !c.altKey && c.keyCode == 40 && c.charCode == 0) {
- if (c.stopPropagation) {
- c.stopPropagation();
- c.preventDefault()
- } else {
- c.cancelBubble = true;
- c.returnValue = false
- }
- return false
- }
- return true
- }
- function mb(b, c, d) {
- this.a = c;
- this.p = b;
- this.document = b.ownerDocument;
- this.pf = nb(d);
- this.gf = false;
- this.oh = this.pf ? "#00f" : "#ff8";
- this.ph = this.pf ? "#222" : "#eee";
- this.p.style.zIndex = "100";
- this.Jc = "";
- this.tg = 0;
- this.N = this.document.createElement("div");
- u({
- textAlign: "left",
- whiteSpace: "pre",
- margin: "1px"
- }, this.N.style);
- this.z(true);
- this.N.onmouseover = function(e) {
- return function() {
- e.expand(true)
- }
- }(this);
- this.N.onmouseout = function(e) {
- return function() {
- e.expand(false)
- }
- }(this);
- this.p.appendChild(this.N);
- this.Y = this.N;
- this.ge = 10;
- this.N.style.display = ob ? "none" : "block";
- pb(this, "Mibbit")
- }
- mb.prototype.Va = function() {
- if (ob) return Adverts.height;
- return this.ge + 2
- };
- mb.prototype.z = function(b) {
- if (!(!b && ob)) {
- this.N.style.fontFamily = this.a.infobarFontFamily;
- this.N.style.fontSize = this.a.infobarFontSize + "px";
- this.N.style.padding = this.a.infobarPadding + "px";
- this.N.style.color = this.a.infobarColor;
- this.N.style.border = this.a.infobarBorder ? "1px solid " + this.a.infobarBorder : "0";
- this.N.style.margin = this.a.infobarBorder ? "0px" : "1px";
- this.p.style.background = this.a.infobarBackground;
- this.N.style.display = ob ? "none" : "block"
- }
- };
- mb.prototype.C = function() {
- try {
- if (this.N && this.N.offsetHeight != 0 && this.N.offsetHeight != this.ge) {
- if (!this.gf) this.ge = this.N.offsetHeight;
- return true
- }
- } catch (b) {
- x && A("Infobar.layout", b, C)
- }
- return false
- };
- function pb(b, c, d) {
- if (c == "") c = "NO TOPIC SET";
- b.Jc = c;
- b.tg = (new Date).getTime();
- b.clear();
- var e = b.document.createElement("span");
- if (d) {
- d.reset();
- d.r += c;
- d.A(e)
- } else e.appendChild(b.document.createTextNode(c));
- b.N.appendChild(e)
- }
- mb.prototype.expand = function(b) {
- function c(d, e, f) {
- try {
- d.style[e] = f
- } catch (g) {}
- }
- if (this.gf = b) {
- u({
- overflow: "auto",
- height: "auto",
- background: this.a.infobarBackgroundHighlight
- }, this.p.style);
- u({
- color: this.a.infobarColorHighlight,
- textAlign: "left"
- }, this.Y.style);
- c(this.Y, "whiteSpace", "pre-wrap");
- c(this.Y, "whiteSpace", "-moz-pre-wrap");
- c(this.Y, "whiteSpace", "-pre-wrap");
- c(this.Y, "whiteSpace", "-o-pre-wrap");
- c(this.Y, "wordWrap", "break-word");
- this.Y.style.border = this.a.infobarBorderHighlight ? "1px solid " + this.a.infobarBorderHighlight :
- "0";
- this.Y.style.margin = this.a.infobarBorderHighlight ? "0px" : "1px"
- } else {
- u({
- overflow: "hidden",
- height: this.Va() + "px",
- background: this.a.infobarBackground,
- padding: "0"
- }, this.p.style);
- u({
- color: this.a.infobarColor,
- textAlign: "left",
- whiteSpace: "pre"
- }, this.Y.style);
- c(this.Y, "wordWrap", "normal");
- this.Y.style.border = this.a.infobarBorder ? "1px solid " + this.a.infobarBorder : "0";
- this.Y.style.margin = this.a.infobarBorder ? "0px" : "1px"
- }
- };
- mb.prototype.clear = function() {
- for (; this.N.firstChild;) this.N.removeChild(this.N.firstChild)
- };
- var ob = false;
- function qb(b, c, d, e, f, g, h, k, l, j, n, o) {
- this.u = b;
- this.D = l;
- this.id = d;
- this.we = n;
- this.collapsed = false;
- this.ab = true;
- this.$d = this.Zd = false;
- this.title = f;
- this.content = e;
- this.d = c.ownerDocument;
- this.va = k;
- this.fc = this.Cc = false;
- this.H = h;
- this.se = (new Date).getTime();
- this.hd = j.Bb;
- this.J = c;
- this.J.style.cursor = "pointer";
- this.J.style.MozUserSelect = "none";
- this.J.style.Re = "none";
- this.xa = this.d.createElement("span");
- u({
- display: "block",
- position: "relative",
- paddingRight: "4px"
- }, this.xa.style);
- this.xa.onclick = function(s) {
- return function(w) {
- if (!w) w =
- window.event;
- w = w.target ? w.target : w.srcElement;
- w != s.Nb && w != s.I && j.Xf(s.id);
- return false
- }
- }(this);
- this.L = this.d.createElement("span");
- u({
- textDecoration: "none",
- verticalAlign: "top",
- position: "relative"
- }, this.L.style);
- if (this.H.P) {
- this.kc = this.d.createElement("img");
- b = this.u.ba - 2;
- c = this.u.ba - 2;
- if (this.H.Tb && this.H.Kc)
- if (this.H.Tb < c) {
- c = this.H.Tb;
- b = this.H.Kc
- }
- u({
- width: b + "px",
- height: c + "px",
- display: "inline",
- marginRight: "3px",
- verticalAlign: "top"
- }, this.kc.style);
- D(this.kc, this.H.P, b, c);
- this.L.appendChild(this.kc)
- }
- this.Lf =
- this.d.createTextNode(f);
- this.L.appendChild(this.Lf);
- this.J.title = g;
- this.xa.appendChild(this.L);
- this.J.appendChild(this.xa);
- if (o) {
- this.Nb = this.d.createElement("span");
- this.af = this.d.createTextNode(" << ");
- this.Nb.appendChild(this.af);
- this.L.appendChild(this.Nb);
- this.Nb.onclick = function(s) {
- return function() {
- s.Jd(!s.collapsed);
- return false
- }
- }(this)
- }
- if (j.$e) {
- this.I = this.d.createElement("img");
- u({
- cursor: "pointer",
- width: "12px",
- height: "12px",
- marginLeft: "3px",
- verticalAlign: "top"
- }, this.I.style);
- this.I.title =
- "Close tab";
- this.I.onclick = function(s) {
- return function() {
- j.$e(s.id);
- return false
- }
- }(this);
- D(this.I, "https://s3.amazonaws.com/mibbit/gfx/close-win-grey.png", 12, 12);
- this.I.style.border = "0";
- this.I.onmouseover = function() {
- D(this, "https://s3.amazonaws.com/mibbit/gfx/close-win-red.png", 12, 12)
- };
- this.I.onmouseout = function() {
- D(this, "https://s3.amazonaws.com/mibbit/gfx/close-win-grey.png", 12, 12)
- };
- this.L.appendChild(this.I)
- }
- this.z()
- }
- qb.prototype.Jd = function(b) {
- this.u.Jd(this.id, b);
- this.af.nodeValue = this.collapsed ? " >> " : " << "
- };
- function rb(b, c) {
- b.title = c;
- b.Lf.nodeValue = b.title
- }
- function sb(b) {
- if (b.u.$a == "list") {
- u({
- styleFloat: "none",
- cssFloat: "none",
- marginRight: "0px",
- textAlign: "left",
- marginBottom: "1px"
- }, b.J.style);
- b.xa.style.cssFloat = "none";
- b.xa.style.styleFloat = "none";
- if (b.I) {
- b.L.removeChild(b.I);
- b.L.insertBefore(b.I, b.L.firstChild);
- b.I.style.marginLeft = "0px";
- b.I.style.marginRight = "4px"
- }
- } else {
- u({
- styleFloat: "left",
- cssFloat: "left",
- marginRight: b.D.Kf + "px",
- textAlign: "center",
- marginBottom: "0px"
- }, b.J.style);
- b.xa.style.cssFloat = "left";
- b.xa.style.styleFloat = "left";
- if (b.I) {
- b.L.removeChild(b.I);
- b.L.appendChild(b.I);
- b.I.style.marginLeft = "4px";
- b.I.style.marginRight = "0px"
- }
- }
- b.z()
- }
- qb.prototype.z = function() {
- this.J.style.height = this.u.ba + "px";
- this.xa.style.height = this.u.ba + "px";
- this.xa.style.fontSize = this.D.fontSize + "px";
- this.xa.style.lineHeight = this.D.fontSize + "px";
- this.L.style.fontSize = this.D.fontSize + "px";
- this.L.style.lineHeight = this.D.fontSize + "px";
- this.L.style.fontFamily = this.D.fontFamily;
- this.L.style.fontWeight = this.D.fontWeight;
- this.L.style.marginLeft = this.D.padding + "px";
- this.L.style.marginRight = this.D.padding + "px";
- this.L.style.top = this.D.padding + "px";
- if (this.H.P) {
- var b =
- this.u.ba - 2,
- c = this.u.ba - 2;
- if (this.H.Tb && this.H.Kc)
- if (this.H.Tb < c) {
- c = this.H.Tb;
- b = this.H.Kc
- }
- this.kc.style.width = b + "px";
- this.kc.style.height = c + "px";
- D(this.kc, this.H.P, b, c)
- }
- tb(this, this.va)
- };
- var vb = {};
- function wb(b, c, d, e, f, g, h, k) {
- b = (c ? "l" : "r") + "-" + (d ? "1" : "0") + "-" + e + "-" + f + "-" + g + "-" + h + "-" + k;
- if (vb[b]) return vb[b];
- try {
- var l = document.createElement("canvas");
- if (!l.getContext) return false;
- l.setAttribute("width", e);
- l.setAttribute("height", f);
- var j = l.getContext("2d");
- j.fillStyle = k;
- j.fillRect(0, 0, e, f);
- var n = j.createLinearGradient(0, 0, 0, f * 2);
- n.addColorStop(0, h);
- n.addColorStop(0.1, h);
- n.addColorStop(1, "#000");
- j.fillStyle = d ? h : n;
- var o = Math.min(e, f) / 3;
- j.beginPath();
- if (c) {
- j.moveTo(o, 0.5);
- j.lineTo(e - 0.5, 0.5);
- j.lineTo(e -
- 0.5, f);
- j.lineTo(0.5, f);
- j.lineTo(0.5, o);
- j.bezierCurveTo(0.5, o / 3, o / 3, 0.5, o, 0.5)
- } else {
- j.moveTo(e - 0.5 - o, 0.5);
- j.lineTo(0.5, 0.5);
- j.lineTo(0.5, f);
- j.lineTo(e - 0.5, f);
- j.lineTo(e - 0.5, o);
- j.bezierCurveTo(e - 0.5, o / 2, e - 0.5 - o / 2, 1, e - 0.5 - o, 0.5)
- }
- j.fill();
- j.beginPath();
- if (c) {
- j.moveTo(0.5, f);
- j.lineTo(0.5, o);
- j.bezierCurveTo(0.5, o / 2, o / 2, 0.5, o, 0.5);
- j.lineTo(e - 0.5, 0.5)
- } else {
- j.moveTo(e - 0.5, f);
- j.lineTo(e - 0.5, o);
- j.bezierCurveTo(e - 0.5, o / 2, e - 0.5 - o / 2, 0.5, e - 0.5 - o, 0.5);
- j.lineTo(0.5, 0.5)
- }
- j.strokeStyle = g;
- j.lineWidth = 1;
- j.lineCap = "butt";
- j.stroke();
- var s = l.toDataURL();
- return vb[b] = s
- } catch (w) {}
- return false
- }
- function tb(b, c) {
- function d(l) {
- var j = l.indexOf(" ");
- if (j != -1) l = l.substring(0, j);
- j = "ffffff";
- if (l.charAt(0) == "#") {
- if (l.length == 7) j = l.substring(1, l.length);
- if (l.length == 4) j = l.substring(1, 2) + l.substring(1, 2) + l.substring(2, 3) + l.substring(2, 3) + l.substring(3, 4) + l.substring(3, 4)
- } else if (l.length == 6) j = l;
- return j
- }
- b.va = c;
- var e = d(b.H.background),
- f = d(b.D.background),
- g = d(b.H.border),
- h = wb(b, true, c, 200, b.u.ba, b.H.border, b.H.background, b.D.background),
- k = wb(b, false, c, 200, b.u.ba, b.H.border, b.H.background, b.D.background);
- if (b.u.$a == "top" && h && k) {
- b.xa.style.background = "transparent url('" + k + "') no-repeat scroll right top";
- b.J.style.background = "transparent url('" + h + "') no-repeat scroll left top"
- } else {
- e = "/img/tab?" + (b.u.$a == "list" ? "vertical&" : "") + "color=" + e + (g ? "&bcolor=" + g : "") + (f ? "&bgcolor=" + f : "") + (c ? "&selected=true" : "");
- if (b.u.ba != 20) e += "&height=" + b.u.ba;
- b.xa.style.background = "transparent url(" + e + "&right=true) no-repeat scroll right top";
- b.J.style.background = "transparent url(" + e + ") no-repeat scroll left top"
- }
- b.L.style.color =
- c ? b.D.color : b.fc ? b.D.Pb : b.Cc ? b.D.Ob : b.D.Zf;
- if (b.I) b.I.style.display = b.u.qg ? "inline" : c ? "inline" : "none";
- b.J.style.marginLeft = b.u.$a == "list" ? c ? "4px" : "0px" : "0px"
- }
- qb.prototype.close = function() {
- if (this.va) {
- this.hd && this.hd(this.id, false);
- this.content.style.display = "none";
- tb(this, false)
- }
- };
- qb.prototype.open = function() {
- if (this.va) return false;
- this.content.style.display = "block";
- tb(this, true);
- this.hd && this.hd(this.id, true);
- this.se = (new Date).getTime();
- xb(this);
- return true
- };
- qb.prototype.pa = function(b) {
- if (!this.va) {
- if (!this.fc && b) {
- var c = this.u.ec;
- this.u.ec++;
- c == 0 && this.u.M(true);
- this.fc = true;
- this.L.style.color = this.D.Pb
- }
- if (!this.Cc) {
- this.u.Dc == 0 && this.u.M(true);
- this.u.Dc++;
- this.Cc = true;
- if (!this.fc) this.L.style.color = this.D.Ob
- }!this.ab && this.we && yb(this.u.l[this.we], b)
- }
- };
- function xb(b) {
- b.fc && b.u.ec--;
- if (b.Cc) {
- b.u.Dc--;
- if (b.u.Dc == 0) b.u.M(false);
- else b.u.ec == 0 && b.u.M(true)
- }
- b.Cc = false;
- b.fc = false
- }
- qb.prototype.Va = function() {
- return this.D.padding * 2 + this.L.offsetHeight
- };
- function yb(b, c) {
- if (c) b.$d = true;
- else b.Zd = true;
- if (b.$d) b.Nb.style.color = b.D.Pb;
- else if (b.Zd) b.Nb.style.color = b.D.Ob
- }
- function zb(b) {
- b.Zd = false;
- b.$d = false;
- b.Nb.style.color = b.D.color
- }
- function Ab(b, c, d, e, f) {
- this.a = c;
- this.d = b.ownerDocument;
- this.l = {};
- this.cf = 0;
- this.q = [];
- this.ec = this.Dc = 0;
- this.Ea = b;
- this.$a = "top";
- this.Qd = e;
- this.ba = f;
- this.Ea.style.textAlign = "left";
- this.X = this.d.createElement("div");
- this.X.style.overflow = "hidden";
- this.X.style.zIndex = "90";
- this.zc = this.d.createElement("ul");
- u({
- listStyleType: "none",
- listStyleImage: "none",
- listStylePosition: "outside",
- margin: "0",
- padding: "0",
- verticalAlign: "bottom",
- overflow: "hidden"
- }, this.zc.style);
- c = this.d.createElement("div");
- c.style.position =
- "relative";
- this.X.appendChild(this.zc);
- c.appendChild(this.X);
- b.appendChild(c);
- if (this.qd = d) {
- this.gc = this.d.createElement("div");
- this.Ea.appendChild(this.gc);
- u({
- position: "absolute",
- right: "0px",
- top: Bb + "px",
- width: "40px",
- height: this.ba + "px",
- textAlign: "right",
- paddingTop: this.Qd + "px",
- background: this.a.tabBackgroundColor
- }, this.gc.style);
- this.Ra = this.d.createElement("div");
- this.Ra.style.display = "none";
- this.gc.appendChild(this.Ra);
- this.bb = this.d.createElement("span");
- this.bb.appendChild(this.d.createTextNode("<"));
- u({
- color: "#eee",
- fontSize: "15px",
- fontWeight: "bold",
- cursor: "pointer",
- textDecoration: "none"
- }, this.bb.style);
- this.bb.onclick = function(g) {
- return function() {
- var h = Cb(g);
- h > 0 && Db(g, h - 1)
- }
- }(this);
- this.db = this.d.createElement("a");
- this.db.appendChild(this.d.createTextNode(">"));
- u({
- color: "#eee",
- fontSize: "15px",
- fontWeight: "bold",
- cursor: "pointer",
- textDecoration: "none"
- }, this.db.style);
- this.db.onclick = function(g) {
- return function() {
- var h = Cb(g);
- h + 1 < Eb(g) && Db(g, h + 1)
- }
- }(this);
- this.Ra.appendChild(this.bb);
- this.Ra.appendChild(this.d.createTextNode(" "));
- this.Ra.appendChild(this.db);
- this.X.style.marginRight = "40px"
- }
- Fb(this, this.$a == "list");
- this.z()
- }
- function Gb(b) {
- for (i in b.l) b.l.hasOwnProperty(i) && b.l[i].close()
- }
- function Hb(b, c, d) {
- if (!b.l[c]) return false;
- var e = b.l[c];
- delete b.l[c];
- b.l[d] = e;
- e.id = d;
- return true
- }
- function Ib(b, c) {
- if (!b.l[c]) return false;
- var d = c + ".dead" + b.cf;
- Hb(b, c, d);
- rb(b.l[d], b.l[d].title + " (dead)");
- b.l[d].I.onclick = function(e) {
- return function() {
- Jb(e, d)
- }
- }(b);
- b.cf++;
- return true
- }
- Ab.prototype.Jd = function(b, c) {
- x && A("setCollapse", "Channel " + b + " : " + c, M);
- var d = this.l[b];
- if (d.collapsed = c) d.Ud = false;
- c || zb(d);
- for (var e = 0; e < this.q.length; e++)
- if (this.q[e].we == b) {
- x && A("setCollapse", "CH " + this.q[e].id, M);
- this.q[e].J.style.display = c ? "none" : "block";
- this.q[e].ab = !c;
- if (this.q[e].va && c) {
- this.q[e].close();
- d.Ud = this.q[e];
- d.open()
- }
- }
- if (!c && d.Ud) {
- Gb(this);
- d.Ud.open()
- }
- };
- function Kb(b, c, d) {
- if (!d) return true;
- if ((b = b.l[d]) && b.collapsed) return false;
- return true
- }
- function Lb(b, c, d, e, f, g, h, k, l, j, n, o) {
- x && A("addTab", "Adding " + c + " : " + n + " " + o, M);
- try {
- b.l[c] && x && A("addTab", "We already have a tab of that ID! " + c, C);
- if (n) {
- var s = b.l[n];
- if (s && s.collapsed) l = true
- }
- if (l) d.style.display = "none";
- else Gb(b);
- var w = b.d.createElement("li");
- u({
- listStyleType: "none",
- margin: "0",
- padding: "0",
- display: "block",
- position: "relative",
- whiteSpace: "nowrap"
- }, w.style);
- w.style.paddingLeft = "4px";
- var p = {};
- p.Bb = g;
- if (j) p.$e = function(z) {
- return function(B) {
- var H = true;
- if (h) H = h(B);
- H && Jb(z, B)
- }
- }(b);
- p.Xf =
- function(z) {
- return function(B) {
- if (typeof z.l[B] != "undefined") {
- Gb(z);
- z.l[B].open()
- }
- }
- }(b);
- var r = new qb(b, w, c, d, e, f, k, !l, b.ka, p, n, o);
- sb(r);
- x && A("addTab", "setting hidden? " + c + " : " + n + " " + b.l[n], M);
- if (n)
- if ((s = b.l[n]) && s.collapsed) {
- x && A("addTab", "setting hidden " + c, M);
- r.J.style.display = "none";
- r.ab = false
- }
- Mb(b, r);
- if (b.Ra && b.size() > 1) b.Ra.style.display = "block";
- return r
- } catch (y) {
- x && A("addTab", "exception " + y, C)
- }
- }
- function Mb(b, c) {
- for (var d, e, f = 0; f < b.q.length; f++) {
- var g = b.q[f];
- if (g.ab) e = g;
- if (g.id > c.id) {
- d = g.J;
- break
- }
- }
- if (e && e.J.style.display == "none") c.J.style.display = "none";
- d ? b.zc.insertBefore(c.J, d) : b.zc.appendChild(c.J);
- b.l[c.id] = c;
- b.q.push(c);
- b.q.sort(function(h, k) {
- if (h.id > k.id) return 1;
- if (h.id < k.id) return -1;
- return 0
- })
- }
- function Nb(b, c) {
- b.zc.removeChild(c.J);
- for (var d = 0; d < b.q.length; d++)
- if (b.q[d] == c) {
- b.q.splice(d, 1);
- break
- }
- delete b.l[c.id]
- }
- function Jb(b, c) {
- c = b.l[c];
- if (!c) return false;
- c.content.parentNode.removeChild(c.content);
- xb(c);
- Nb(b, c);
- if (c.va) {
- c = 0;
- var d;
- for (i in b.l)
- if (b.l.hasOwnProperty(i))
- if (b.l[i].se > c) {
- c = b.l[i].se;
- d = b.l[i]
- }
- d && d.open()
- }
- if (b.Ra && b.size() < 2) b.Ra.style.display = "none";
- return true
- }
- function Db(b, c) {
- for (var d = 0, e = 0; d < b.q.length; d++) {
- var f = b.q[d];
- if (f.ab) f.J.style.display = e < c ? "none" : "block";
- f.ab && e++
- }
- }
- function Cb(b) {
- for (var c = 0, d = 0; c < b.q.length; c++) {
- var e = b.q[c];
- if (e.ab && e.J.style.display == "block") return d;
- e.ab && d++
- }
- return 0
- }
- function Eb(b) {
- for (var c = 0, d = 0; d < b.q.length; d++) b.q[d].ab && c++;
- return c
- }
- Ab.prototype.size = function() {
- return this.q.length
- };
- Ab.prototype.M = function(b) {
- if (this.Ra) {
- var c = this.ec > 0;
- if (b) {
- this.bb.style.color = c ? this.ka.Pb : this.ka.Ob;
- this.db.style.color = c ? this.ka.Pb : this.ka.Ob
- } else {
- this.bb.style.color = this.ka.td;
- this.db.style.color = this.ka.td
- }
- }
- };
- Ab.prototype.z = function() {
- this.qg = this.a.tabIndividualCloses;
- this.ka = {
- fontFamily: this.a.tabFontFamily,
- fontSize: this.a.tabFontSize,
- fontWeight: "bold",
- padding: this.a.tabPadding,
- color: this.a.tabTextColor,
- Pb: this.a.tabTextColorActivityMe,
- Ob: this.a.tabTextColorActivity,
- Zf: this.a.tabTextColorInactive,
- Kf: this.a.tabSpacing,
- td: this.a.tabTextColorArrows,
- background: this.a.tabBackgroundColor
- };
- this.Ea.style.background = this.a.tabBackgroundColor;
- this.gc && u({
- top: Bb + "px",
- height: this.ba + "px",
- paddingTop: this.Qd + "px",
- background: this.a.tabBackgroundColor
- }, this.gc.style);
- if (this.qd)
- if (this.ec > 0) {
- this.bb.style.color = this.ka.Pb;
- this.db.style.color = this.ka.Pb
- } else if (this.Dc > 0) {
- this.bb.style.color = this.ka.Ob;
- this.db.style.color = this.ka.Ob
- } else {
- this.bb.style.color = this.ka.td;
- this.db.style.color = this.ka.td
- }
- for (i in this.l)
- if (this.l.hasOwnProperty(i)) {
- this.l[i].D = this.ka;
- sb(this.l[i])
- }
- var b = 0;
- for (i in this.l)
- if (this.l.hasOwnProperty(i)) {
- var c = this.l[i].Va();
- if (c > b) b = c
- }
- if (b != 0 && b != this.ba) {
- this.ba = b;
- Fb(this, this.$a == "list")
- }
- };
- function Ob(b) {
- Fb(b, b.$a == "top");
- b.a.useTabList = b.$a == "list"
- }
- function Fb(b, c) {
- if (!(O && c)) {
- if (typeof Q != "undefined" && b == Q) Pb = Bb + (c ? 0 : b.Qd + b.ba);
- b.$a = c ? "list" : "top";
- b.Ea.style.height = c ? "auto" : b.ba + "px";
- b.Ea.style.overflow = c ? "auto" : "hidden";
- b.Ea.style.top = c ? Pb + "px" : "";
- b.Ea.style.bottom = c ? Qb + "px" : "";
- b.Ea.style.left = c ? "0px" : "";
- b.Ea.style.width = c ? F.tabListWidth + "px" : "auto";
- b.Ea.style.position = c ? "absolute" : "static";
- b.Ea.style.paddingTop = c ? "0px" : b.Qd + "px";
- b.X.style.height = c ? "auto" : b.ba + "px";
- b.X.style.marginRight = c ? "0px" : b.qd ? "40px" : "0px";
- b.zc.style.height = c ? "auto" :
- b.ba + "px";
- if (b.Pc) {
- b.Pc.style.styleFloat = c ? "none" : "left";
- b.Pc.style.cssFloat = c ? "none" : "left";
- b.Pc.style.marginRight = (c ? "0" : b.ka.Kf) + "px";
- b.Pc.style.marginBottom = c ? "1px" : "0px";
- b.Pc.style.textAlign = c ? "left" : "center"
- }
- for (var d = 0; d < b.q.length; d++) {
- sb(b.q[d]);
- b.q[d].content.style.top = Pb + "px";
- b.q[d].content.style.left = (c ? F.tabListWidth : 0) + "px";
- b.q[d].J.style.display = b.q[d].ab ? "block" : "none"
- }
- if (b.qd) b.gc.style.display = c ? "none" : "block"
- }
- }
- function D(b, c, d, e) {
- b.style.width = d + "px";
- b.style.height = e + "px";
- d = navigator.appVersion.split("MSIE");
- if (parseFloat(d[1]) >= 5.5 && document.body.qa) {
- b.src = "/icons/blank.gif";
- b.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + c + "', sizingMethod='scale')"
- } else b.src = c
- }
- function R() {
- this.r = "";
- this.Qc = {};
- this.A = function(b) {
- b.appendChild(b.ownerDocument.createTextNode(this.r));
- this.r = ""
- }
- }
- function Rb(b, c) {
- b.Qc = c
- }
- R.prototype.reset = function() {
- this.o && this.o.reset();
- this.r = ""
- };
- function Sb(b, c) {
- b.r += c
- }
- function Tb(b, c, d) {
- this.o = b;
- this.A = function(e) {
- var f = this.r.match(Ub);
- if (f)
- for (var g = 0; g < f.length; g++)
- if (f[g].length == 1) this.o.r += f[g];
- else if (f[g].substring(0, 6).toLowerCase() == "irc://" && d && d.ircLink) {
- this.o.A(e);
- var h = e.ownerDocument.createElement("span");
- u({
- textDecoration: "underline",
- cursor: "pointer",
- outline: "none",
- color: c ? c.colorIRCLinks : "red"
- }, h.style);
- h.appendChild(e.ownerDocument.createTextNode(f[g]));
- h.onclick = function(p) {
- return function() {
- d.ircLink(p);
- h.blur();
- return false
- }
- }(f[g]);
- e.appendChild(h)
- } else {
- var k =
- false,
- l = null;
- if (this.Qc && this.Qc.links && this.Qc.links[f[g]]) l = this.Qc.links[f[g]];
- if (d && d.mediaCheck) {
- var j = d.mediaCheck(f[g]);
- if (j && j.P) {
- this.o.A(e);
- h = e.ownerDocument.createElement("img");
- u({
- border: "2px dotted #cc6",
- cursor: "pointer",
- width: j.le + "px",
- height: j.ke + "px"
- }, h.style);
- h.src = j.P;
- h.onclick = function(p, r, y) {
- return function() {
- d[y](p, r);
- return false
- }
- }(j.match, f[g], j.Cb);
- h.title = j.vd + " (" + f[g] + ")";
- e.appendChild(h);
- if (j.wd || l && l.id || l && l.idata) {
- var n = e.ownerDocument.createElement("img");
- n.style.height =
- "16px";
- n.style.width = "16px";
- n.style.paddingLeft = "2px";
- n.src = "https://s3.amazonaws.com/mibbit/gfx/information.png";
- if (l && l.id) {
- n.title = "Getting info...";
- h.id = l.id;
- n.id = l.id + "_i"
- } else {
- var o = "";
- for (var s in l.idata)
- if (l.idata.hasOwnProperty(s) && s != "thumb") o = o + s.toUpperCase() + ": " + l.idata[s] + " \n";
- n.title = o;
- h.title = o;
- if (l.idata.thumb) h.src = l.idata.thumb
- }
- e.appendChild(n)
- }
- k = true
- }
- }
- if (!k) {
- this.o.A(e);
- k = f[g];
- h = e.ownerDocument.createElement("a");
- h.href = l && l.url ? l.url : k;
- if (c && c.openLinksInExtra) h.onclick = function(p) {
- return function() {
- d.web(p);
- return false
- }
- }(f[g]);
- k = f[g];
- var w = k.indexOf("?");
- if (w != -1) k = k.substring(0, w);
- k = k.match(/^(.+)\.(jpg|jpeg|png|gif)$/i);
- n = e.ownerDocument.createTextNode(l && l.display ? l.display : f[g]);
- w = h;
- if (k && c && c.parseReplaceImages) {
- n = e.ownerDocument.createElement("img");
- n.style.width = c.parseReplaceImagesWidth + "px";
- n.style.height = c.parseReplaceImagesHeight + "px";
- n.src = l && l.id || l && l.idata ? "https://s3.amazonaws.com/mibbit/gfx/information.png" : Vb + "/" + c.parseReplaceImagesWidth + "x" + c.parseReplaceImagesHeight + "/" + f[g];
- w =
- n;
- h.onclick = function(p) {
- return function() {
- d.showImage(p);
- return false
- }
- }(f[g])
- }
- h.style.outline = "none";
- h.style.color = c ? h.id ? c.colorLinksWait : c.colorLinks : "blue";
- h.target = "_blank";
- h.title = l && l.hover ? l.hover : f[g] + " (new window)";
- o = false;
- if (d && d.mediaCheck)
- if (j = d.mediaCheck(f[g])) {
- h.onclick = function(p) {
- return function() {
- d[j.Cb](p);
- return false
- }
- }(f[g]);
- n = f[g];
- o = n.lastIndexOf("/");
- if (o != -1) n = n.substring(o + 1, n.length);
- n = e.ownerDocument.createTextNode(n);
- h.title = f[g] + " (View next to chat)";
- o = e.ownerDocument.createElement("img");
- o.style.height = "16px";
- o.style.width = "16px";
- o.src = "https://s3.amazonaws.com/mibbit/gfx/information.png";
- o.style.paddingLeft = "2px";
- o.title = j.re;
- o.onclick = h.onclick
- }
- h.appendChild(n);
- e.appendChild(h);
- o && e.appendChild(o);
- if (l && l.id || l && l.hover || l && l.idata) {
- n = e.ownerDocument.createElement("img");
- n.style.height = "16px";
- n.style.width = "16px";
- n.src = "https://s3.amazonaws.com/mibbit/gfx/information.png";
- n.style.paddingLeft = "2px";
- if (l && l.id) {
- n.title = "Getting info...";
- w.id = l.id;
- n.id = l.id + "_i"
- } else if (l && l.idata) {
- o =
- "";
- for (s in l.idata)
- if (l.idata.hasOwnProperty(s) && s != "thumb") o = o + s.toUpperCase() + ": " + l.idata[s] + " \n";
- n.title = o;
- h.title = o;
- if (l.idata.thumb && k && c && c.parseReplaceImages) w.src = l.idata.thumb
- } else n.title = h.title;
- e.appendChild(n)
- }
- }
- }
- this.o.A(e);
- this.r = ""
- }
- }
- Tb.prototype = new R;
- var Vb = "http://thumbnails.mibbit.com/unsafe",
- Ub = /((http[s]?:\/\/|ftp:\/\/|irc:\/\/)([0-9a-zA-Z\$\-\#\~\_\.\+\!\*\'\[\]\{\}\|\\\^\`\,\/\%\;\:\@\&\?\=]+))|(.+?)/gi;
- function Xb(b, c) {
- this.o = b;
- this.$c = c.iconSmileys;
- this.a = c;
- b = "";
- for (c = 0; c < this.$c.length; c++) {
- var d = this.$c[c].code;
- if (d != "") b += "(" + d.replace(/([\\\|\^\+\-\*\.\[\]\(\)\?\$\{\}\!\=\:])/g, "\\$1") + ")|"
- }
- this.Lg = new RegExp(b + "(.+?)", "g");
- this.A = function(e) {
- var f = this.r.match(this.Lg);
- if (f)
- for (var g = 0; g < f.length; g++)
- if (f[g].length == 1) this.o.r += f[g];
- else {
- this.o.A(e);
- for (var h = 0; h < this.$c.length; h++)
- if (f[g] == this.$c[h].code) {
- var k = e.ownerDocument.createElement("img");
- k.style.border = "0";
- k.style.height = this.a.sizeSmiliesToText ?
- "1em" : this.a.iconSmileysHeight ? this.a.iconSmileysHeight + "px" : "";
- k.style.width = this.a.sizeSmiliesToText ? "1em" : this.a.iconSmileysWidth ? this.a.iconSmileysWidth + "px" : "";
- k.src = this.a.iconSmileysBase + this.$c[h].src;
- h = e.ownerDocument.createElement("span");
- h.style.display = "none";
- h.appendChild(e.ownerDocument.createTextNode(f[g]));
- h.onclick = function(l, j) {
- return function() {
- var n = l.style.display == "none";
- l.style.display = n ? "inline" : "none";
- j.style.display = n ? "none" : "inline";
- return false
- }
- }(k, h);
- k.onclick = h.onclick;
- e.appendChild(k);
- e.appendChild(h);
- break
- }
- }
- this.o.A(e);
- this.r = ""
- }
- }
- Xb.prototype = new R;
- function Yb(b, c, d) {
- this.o = c;
- this.vf = b;
- this.Cg = d;
- this.A = function(e) {
- this.r.replace(/([^a-zA-Z0-9\_\|\-\[\]\\\`\^\{\}]*)([a-zA-Z0-9\_\|\-\[\]\\\`\^\{\}]*)([^a-zA-Z0-9\_\|\-\[\]\\\`\^\{\}]*)/g, function(f) {
- return function(g, h, k, l) {
- if (k && f.vf.hasOwnProperty(k.toLowerCase()) && f.vf[k.toLowerCase()]) {
- h && Sb(f.o, h);
- f.o.A(e);
- g = e.ownerDocument.createElement("span");
- f.Cg(k.toLowerCase(), g);
- g.appendChild(e.ownerDocument.createTextNode(k));
- e.appendChild(g);
- l && Sb(f.o, l)
- } else {
- k = (h ? h : "") + (k ? k : "") + (l ? l : "");
- k !== "" &&
- Sb(f.o, k)
- }
- }
- }(this));
- this.o.A(e);
- this.r = ""
- }
- }
- Yb.prototype = new R;
- function Zb(b, c, d) {
- this.o = c;
- this.A = function(e) {
- var f = this.r.match($b);
- if (f)
- for (var g = 0; g < f.length; g++)
- if (f[g].length == 1) this.o.r += f[g];
- else {
- this.o.A(e);
- var h = e.ownerDocument.createElement("span");
- u({
- color: d.colorChannels,
- cursor: "pointer",
- textDecoration: "underline",
- outline: "none"
- }, h.style);
- h.onclick = function(k) {
- return function() {
- b(k);
- return false
- }
- }(f[g]);
- h.appendChild(e.ownerDocument.createTextNode(f[g]));
- e.appendChild(h)
- }
- this.o.A(e);
- this.r = ""
- }
- }
- Zb.prototype = new R;
- var $b = /(\#([\S]+))|(.+?)/g;
- function ac(b) {
- this.o = b;
- this.A = function(c) {
- var d = this.r.match(bc);
- if (d)
- for (var e = 0; e < d.length; e++)
- if (d[e].length == 1) this.o.r += d[e];
- else {
- var f = "none",
- g = d[e].substring(0, 1),
- h = d[e].substring(d[e].length - 1, d[e].length);
- if (d[e].length > 2)
- if (g == "_" && h == "_") f = "underline";
- else if (g == "*" && h == "*") f = "bold";
- else if (g == "/" && h == "/") f = "italic";
- if (f == "none") this.o.r += d[e];
- else {
- this.o.A(c);
- g = c.ownerDocument.createElement("span");
- if (f == "italic") g.style.fontStyle = "italic";
- if (f == "underline") g.style.textDecoration = "underline";
- if (f == "bold") g.style.fontWeight = "bold";
- g.appendChild(c.ownerDocument.createTextNode(d[e]));
- c.appendChild(g)
- }
- }
- this.o.A(c);
- this.r = ""
- }
- }
- ac.prototype = new R;
- var bc = /([\/\_\*a-zA-Z0-9]+)|(.+?)/g;
- function cc(b) {
- this.o = b;
- this.kb = this.jb = false;
- this.Ca = this.Ga = null;
- this.be = {
- 0: "#ffffff",
- 1: "#000000",
- 2: "#000080",
- 3: "#008000",
- 4: "#ff0000",
- 5: "#800040",
- 6: "#800080",
- 7: "#ff8040",
- 8: "#ffff00",
- 9: "#80ff00",
- 10: "#008080",
- 11: "#00ffff",
- 12: "#0000ff",
- 13: "#ff00ff",
- 14: "#808080",
- 15: "#c0c0c0"
- };
- this.e = function(c) {
- var d = c;
- if (this.jb || this.kb || this.Ga !== null || this.Ca !== null) {
- d = c.ownerDocument.createElement("span");
- if (this.jb) d.style.fontWeight = "bold";
- if (this.kb) d.style.textDecoration = "underline";
- if (this.Ga) d.style.color =
- this.Ga;
- if (this.Ca) d.style.background = this.Ca;
- c.appendChild(d)
- }
- this.o.A(d)
- };
- this.reset = function() {
- this.kb = this.jb = false;
- this.Ca = this.Ga = null;
- this.r = this.Jg = "";
- this.o && this.o.reset()
- };
- this.A = function(c) {
- for (var d = this.r, e = 0; e < d.length; e++) {
- var f = d.charAt(e);
- if (f == "\u0003") {
- f = "";
- var g = 0,
- h = 0,
- k = false;
- if (e + 1 < d.length) {
- for (e++; e < d.length; e++) {
- var l = d.charAt(e);
- if (l >= "0" && l <= "9")
- if (!k && g == 2 || k && h == 2) {
- e--;
- break
- } else {
- f += l;
- if (k) h++;
- else g++
- }
- else if (l == ",") {
- if (k) {
- e--;
- break
- }
- f += l;
- k = true
- } else {
- e--;
- break
- }
- }
- this.e(c);
- f = f.split(",");
- g = true;
- if (typeof f[0] != "undefined" && f[0] !== "") {
- this.Ga = this.be[parseInt(f[0], 10) & 15];
- g = false
- }
- if (typeof f[1] != "undefined" && f[1] !== "") {
- this.Ca = this.be[parseInt(f[1], 10) & 15];
- g = false
- }
- if (g) this.Ga = this.Ca = null
- }
- } else if (f == "\u0002") {
- this.e(c);
- this.jb = !this.jb
- } else if (f == "\u001f") {
- this.e(c);
- this.kb = !this.kb
- } else if (f == "\u000f") {
- this.e(c);
- this.reset()
- } else this.o.r += f
- }
- this.e(c);
- this.r = ""
- }
- }
- cc.prototype = new R;
- function dc(b) {
- this.o = b;
- this.of = this.kb = this.jb = false;
- this.Ca = this.Ga = null;
- this.be = {
- 0: "#ffffff",
- 1: "#000000",
- 2: "#000080",
- 3: "#008000",
- 4: "#ff0000",
- 5: "#800040",
- 6: "#800080",
- 7: "#ff8040",
- 8: "#ffff00",
- 9: "#80ff00",
- 10: "#008080",
- 11: "#00ffff",
- 12: "#0000ff",
- 13: "#ff00ff",
- 14: "#808080",
- 15: "#c0c0c0"
- };
- this.e = function(c) {
- var d = c;
- if (this.jb || this.kb || this.Ga !== null || this.Ca !== null) {
- d = c.ownerDocument.createElement("span");
- if (this.jb) d.style.fontWeight = "bold";
- if (this.kb) d.style.textDecoration = "underline";
- if (this.of) d.style.fontStyle =
- "italic";
- if (this.Ga) d.style.color = this.Ga;
- if (this.Ca) d.style.background = this.Ca;
- c.appendChild(d)
- }
- this.o.A(d)
- };
- this.reset = function() {
- this.of = this.kb = this.jb = false;
- this.Ca = this.Ga = null;
- this.r = this.Jg = "";
- this.o && this.o.reset()
- };
- this.A = function(c) {
- for (var d = this.r, e = 0; e < d.length; e++) {
- var f = d.charAt(e);
- if (f == "\u001b") {
- e++;
- if (e < d.length && d.charAt(e) == "[") {
- f = "";
- for (e++; e < d.length;) {
- var g = d.charAt(e);
- if (g == "m") break;
- f += g;
- e++
- }
- }
- } else this.o.r += f
- }
- this.e(c);
- this.r = ""
- }
- }
- dc.prototype = new R;
- function ec(b, c, d) {
- this.a = c;
- this.p = b;
- this.d = b.ownerDocument;
- this.hf = d;
- this.e = [];
- this.fa = this.d.createElement("table");
- u({
- background: this.a.chatOutputBackground,
- tableLayout: "fixed",
- borderCollapse: "collapse",
- border: "0",
- width: "100%",
- height: "100%"
- }, this.fa.style);
- this.fa.setAttribute("cellpadding", "0");
- this.fa.setAttribute("cellspacing", "0");
- this.p.appendChild(this.fa);
- this.ee = {
- tb: function(e) {
- u({
- height: "1em",
- overflow: "hidden",
- fontFamily: "Arial, Helvetica, sans-serif",
- paddingBottom: "1px",
- paddingTop: "1px",
- paddingLeft: "3px",
- fontSize: "13px",
- borderTop: "1px solid #c8c8ff"
- }, e.style);
- e.setAttribute("valign", "top");
- e.appendChild(e.ownerDocument.createTextNode(" "))
- },
- oc: function(e) {
- u({
- background: "#cad69f",
- fontFamily: "Arial, Helvetica, sans-serif",
- fontSize: "11px",
- borderRight: "1px solid #888"
- }, e.style);
- e.appendChild(e.ownerDocument.createTextNode(" "))
- },
- pc: function(e) {
- u({
- background: "#e4eace",
- fontFamily: "Arial, Helvetica, sans-serif",
- fontSize: "11px",
- borderRight: "1px solid #888"
- }, e.style);
- e.appendChild(e.ownerDocument.createTextNode(" "))
- }
- }
- }
- ec.prototype.clear = function() {
- for (; this.fa.rows.length > 0;) {
- this.fa.deleteRow(0);
- this.e.shift()
- }
- };
- ec.prototype.z = function() {
- this.fa.style.background = this.a.chatOutputBackground;
- var b = this.e;
- for (this.e = []; this.fa.rows.length > 0;) this.fa.deleteRow(0);
- for (var c = 0; c < b.length; c++)
- if (b[c].Ef) fc(this, b[c].id, b[c].Ef, b[c].Cb);
- else b[c].Ye ? gc(this, b[c].id, b[c].Ye) : this.jd(b[c].id)
- };
- function hc(b, c) {
- for (var d = c + " ", e = 0; e < b.e.length; e++)
- if (b.e[e].id.substring(0, d.length) == d || b.e[e].id == c) {
- b.fa.deleteRow(e);
- b.e.splice(e, 1);
- e--
- }
- }
- function ic(b, c, d) {
- for (var e = c + " ", f = 0; f < b.e.length; f++)
- if (b.e[f].id.substring(0, e.length) == e || b.e[f].id == c) u(d, b.e[f].jg.style)
- }
- function jc(b) {
- var c = 1 + (b.a.chatOutputShowTimes ? 1 : 0) + (b.a.chatOutputShowNicks ? 1 : 0);
- if (b.a.chatOutputMaxLines != 0)
- for (; b.fa.rows.length > 0;) {
- if (b.fa.rows[0].cells.length == c && b.fa.rows.length < b.a.chatOutputMaxLines) break;
- b.fa.deleteRow(0);
- b.e.shift()
- }
- }
- ec.prototype.jd = function(b) {
- var c = this.fa.insertRow(-1);
- this.e.push({
- id: "" + b
- });
- b = c.insertCell(-1);
- if (kc) b.style.paddingRight = "15px";
- b.colSpan = 1 + (this.a.chatOutputShowTimes ? 1 : 0) + (this.a.chatOutputShowNicks ? 1 : 0);
- b.style.borderTop = "1px solid red";
- jc(this)
- };
- function gc(b, c, d, e) {
- function f(l, j, n) {
- try {
- l.style[j] = n
- } catch (o) {}
- }
- var g = b.fa.insertRow(-1);
- if (e) g.style.display = "none";
- var h, k;
- if (b.a.chatOutputRTL) {
- e = g.insertCell(-1);
- if (b.a.chatOutputShowNicks) k = g.insertCell(-1);
- if (b.a.chatOutputShowTimes) h = g.insertCell(-1)
- } else {
- if (b.a.chatOutputShowTimes) h = g.insertCell(-1);
- if (b.a.chatOutputShowNicks) k = g.insertCell(-1);
- e = g.insertCell(-1)
- }
- b.e.push({
- id: "" + c,
- Ye: d,
- jg: e,
- Jh: g
- });
- if (b.a.chatOutputShowTimes) {
- h.style.width = b.a.chatOutputTimeWidth + "px";
- h.style.overflow = "hidden";
- d && d.pc ? d.pc(h) : b.ee.pc(h)
- }
- if (b.a.chatOutputShowNicks) {
- k.style.width = b.a.chatOutputNickWidth + "px";
- k.style.overflow = "hidden";
- f(k, "wordWrap", "break-word");
- d && d.oc ? d.oc(k) : b.ee.oc(k)
- }
- if (kc) e.style.paddingRight = "15px";
- f(e, "whiteSpace", "pre-wrap");
- f(e, "whiteSpace", "-moz-pre-wrap");
- f(e, "whiteSpace", "-pre-wrap");
- f(e, "whiteSpace", "-o-pre-wrap");
- f(e, "wordWrap", "break-word");
- d ? d.tb(e) : b.ee.tb(e);
- jc(b)
- }
- function fc(b, c, d, e) {
- var f = b.fa.insertRow(-1);
- b.e.push({
- id: "" + c,
- Ef: d,
- Cb: e
- });
- f = f.insertCell(-1);
- if (kc) f.style.paddingRight = "15px";
- f.colSpan = 1 + (b.a.chatOutputShowTimes ? 1 : 0) + (b.a.chatOutputShowNicks ? 1 : 0);
- u({
- borderTop: "1px solid " + b.a.chatPaneBorder,
- borderBottom: "1px solid " + b.a.chatPaneBorder,
- padding: "3px"
- }, f.style);
- var g = b.d.createElement("div");
- if (kc) g.style.marginRight = "15px";
- f.appendChild(g);
- d(g);
- d = b.d.createElement("div");
- if (kc) d.style.marginRight = "15px";
- d.style.textAlign = "right";
- g = b.d.createElement("img");
- D(g, "https://s3.amazonaws.com/mibbit/gfx/close-win-red.png", 12, 12);
- g.border = 0;
- g.style.marginRight = "4px";
- g.style.cursor = "pointer";
- g.title = E.g("ChatOutputRemove");
- g.onclick = function(h) {
- return function() {
- try {
- hc(h, c);
- h.hf && h.hf();
- e && e()
- } catch (k) {}
- return false
- }
- }(b);
- d.appendChild(g);
- f.appendChild(d);
- jc(b)
- }
- function lc(b, c, d, e, f, g, h, k, l, j) {
- u({
- overflow: "hidden",
- fontFamily: d.chatFontFamily,
- paddingBottom: d.chatPaddingBottom + "px",
- paddingTop: d.chatPaddingTop + "px",
- paddingLeft: "3px",
- fontSize: d.chatFontSize + "px",
- color: h,
- background: d.chatBackground,
- verticalAlign: "bottom"
- }, c.style);
- if (d.chatBackgroundLines != "") c.style.borderTop = "1px solid " + d.chatBackgroundLines;
- c.setAttribute("valign", "top");
- if (d.chatOutputRTL) c.style.direction = "rtl";
- var n;
- if (!d.chatOutputShowNicks) {
- n = c.ownerDocument.createElement("span");
- if (d.chatBackgroundHighlight) {
- n.onmouseover =
- function(s) {
- return function() {
- e && ic(s, e.toLowerCase(), {
- background: d.chatBackgroundHighlight
- })
- }
- }(b);
- n.onmouseout = function(s) {
- return function() {
- e && ic(s, e.toLowerCase(), {
- background: d.chatBackground
- })
- }
- }(b)
- }
- if (g) n.onclick = function() {
- g(e)
- };
- u({
- fontFamily: d.nickFontFamily,
- fontSize: d.nickFontSize + "px",
- color: f
- }, n.style);
- e && n.appendChild(c.ownerDocument.createTextNode(d.chatOutputNickLeft + e + d.chatOutputNickRight))
- }
- n && !d.chatOutputRTL && c.appendChild(n);
- if (l) try {
- k.reset();
- j && Rb(k, j);
- k.r += l;
- k.A(c)
- } catch (o) {
- x &&
- A("Renderer", "Render error " + o, C)
- } else c.style.height = "1em";
- n && d.chatOutputRTL && c.appendChild(n)
- }
- ec.prototype.oc = function(b, c, d, e, f) {
- u({
- overflow: "hidden",
- fontFamily: c.nickFontFamily,
- paddingBottom: c.chatPaddingBottom + "px",
- paddingTop: c.chatPaddingTop + "px",
- paddingRight: "3px",
- fontSize: c.nickFontSize + "px",
- background: c.nickBackground,
- color: e
- }, b.style);
- if (f) b.onclick = function() {
- f(d)
- };
- if (c.chatBackgroundLines != "") b.style.borderTop = "1px solid " + c.nickBackground;
- if (c.nickBorderRight)
- if (c.chatOutputRTL) b.style.borderLeft = "1px solid " + c.nickBorderRight;
- else b.style.borderRight = "1px solid " + c.nickBorderRight;
- b.setAttribute("align", c.chatOutputRTL ? "left" : "right");
- b.setAttribute("valign", c.nickVerticalAlign);
- if (c.chatOutputRTL) b.style.direction = "rtl";
- b.appendChild(b.ownerDocument.createTextNode(d ? d : " "));
- if (c.chatBackgroundHighlight) {
- b.onmouseover = function(g) {
- return function() {
- d && ic(g, d.toLowerCase(), {
- background: c.chatBackgroundHighlight
- })
- }
- }(this);
- b.onmouseout = function(g) {
- return function() {
- d && ic(g, d.toLowerCase(), {
- background: c.chatBackground
- })
- }
- }(this)
- }
- };
- ec.prototype.pc = function(b, c, d) {
- function e(j, n, o) {
- for (j = "" + j; j.length < n;) j = o + j;
- return j
- }
- function f(j, n) {
- n = n.replace(/%H/g, e(j.getHours(), 2, "0"));
- n = n.replace(/%I/g, e(j.getHours() % 12 || 12, 2, "0"));
- n = n.replace(/%k/g, e(j.getHours(), 2, " "));
- n = n.replace(/%l/g, e(j.getHours() % 12 || 12, 2, " "));
- n = n.replace(/%M/g, e(j.getMinutes(), 2, "0"));
- n = n.replace(/%p/g, j.getHours() > 11 ? "PM" : "AM");
- n = n.replace(/%P/g, j.getHours() > 11 ? "pm" : "am");
- n = n.replace(/%S/g, e(j.getSeconds(), 2, "0"));
- n = n.replace(/%Y/g, j.getFullYear());
- n = n.replace(/%y/g,
- e(j.getYear() % 100, 2, "0"));
- n = n.replace(/%m/g, e(j.getMonth() + 1, 2, "0"));
- n = n.replace(/%b/g, g[j.getMonth()].substring(0, 3));
- n = n.replace(/%B/g, g[j.getMonth()]);
- n = n.replace(/%a/g, h[j.getDay()].substring(0, 3));
- n = n.replace(/%A/g, h[j.getDay()]);
- n = n.replace(/%d/g, e(j.getDate(), 2, "0"));
- n = n.replace(/%e/g, e(j.getDate(), 2, " "));
- return n = n.replace(/%%/g, "%")
- }
- u({
- overflow: "hidden",
- fontFamily: c.timeFontFamily,
- paddingBottom: c.chatPaddingBottom + "px",
- paddingTop: c.chatPaddingTop + "px",
- paddingLeft: "2px",
- fontSize: c.timeFontSize +
- "px",
- color: c.timeColor,
- background: c.timeBackground
- }, b.style);
- if (c.chatBackgroundLines != "") b.style.borderTop = "1px solid " + c.timeBackground;
- if (c.timeBorderRight)
- if (c.chatOutputRTL) b.style.borderLeft = "1px solid " + c.timeBorderRight;
- else b.style.borderRight = "1px solid " + c.timeBorderRight;
- b.setAttribute("align", c.chatOutputRTL ? "right" : "left");
- b.setAttribute("valign", c.nickVerticalAlign);
- if (c.chatOutputRTL) b.style.direction = "rtl";
- var g = ["January", "February", "March", "April", "May", "June", "July", "August", "September",
- "October", "November", "December"
- ],
- h = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
- if (d) {
- var k = new Date;
- k.setTime(d);
- d = new Date;
- var l = "";
- l = k.getYear() == d.getYear() && k.getMonth() == d.getMonth() && k.getDate() == d.getDate() ? f(k, c.formatTime) : f(k, c.formatDate);
- b.appendChild(b.ownerDocument.createTextNode(l))
- } else b.appendChild(b.ownerDocument.createTextNode(" "))
- };
- function mc(b, c, d) {
- this.element = b;
- this.d = b.ownerDocument;
- this.a = c;
- this.Bh = d;
- this.Bd = false
- }
- function nc(b, c) {
- if (b.Bd) b.Hc.style.display = c ? "none" : "block"
- }
- function oc(b, c, d, e) {
- b.clear();
- if (!e) {
- var f = b.d.createElement("div");
- u({
- textAlign: "right",
- overflow: "hidden",
- height: "15px",
- borderBottom: "1px solid #000",
- padding: "4px",
- fontSize: "13px",
- fontWeight: "bold",
- background: "#ccc"
- }, f.style);
- var g = b.d.createElement("span");
- u({
- color: "#222",
- cursor: "pointer",
- textDecoration: "underline"
- }, g.style);
- g.onclick = function(k) {
- return function() {
- k.clear();
- d();
- return false
- }
- }(b);
- g.appendChild(b.d.createTextNode("Close"));
- if (c) {
- var h = b.d.createElement("a");
- h.style.color = "#222";
- h.href = c;
- h.target = "_blank";
- h.appendChild(b.d.createTextNode("Pop out"));
- h.onclick = function(k) {
- return function() {
- k.clear();
- d();
- return true
- }
- }(b);
- f.appendChild(h);
- f.appendChild(b.d.createTextNode(" | "))
- }
- f.appendChild(g);
- b.element.appendChild(f)
- }
- b.Hc = b.d.createElement("div");
- u({
- position: "absolute",
- top: "24px",
- bottom: "0px",
- left: "0px",
- right: "0px"
- }, b.Hc.style);
- if (e) b.Hc.style.top = "0px";
- b.element.appendChild(b.Hc);
- return b.Hc
- }
- mc.prototype.clear = function() {
- for (; this.element.firstChild;) this.element.removeChild(this.element.firstChild)
- };
- function pc(b, c, d, e) {
- b.Bd = true;
- d = oc(b, c, d, e);
- b.T = b.d.createElement("iframe");
- b.T.style.width = "100%";
- b.T.style.height = "100%";
- b.T.style.minHeight = "100%";
- d.appendChild(b.T);
- b.T.src = c
- }
- function qc(b, c, d) {
- pc(b, "https://docs.google.com/viewer?url=" + encodeURIComponent(c) + "&embedded=true", d)
- }
- mc.prototype.Ae = function(b) {
- try {
- this.T.contentWindow.mibbit_recv(b)
- } catch (c) {}
- };
- function rc(b, c, d, e) {
- b.Bd = false;
- b = oc(b, d, e);
- d = 100;
- e = 81;
- try {
- if (b.offsetWidth / b.offsetHeight < 425 / 344) {
- d = b.offsetWidth;
- e = Math.floor(d * 344 / 425)
- } else {
- e = b.offsetHeight;
- d = Math.floor(e * 425 / 344)
- }
- } catch (f) {}
- b.style.textAlign = "center";
- b.innerHTML = '<object style="margin:auto" width="' + d + '" height="' + e + '"><param name="movie" value="https://www.youtube.com/v/' + c + '&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="https://www.youtube.com/v/' + c + '&hl=en&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="' +
- d + '" height="' + e + '"></embed></object>'
- }
- function sc(b, c, d) {
- b.Bd = false;
- var e = oc(b, c, d),
- f = b.d.createElement("img");
- e.style.textAlign = "center";
- e.appendChild(f);
- f.onload = function() {
- return function() {
- if (f.width > e.offsetWidth || f.height > e.offsetHeight) try {
- if (e.offsetWidth / e.offsetHeight > f.width / f.height) {
- f.style.width = "auto";
- f.style.height = "100%"
- } else {
- f.style.width = "100%";
- f.style.height = "auto"
- }
- } catch (g) {}
- }
- }();
- f.src = c
- }
- function tc(b) {
- this.p = b;
- this.d = b.ownerDocument;
- this.id = tc.kh++;
- this.loaded = false;
- this.T = this.d.createElement("iframe");
- this.T.attachEvent ? this.T.attachEvent("onload", function(c) {
- return function() {
- uc(c)
- }
- }(this)) : this.T.addEventListener("load", function(c) {
- return function() {
- uc(c)
- }
- }(this), false);
- this.T.style.width = "100%";
- this.T.style.height = "100%";
- this.T.frameBorder = "0";
- b.appendChild(this.T)
- }
- function uc(b) {
- b.me = b.T.contentDocument ? b.T.contentDocument : b.T.contentWindow ? b.T.contentWindow.document : null;
- if (b.me != null) try {
- b.me.designMode = "on";
- b.loaded = true;
- b.T.contentWindow.focus()
- } catch (c) {
- x && A("PasteBin", "Can't set designMode", C)
- } else x && A("PasteBin", "Can't find doc...", C)
- }
- tc.prototype.Kd = function(b) {
- this.p.style.display = b ? "block" : "none";
- if (b) {
- if (!this.loaded) this.T.src = "/e.html";
- window.setTimeout(function(c) {
- return function() {
- c.loaded || uc(c)
- }
- }(this), 100)
- }
- };
- tc.prototype.vb = function() {
- return this.p.style.display == "block"
- };
- tc.prototype.value = function() {
- var b = this.me.body.innerHTML;
- b = b.replace(/<br>/gi, "\n");
- b = b.replace(/<p>/i, "");
- b = b.replace(/<p>/gi, "\n");
- b = b.replace(/<\/td>/gi, "\t");
- b = b.replace(/<\/tr>/gi, "\n");
- b = b.replace(/<\/div>/gi, "\n");
- b = b.replace(/<\/pre>/gi, "\n");
- b = b.replace(/<.*?>/g, "");
- b = b.replace(/ /gi, " ");
- b = b.replace(/</gi, "<");
- b = b.replace(/>/gi, ">");
- return b = b.replace(/&/gi, "&")
- };
- function vc(b) {
- u({
- overflow: "hidden",
- fontFamily: "Arial,Helvetica,sans-serif",
- paddingBottom: "1px",
- paddingTop: "1px",
- paddingLeft: "3px",
- fontSize: "13px",
- borderTop: "1px solid #c8c8ff"
- }, b.style);
- b.setAttribute("valign", "top");
- var c = b.ownerDocument,
- d = c.createElement("table");
- u({
- padding: "2px",
- border: "1px solid #444",
- background: "#cce",
- fontSize: "11px"
- }, d.style);
- d.border = 0;
- d.setAttribute("border", "0");
- d.setAttribute("cellpadding", "2");
- d.setAttribute("cellspacing", "0");
- var e = d.insertRow(-1);
- u({
- background: "#aac",
- borderBottom: "1px solid #444"
- }, e.style);
- e = e.insertCell(-1);
- e.setAttribute("colspan", "2");
- e.colSpan = "2";
- u({
- fontWeight: "bold",
- fontSize: "13px",
- textAlign: "center"
- }, e.style);
- e.appendChild(c.createTextNode("Mibbit help"));
- e = {
- help: "Display this help",
- clear: "Clear the chat output in this channel",
- "query nick [msg]": "Open a PM to a user, with an optional message",
- "ignore nick": "Ignore the user in this channel",
- "unignore nick": "Unignore the user in this channel",
- ulshow: "Show the user list",
- ulhide: "Hide the user list",
- "showurl url": "Show a url/media next to the chat",
- pastebin: "Show the pastebin",
- "server addr [nick]": "Connect to another server"
- };
- for (var f in e)
- if (e.hasOwnProperty(f) && e.hasOwnProperty(f)) {
- var g = d.insertRow(-1),
- h = g.insertCell(-1);
- h.setAttribute("valign", "top");
- h.appendChild(c.createTextNode("/" + f));
- h.style.color = "green";
- h.style.paddingRight = "2px";
- g = g.insertCell(-1);
- g.setAttribute("valign", "top");
- g.appendChild(c.createTextNode(e[f]));
- g.style.color = "#444"
- }
- c = c.createElement("div");
- c.style.border = "none";
- c.style.padding = "5px";
- c.appendChild(d);
- b.appendChild(c)
- }
- function wc(b, c, d) {
- return function(e) {
- u({
- overflow: "hidden",
- fontFamily: "Arial, Helvetica, sans-serif",
- paddingBottom: "1px",
- paddingTop: "1px",
- paddingLeft: "3px",
- borderTop: "1px solid #c8c8ff"
- }, e.style);
- e.setAttribute("valign", "top");
- var f = e.ownerDocument,
- g = f.createElement("table");
- g.border = 0;
- g.setAttribute("border", "0");
- g.setAttribute("cellpadding", "0");
- g.setAttribute("cellspacing", "0");
- u({
- fontSize: c.chatFontSize + "px",
- width: "100%",
- background: "#bbb",
- border: "1px solid #222"
- }, g.style);
- var h = g.insertRow(-1);
- h.style.borderBottom = "1px solid #222";
- var k = h.insertCell(-1);
- k.colSpan = "2";
- u({
- fontWeight: "bold",
- fontSize: "17px",
- color: "#6cb12a",
- padding: "2px",
- background: "url(https://s3.amazonaws.com/mibbit/gfx/bottom-bg.png)"
- }, k.style);
- h = f.createElement("img");
- h.style.marginRight = "4px";
- D(h, "https://s3.amazonaws.com/mibbit/gfx/magnifier.png", 16, 16);
- k.appendChild(h);
- k.appendChild(f.createTextNode("Whois " + b.nick + "?"));
- var l = g.insertRow(-1),
- j = l.insertCell(-1);
- j.setAttribute("valign", "top");
- j.style.borderRight = "1px solid #222";
- j.style.width = "64px";
- h = f.createElement("img");
- h.style.margin = "4px";
- D(h, "https://s3.amazonaws.com/mibbit/gfx/user" + (b.mibbituser ? "_green" : "") + ".png", 64, 64);
- j.appendChild(h);
- j = l.insertCell(-1);
- j.setAttribute("valign", "top");
- var n = f.createElement("table");
- j.appendChild(n);
- var o = {
- nick: "Nickname",
- user: "Username",
- host: "Hostname",
- realip: "IP",
- realhost: "Host",
- idd: "Identified",
- realname: "Real name",
- away: "Away message",
- server: "Server",
- ssl: "SSL",
- modes: "Modes",
- help: "Help",
- operator: "Operator",
- serverinfo: "Server info",
- idle: "Idle time",
- channels: "Channels",
- client: "IRC Client",
- browser: "Browser",
- backend: "Backend",
- connectip: "Connect IP"
- };
- for (var s in o)
- if (o.hasOwnProperty(s) && b.hasOwnProperty(s)) {
- var w = o[s],
- p = n.insertRow(-1),
- r = p.insertCell(-1);
- p = p.insertCell(-1);
- r.setAttribute("valign", "top");
- r.style.whiteSpace = "nowrap";
- p.setAttribute("valign", "top");
- r.appendChild(f.createTextNode(w + ":"));
- r.style.color = "#464";
- r.style.textAlign = "right";
- r.style.paddingRight = "2px";
- d.reset();
- d.r += b[s];
- d.A(p)
- }
- if (b.mibbituser) {
- k.colSpan =
- "3";
- j.style.borderRight = "1px solid #222";
- j.style.width = "45%";
- r = l.insertCell(-1);
- r.setAttribute("valign", "top");
- var y = f.createElement("table");
- r.appendChild(y);
- function z(P, N) {
- var I = y.insertRow(-1),
- J = I.insertCell(-1);
- I = I.insertCell(-1);
- J.setAttribute("valign", "top");
- J.appendChild(f.createTextNode(P + ":"));
- J.style.color = "#464";
- J.style.textAlign = "right";
- J.style.paddingRight = "2px";
- J.style.whiteSpace = "nowrap";
- I.setAttribute("valign", "top");
- I.style.color = "#000";
- I.appendChild(f.createTextNode(N))
- }
- function B(P,
- N) {
- var I = y.insertRow(-1),
- J = I.insertCell(-1);
- I = I.insertCell(-1);
- J.setAttribute("valign", "top");
- J.appendChild(f.createTextNode(P + ":"));
- J.style.color = "#464";
- J.style.textAlign = "right";
- J.style.paddingRight = "2px";
- J.style.whiteSpace = "nowrap";
- I.setAttribute("valign", "top");
- I.style.color = "#000";
- P = f.createElement("a");
- P.href = N;
- P.target = "_blank";
- P.style.color = "blue";
- P.appendChild(f.createTextNode(N));
- I.appendChild(P)
- }
- b.mibbitusername && z("Mibbit username", b.mibbitusername);
- z("On Mibbit for", b.onlinetime);
- b.cc &&
- z("Country", b.cc);
- if (b.ct && b.tz) {
- function H(P) {
- return ("00" + P).substr(-2)
- }
- k = new Date(parseInt(b.ct));
- k = H(k.getUTCHours()) + ":" + H(k.getUTCMinutes()) + ":" + H(k.getUTCSeconds());
- l = "+";
- if (b.tz < 0) {
- l = "-";
- b.tz = -b.tz
- }
- j = H(Math.floor(b.tz / 60));
- n = H(b.tz - 60 * j);
- z("Local time", k + " UTC" + l + j + n)
- }
- b.embed && z("Mibbit client", "Widget");
- b.premium && z("Premium", "Yes");
- if (b.profile) {
- k = {
- sex: "Sex",
- age: "Age",
- location: "Location",
- homepage: "Web site"
- };
- l = ba(b.profile);
- for (s in k)
- if (k.hasOwnProperty(s) && l.hasOwnProperty(s)) s == "homepage" ?
- B(k[s], l[s]) : z(k[s], l[s]);
- if (l.avatar) h.src = l.avatar
- }
- }
- s = f.createElement("div");
- s.style.border = "none";
- s.style.padding = "5px";
- s.appendChild(g);
- e.appendChild(s)
- }
- }
- function xc(b, c) {
- return function(d) {
- d.setAttribute("valign", "top");
- u({
- overflow: "hidden",
- fontFamily: "Arial, Helvetica, sans-serif",
- paddingBottom: "1px",
- paddingTop: "1px",
- paddingLeft: "3px",
- fontSize: "13px",
- borderTop: "1px solid #c8c8ff"
- }, d.style);
- var e = d.ownerDocument,
- f = e.createElement("table");
- u({
- border: "1px solid #222",
- background: "#bbb",
- width: "100%"
- }, f.style);
- f.border = 0;
- f.setAttribute("border", "0");
- f.setAttribute("cellpadding", "0");
- f.setAttribute("cellspacing", "0");
- var g = f.insertRow(-1);
- g.style.borderBottom =
- "1px solid #222";
- g = g.insertCell(-1);
- u({
- fontWeight: "bold",
- fontSize: "17px",
- color: "#ff0",
- padding: "2px",
- background: "url(https://s3.amazonaws.com/mibbit/gfx/bottom-bg.png)"
- }, g.style);
- var h = e.createElement("img");
- h.style.marginRight = "4px";
- D(h, "https://s3.amazonaws.com/mibbit/gfx/exclamation.png", 16, 16);
- g.appendChild(h);
- g.appendChild(e.createTextNode("Global message from Mibbit"));
- h = e.createElement("span");
- h.style.fontSize = "13px";
- h.style.color = "#ddd";
- h.appendChild(e.createTextNode(" (" + (new Date).toString() +
- ")"));
- g.appendChild(h);
- g = f.insertRow(-1).insertCell(-1);
- g.style.padding = "4px";
- g.style.fontSize = "15px";
- c.reset();
- c.r += b;
- c.A(g);
- e = e.createElement("div");
- e.style.border = "none";
- e.style.padding = "5px";
- e.appendChild(f);
- d.appendChild(e)
- }
- }
- function yc(b, c, d) {
- return function(e) {
- try {
- u({
- overflow: "hidden",
- fontFamily: c.chatFontFamily,
- paddingBottom: c.chatPaddingBottom + "px",
- paddingTop: c.chatPaddingTop + "px",
- paddingLeft: "3px",
- fontSize: c.chatFontSize + "px",
- color: c.colorBan,
- background: c.chatBackground
- }, e.style);
- if (c.chatBackgroundLines != "") e.style.borderTop = "1px solid " + c.chatBackgroundLines;
- e.setAttribute("valign", "top");
- var f = e.ownerDocument;
- if (d) {
- var g = f.createElement("img");
- D(g, "https://s3.amazonaws.com/mibbit/gfx/close-win-red.png", 12, 12);
- g.style.marginRight = "4px";
- g.border = 0;
- g.title = "Remove ban";
- g.style.cursor = "pointer";
- g.onclick = function(o) {
- return function() {
- d(o);
- return false
- }
- }(b.mask);
- e.appendChild(g)
- }
- var h = f.createElement("span");
- h.appendChild(f.createTextNode(b.mask + " "));
- e.appendChild(h);
- var k = f.createElement("span");
- k.style.color = "#888";
- k.appendChild(f.createTextNode(b.who + " "));
- e.appendChild(k);
- var l = new Date;
- l.setTime(b.ctime * 1E3);
- var j = f.createElement("span");
- j.style.color = "#9c9";
- j.appendChild(f.createTextNode("(" + l + ") "));
- e.appendChild(j)
- } catch (n) {
- x && A("BanListRenderer", n, C)
- }
- }
- }
- function zc(b, c) {
- this.URL = b;
- this.hb = c;
- this.onerror = q();
- this.s = Ac();
- this.Yc = null;
- this.Xc = this.$b = 0;
- this.tc = this.Ff = null;
- this.Lb = [];
- this.Za = null;
- this.Of = this.Pf = this.fh = this.Nf = this.Mf = this.Wc = 0
- }
- function Ac() {
- if (window.XMLHttpRequest) return new XMLHttpRequest;
- else if (window.ActiveXObject) try {
- return new ActiveXObject("Msxml2.XMLHTTP")
- } catch (b) {
- try {
- return new ActiveXObject("Microsoft.XMLHTTP")
- } catch (c) {}
- }
- alert("Giving up :( Cannot create an XMLHTTP instance");
- return false
- }
- function Bc(b) {
- function c(d, e) {
- try {
- b.setRequestHeader(d, e)
- } catch (f) {}
- }
- if (!zc.jh) {
- c("User-Agent", null);
- c("Accept", null);
- c("Accept-Language", null);
- c("Content-Type", "M;");
- c("Cookie", null);
- c("Connection", "keep-alive");
- c("Keep-Alive", null)
- }
- }
- zc.prototype.G = function(b) {
- b = t(b) + "\n";
- var c = encodeURIComponent(b).replace(/%../g, "x").length;
- if (c > 64E3) this.onerror("That packet will never get through! Too big. (MAX_POST_LEN=64000)");
- else {
- this.Lb.push({
- data: b,
- size: c,
- stime: (new Date).getTime()
- });
- this.Yc || this.Za || this.Na(200)
- }
- };
- function Cc(b) {
- if (!(b.Yc || b.Lb.length === 0)) try {
- b.Yc = "Sending...";
- b.s.abort();
- b.s.onreadystatechange = function(h) {
- return function() {
- h.Pe()
- }
- }(b);
- try {
- b.s.onerror = function(h) {
- return function() {
- h.Qe()
- }
- }(b)
- } catch (c) {}
- b.s.open("POST", b.URL + "-s" + (b.Pa == "" ? "" : "-" + b.Pa), true);
- Bc(b.s);
- b.Xc = "";
- for (var d = b.$b = 0, e = 0; e < b.Lb.length; e++) {
- if (d + b.Lb[e].size > 64E3) break;
- var f = b.Lb[e].data;
- f = '{"seq":' + b.Wc + "," + f.substring(1, f.length);
- b.Wc++;
- b.Xc += f;
- b.$b++;
- d += b.Lb[e].size
- }
- b.onerror("Sending " + b.$b + " packets... Length=" +
- b.Xc.length + " Size=" + d);
- b.s.send(b.Xc);
- b.Ff = (new Date).getTime();
- b.tc = window.setTimeout(function(h) {
- return function() {
- h.onerror("Timer: retrying...");
- h.Na(5E3)
- }
- }(b), 12E4);
- b.Mf++
- } catch (g) {
- b.onerror("flushSend error: " + g);
- b.Na(5E3)
- }
- }
- zc.prototype.Na = function(b) {
- this.onerror("Retry(" + b + ")");
- this.Za && window.clearTimeout(this.Za);
- if (this.tc) {
- window.clearTimeout(this.tc);
- this.tc = null
- }
- if (this.s) try {
- this.s.abort()
- } catch (c) {}
- this.s = Ac();
- this.Yc = null;
- this.Za = window.setTimeout(function(d) {
- return function() {
- d.Za = null;
- Cc(d)
- }
- }(this), b)
- };
- zc.prototype.Qe = function() {
- this.onerror("xhrError was called!");
- this.Na(5E3)
- };
- zc.prototype.Pe = function() {
- this.onerror("xhrChange...");
- try {
- if (this.s.readyState == 4) {
- if (this.s.status == 200) {
- try {
- this.hb.psh && this.hb.psh(this.$b)
- } catch (b) {}
- this.Pf += this.$b;
- for (var c = 0; c < this.$b; c++) this.Lb.shift();
- this.$b = 0;
- window.clearTimeout(this.tc);
- this.tc = null;
- var d = (new Date).getTime() - this.Ff;
- this.hb.recv(this.s.responseText);
- this.Nf++;
- this.fh += d;
- this.Of += this.Xc.length
- } else throw new Error("Server status " + this.s.status);
- this.Yc = null;
- Cc(this)
- }
- } catch (e) {
- this.onerror("xhrChange Exception " +
- e);
- this.Na(5E3)
- }
- };
- zc.prototype.reset = function() {
- this.onerror("reset called");
- this.Wc = 0;
- this.Lb = []
- };
- function Dc(b, c) {
- this.URL = b;
- this.Pa = "";
- this.Fh = (new Date).getTime();
- this.Le = false;
- this.onerror = q();
- this.hb = c;
- this.O = [];
- this.sb = [];
- this.s = Ec();
- this.Td = false;
- this.Be = this.sc = this.rc = null;
- this.wa = [];
- this.Zb = 0;
- this.Nd = null;
- this.Ce = 0;
- this.Za = null;
- this.Sc = this.Oa = false;
- this.$g = this.ah = this.eh = this.dh = this.bh = 0
- }
- Dc.prototype.reset = function() {
- this.Pa = ""
- };
- Dc.prototype.stop = function() {
- if (this.Oa != false) {
- this.Gh = (new Date).getTime();
- this.Oa = false;
- try {
- for (var b in this.O) this.O.hasOwnProperty(b) && this.O[b].close && this.O[b].close();
- this.rc && this.s.abort();
- var c = Ec();
- c.open("POST", this.URL + "-s" + (this.Pa == "" ? "" : "-" + this.Pa), false);
- c.send('{"cmd":"shutdown"}\n')
- } catch (d) {
- this.onerror("Shutdown failed " + d)
- }
- }
- };
- function Fc(b, c) {
- if (c != b.Sc) {
- for (var d in b.O)
- if (b.O.hasOwnProperty(d)) try {
- c ? b.O[d].Sc() : Gc(b.O[d])
- } catch (e) {}
- b.Sc = c;
- try {
- b.hb.ooh(c)
- } catch (f) {}
- }
- }
- function Ec() {
- if (window.XMLHttpRequest) return new XMLHttpRequest;
- else if (window.ActiveXObject) try {
- return new ActiveXObject("Msxml2.XMLHTTP")
- } catch (b) {
- try {
- return new ActiveXObject("Microsoft.XMLHTTP")
- } catch (c) {}
- }
- alert("Giving up :( Cannot create an XMLHTTP instance");
- return false
- }
- Dc.prototype.start = function() {
- this.onerror("Starting...");
- if (this.Oa) this.onerror("Already running...");
- else {
- this.Oa = true;
- Hc(this)
- }
- };
- function Hc(b) {
- if (b.Ce > 5) b.onerror("Session changes not sticking!");
- else if (!b.rc) {
- b.onerror("Sending new request...");
- b.s = Ec();
- try {
- b.rc = "Requesting...";
- b.Td = false;
- b.s.onreadystatechange = function(e) {
- return function() {
- e.Pe()
- }
- }(b);
- try {
- b.s.onerror = function(e) {
- return function() {
- e.Qe()
- }
- }(b)
- } catch (c) {}
- b.s.open("POST", b.URL + "-r" + (b.Pa == "" ? "" : "-" + b.Pa), true);
- Bc(b.s);
- b.s.send("{}");
- b.Be = (new Date).getTime();
- b.sc = window.setTimeout(function(e) {
- return function() {
- e.onerror("Recv timed out");
- Fc(e, false);
- e.Na()
- }
- }(b),
- 15E4);
- b.bh++
- } catch (d) {
- b.onerror("Exception when sending request: " + d);
- Fc(b, false);
- b.Na()
- }
- }
- }
- Dc.prototype.Na = function() {
- this.Za && window.clearTimeout(this.Za);
- if (this.sc) {
- window.clearTimeout(this.sc);
- this.sc = null
- }
- this.rc = null;
- if (this.Oa) {
- if (this.s) try {
- this.s.abort()
- } catch (b) {}
- this.s = Ec();
- this.Za = window.setTimeout(function(c) {
- return function() {
- c.Za = null;
- Hc(c)
- }
- }(this), 5E3)
- }
- };
- Dc.prototype.Qe = function() {
- this.onerror("xhrError was called!");
- Fc(this, false);
- this.Na()
- };
- Dc.prototype.Pe = function() {
- try {
- this.onerror("xhrChange " + this.s.readyState);
- if (this.s.readyState == 4) {
- window.clearTimeout(this.sc);
- this.sc = null;
- this.onerror("xhrChange status=" + this.s.status);
- if (this.s.status == 200) {
- this.rc = "Parsing response...";
- this.dh++;
- this.eh += (new Date).getTime() - this.Be;
- var b = this.s.responseText,
- c = this.Tg !== "";
- try {
- Ic(this, b)
- } catch (d) {}
- var e = this.Tg !== "";
- if (!c && !e) {
- this.onerror("Could not get session ID!");
- this.stop()
- }
- Fc(this, true)
- } else throw new Error("Status " + this.s.status);
- this.rc = null;
- this.Oa && window.setTimeout(function(g) {
- return function() {
- Hc(g)
- }
- }(this), 10)
- } else if (this.s.readyState == 1) this.Td = true
- } catch (f) {
- b = (new Date).getTime() - this.Be;
- this.onerror("xhrChange " + f + " " + this.Td + " " + b);
- if (!this.Td || b < 5E3) Fc(this, false);
- this.Na()
- }
- };
- function Jc(b, c, d) {
- b.O[c] = d;
- if (typeof b.sb[c] != "undefined") {
- for (; b.sb[c].length > 0;) d.Ya(b.sb[c].shift());
- delete b.sb[c]
- }
- }
- function Kc(b, c) {
- if (!b.O[c]) return false;
- b.O[c].close && b.O[c].close();
- delete b.O[c];
- delete b.sb[c];
- return true
- }
- function Ic(b, c) {
- if (b.Oa) {
- if (c) {
- var d = c.split("\n");
- b.$g += c.length;
- for (c = 0; c < d.length; c++)
- if (d[c] !== "") {
- b.ah++;
- var e;
- try {
- e = eval("(" + d[c] + ")")
- } catch (f) {
- b.onerror("parseResponse " + f + " " + d[c])
- }
- if (e)
- if (typeof e.seq == "undefined") try {
- b.hb.gph(e)
- } catch (g) {
- b.onerror("ProcessPackets.gph " + g)
- } else b.wa.push(e)
- }
- }
- Lc(b)
- }
- }
- function Lc(b) {
- for (var c = 0; b.wa.length > 0;) {
- if (c > 10) {
- window.setTimeout(function(j) {
- return function() {
- Lc(j)
- }
- }(b), 50);
- return
- }
- if (b.wa[0].seq != b.Zb) {
- for (b.wa.sort(function(j, n) {
- return j.seq - n.seq
- }); b.wa.length > 0 && !b.wa[0].sessionid && b.wa[0].seq < b.Zb;) {
- b.onerror("Packet discarded:" + b.Zb + " : " + b.wa[0].seq);
- b.wa.shift()
- }
- if (b.wa.length == 0) break
- }
- if (b.Nd && (new Date).getTime() - b.Nd > 1E4) {
- b.Nd = null;
- b.onerror("Blocked timeout, packet loss:" + b.Zb + " : " + b.wa[0].seq)
- } else {
- var d = b.wa[0];
- if (!d.sessionid && d.seq != b.Zb) {
- b.onerror("Waiting for packet no: " +
- b.Zb);
- b.Nd = (new Date).getTime();
- break
- }
- }
- d = b.wa.shift();
- c++;
- b.Zb = d.seq + 1;
- try {
- if (d.sessionid) {
- b.Ce++;
- b.Pa = d.sessionid;
- try {
- b.hb.ssh(b.Pa, d)
- } catch (e) {
- b.onerror("ProcessPackets.ssh " + e)
- }
- b.Le || b.Na()
- } else b.Ce = 0;
- if (d.allchannels == "true")
- for (var f in b.O) b.O.hasOwnProperty(f) && b.O[f].Ya(d);
- else if (d.channel)
- if (d.cmd == "close") Kc(b, d.channel);
- else if (b.O[d.channel]) try {
- b.O[d.channel].Ya(d)
- } catch (g) {} else {
- var h = false;
- if (!b.sb[d.channel]) {
- h = true;
- b.sb[d.channel] = []
- }
- b.sb[d.channel].push(d);
- if (h) b.hb.nch(d.channel,
- d) || delete b.sb[d.channel]
- } else try {
- b.hb.gph(d)
- } catch (k) {
- b.onerror("ProcessPackets.gph " + k)
- }
- } catch (l) {
- b.onerror("ProcessPackets " + l + " " + d)
- }
- }
- }
- function Mc(b, c) {
- b.Ig = b.start;
- b.Le = true;
- b.start = function() {
- if (!this.Oa) {
- this.Oe = function(f) {
- return function() {
- f.onerror("websocket failed");
- f.start = this.Ig;
- f.Le = false;
- c.G = c.Hg;
- try {
- f.zb.onopen = q();
- f.zb.onmessage = q();
- f.zb.onclose = q();
- f.zb.close()
- } catch (g) {}
- f.Oa = false;
- Fc(f, false);
- f.start()
- }
- }(this);
- this.Ua = window.setTimeout(function(f) {
- return function() {
- f.Oe()
- }
- }(this), 5E3);
- this.Ne = [];
- this.Lh = [];
- try {
- this.zb = new WebSocket("ws" + (window.location.protocol.toLowerCase() == "http:" ? "" : "s") + "://" + window.location.host +
- "/mibbit")
- } catch (d) {
- try {
- this.zb = new MozWebSocket("ws" + (window.location.protocol.toLowerCase() == "http:" ? "" : "s") + "://" + window.location.host + "/mibbit")
- } catch (e) {
- this.Oe();
- if (this.Ua) {
- window.clearTimeout(this.Ua);
- delete this.Ua
- }
- }
- }
- this.zb.onopen = function(f) {
- return function() {
- f.onerror("Using a websocket");
- f.Oa = true;
- Fc(f, true)
- }
- }(this);
- this.zb.onmessage = function(f) {
- return function(g) {
- if (f.Ua) {
- window.clearTimeout(f.Ua);
- delete f.Ua
- }
- Ic(f, g.data);
- f.Pa != "" && setTimeout(function() {
- return function() {
- for (; f.Ne.length >
- 0;) c.G(f.Ne.shift())
- }
- }(), 0)
- }
- }(this);
- this.zb.onclose = function(f) {
- return function() {
- f.onerror("websocket closed");
- Fc(f, false);
- f.Oa = false;
- if (f.Ua) {
- window.clearTimeout(f.Ua);
- delete f.Ua;
- f.Oe()
- } else f.start()
- }
- }(this)
- }
- };
- c.Hg = c.G;
- c.G = function(d) {
- return function(e) {
- this.Ua && wsAttempted.push(e);
- if (d.Sc) {
- e = t(e) + "\n";
- e = '{"seq":' + this.Wc + "," + e.substring(1, e.length);
- this.Wc++;
- c.Mf++;
- d.zb.send(e);
- c.Nf++;
- c.Pf++;
- c.Of += e.length
- } else d.Ne.push(e)
- }
- }(b)
- }
- function Nc() {
- this.ie = this.mg = null;
- this.Rf = true;
- this.ye = false;
- this.Uf = {};
- this.ne = {};
- this.j = {};
- this.i = {};
- this.lg = function(b, c) {
- try {
- var d = "IRCClient:" + b + ":" + c;
- x && A("embedChannel", d, K);
- var e = new Oc(null, "IRCClient:" + b, this, F);
- e.sg = true;
- this.j["IRCClient:" + b] = e;
- var f = document.getElementById("chats"),
- g = document.createElement("div");
- f.appendChild(g);
- fulltitle = c + " (channel)";
- var h = !(c.substring(0, 1) == "#" || c.substring(0, 1) == "&" || c.substring(0, 1) == "!"),
- k = new Pc(d, g, c, "IRCClient:" + b, e, h, F);
- k.b.U.Te = false;
- k.b.U.Ue =
- this.Rf;
- e.b = k.b;
- this.i[d] = k;
- e.i[d] = k;
- var l = h ? {
- background: F.tabColorPM,
- border: F.tabBColorPM
- } : {
- background: F.tabColorChannel,
- border: F.tabBColorChannel
- },
- j = Lb(Q, d, g, c, fulltitle, function() {
- return function(o, s) {
- k.b.Bb(s)
- }
- }(this), function(o) {
- return function() {
- !e.ya || !F.confirmServerClose ? Qc(o, b) : o.ce(b)
- }
- }(this), l, false, true);
- F.focusNewJoins && this.i[d].b.Bb(true);
- this.i[d].W = j;
- Jc(S, d, this.i[d]);
- Jc(S, "IRCClient:" + b, e)
- } catch (n) {
- x && A("embedChannel", "Exception " + n, C)
- }
- };
- this.Ya = function(b) {
- x && A("IRCClient.recv",
- "p.cmd=" + b.cmd, M);
- try {
- if (b.cmd == "connected") {
- T && T.Wb({
- cmd: "connected"
- });
- if (!this.ye)
- if (Rc) {
- ob = true;
- Adverts.Ee(true)
- }
- var c = "IRCClient:" + b.name;
- if (this.ie && this.ie.toLowerCase() == b.name.toLowerCase()) this.lg(b.name, this.mg);
- else if (!this.j[c]) {
- var d = true;
- if (Rc) d = false;
- var e = document.getElementById("chats"),
- f = document.createElement("div");
- f.style.display = d ? "none" : "block";
- e.appendChild(f);
- var g = new Oc(f, c, this, F);
- this.j[c] = g;
- var h = b.name;
- if (b.network) h = b.network;
- this.j[c].Sg = h;
- var k = Lb(Q, c, f, h, "IRC server " +
- b.name,
- function() {
- return function(w, p) {
- g.b.Bb(p)
- }
- }(this),
- function(w) {
- return function() {
- !g.ya || !F.confirmServerClose ? Qc(w, b.name) : w.ce(b.name)
- }
- }(this), {
- background: F.tabColorServer,
- border: F.tabBColorServer
- }, d, true, false, true);
- this.j[c].W = k;
- Jc(S, c, this.j[c]);
- !Rc && b.network && Sc(this.j[c].b, "//clientsearch.mibbit.com/client/channels/" + encodeURIComponent(b.network), true)
- }
- } else if (b.cmd == "confailed") b.name != "" && this.If(b.name, b.reason);
- else if (b.cmd == "blacklisted") {
- x && A("IRCClient.recv", "BLACKLISTED", C);
- alert("Your IP address is listed in a blacklist. You may have a virus, trojan or be running an open proxy.\nYou will now be redirected to dronebl.org for more information.");
- window.location = "http://dronebl.org/lookup"
- } else if (b.cmd == "checkconnect") x && A("IRCClient.recv", "checkconnect " + b.allowed, M);
- else if (b.cmd == "disconnected") {
- T && T.Wb({
- cmd: "disconnected"
- });
- Adverts.Ee(false);
- x && A("IRCClient.recv", b, M);
- b.force || this.Jf(b.name, b.reason);
- var l = "IRCClient:" + b.name;
- if (this.j[l]) {
- Kc(S, l);
- this.j[l].closed(!!b.reason &&
- !b.force);
- delete this.j[l]
- }
- Tc("ircdisconnect")
- } else if (b.cmd == "keyaccept") {
- try {
- Q.yg.parentNode.removeChild(Q.yg)
- } catch (j) {}
- this.ye = true;
- x && A("server", "PREMIUM", C);
- Adverts.fe();
- ob = false
- } else if (b.cmd == "sysmsg") x && A("server", b.data, K);
- else if (b.cmd == "status") {
- Uc("irc", b.connections, b.pending, b.pendingDNS, b.hostname, b.pendingSettings, b.readyToConnect);
- x && A("server", "Status: " + t(b), K)
- } else if (b.cmd == "linkinfo") {
- x && A("IRCClient.recv", "Link info: " + b, K);
- d = document.getElementById(b.linkid);
- var n = document.getElementById(b.linkid +
- "_i");
- if (d && n) {
- c = "";
- if (b.followed) c = b.followed;
- else
- for (var o in b.idata)
- if (b.idata.hasOwnProperty(o) && o != "thumb") c = c + o.toUpperCase() + ": " + b.idata[o] + " \n";
- d.title = c;
- d.style.color = F.qh;
- n.title = c;
- if (b.idata.thumb) d.src = b.idata.thumb
- } else x && A("IRCClient.recv", "Link not found :/ " + b.linkid, C)
- } else x && A("IRCClient.recv", b, M)
- } catch (s) {
- x && A("IRCClient.recv", "exception " + b + ":" + s, C)
- }
- };
- this.Gg = function() {
- x && A("IRCClient.notifyServersDisconnect", "notifyServersDisconnect", K);
- Tc("ircdisconnect");
- try {
- for (rname in this.j) this.j.hasOwnProperty(rname) &&
- this.j[rname].ic()
- } catch (b) {
- x && A("IRCClient.notifyServersDisconnect", "exception ", C)
- }
- };
- this.wh = function() {
- Tc("ircdisconnect");
- for (rname in this.j) this.j.hasOwnProperty(rname) && this.j[rname].closed(false);
- this.j = {}
- };
- this.kf = 0;
- this.Og = function(b) {
- var c = "GLOB" + this.kf;
- this.kf++;
- var d = function(e) {
- return function() {
- for (rname in e.j) e.j.hasOwnProperty(rname) && Vc(e.j[rname], c)
- }
- }(this);
- for (rname in this.j) this.j.hasOwnProperty(rname) && Wc(this.j[rname], c, b, d)
- };
- this.Ch = function(b) {
- for (rname in this.j)
- if (this.j.hasOwnProperty(rname)) {
- Xc(this.j[rname],
- b);
- this.j[rname].sg || this.j[rname].Ya(b)
- }
- };
- this.uh = function() {
- for (rname in this.j)
- if (this.j.hasOwnProperty(rname)) return true;
- return false
- };
- this.Dh = function(b) {
- Yc = b;
- for (var c in this.j)
- if (this.j.hasOwnProperty(c)) {
- this.j[c].b.C();
- U(this.j[c].b)
- }
- for (c in this.i)
- if (this.i.hasOwnProperty(c)) {
- this.i[c].b.C();
- U(this.i[c].b)
- }
- };
- this.Yf = function(b) {
- x && A("closedchannel", "Added ignore for : " + b, K);
- this.ne[b] = true
- };
- this.$f = function(b) {
- x && A("closedchannel", "Removed ignore for : " + b, K);
- delete this.ne[b]
- };
- this.Uc =
- function(b) {
- x && A("IRCClient.prefsUpdated", "prefsUpdated", K);
- for (var c in this.i)
- if (this.i.hasOwnProperty(c)) {
- this.i[c].Uc(b);
- var d = this.i[c].za,
- e = this.i[c].W;
- e.H = {
- background: d ? F.tabColorPM : F.tabColorChannel,
- border: d ? F.tabBColorPM : F.tabBColorChannel
- };
- tb(e, e.va)
- }
- if (this.ie == null)
- for (c in this.j)
- if (this.j.hasOwnProperty(c)) {
- this.j[c].Uc(b);
- d = this.j[c].W;
- d.H = {
- background: F.tabColorServer,
- border: F.tabBColorServer
- };
- tb(d, d.va)
- }
- }
- }
- function Qc(b, c) {
- var d = "IRCClient:" + c;
- if (b.j[d].ya) V.G({
- channel: "IRCClient",
- cmd: "disconnect",
- data: c
- });
- else if (b.j[d]) {
- b.j[d].closed(false);
- delete b.j[d]
- }
- }
- Nc.prototype.ce = function(b) {
- window.confirm("Are you sure you want to disconnect from " + b + "?") && Qc(this, b)
- };
- Nc.prototype.If = function(b, c) {
- c && alert(b + ": " + c)
- };
- Nc.prototype.Jf = function(b, c) {
- c && alert(b + ": " + c)
- };
- function Zc(b, c, d, e, f, g, h, k, l) {
- try {
- if (!(d == "" || c == "")) {
- b = {
- channel: "IRCClient",
- cmd: "connect"
- };
- if (c.substring(0, 1) == "!") {
- b.proxied = true;
- c = c.substring(1, c.length)
- }
- c = c.replace(/\s+/g, "").replace(/\.+/g, ".").replace(/^\./, "").replace(/\.$/, "").toLowerCase();
- d = d.replace(/\s+/g, "");
- e = e.replace(/\s+/g, "");
- f = f.replace(/\n/g, "");
- f = f.replace(/\r/g, "");
- b.data = c;
- b.nick = d;
- b.pass = e != null && e ? e : "";
- b.authmethod = k;
- if (!f || f == null) f = "";
- b.joinchannels = f;
- if (l) b.charset = l;
- if (h) b.forced = true;
- x && A("connect", t(b), K);
- V.G(b)
- }
- } catch (j) {
- x &&
- A("irc.connectServer", "exception " + j, C)
- }
- }
- function $c(b, c, d) {
- try {
- if (d.cmd == "typing") return false;
- if (b.i[c]) return false;
- for (ii in S.O)
- if (S.O.hasOwnProperty(ii))
- if (ii.toLowerCase() == c.toLowerCase()) {
- S.O[ii].Ya(d);
- return false
- }
- if (b.ne[c]) {
- x && A("newCHandler", "Ignored : " + c, K);
- return false
- }
- if (d.cmd == "part") return false;
- if (d.cmd == "infobar") return false;
- if (d.channeltype == "log") return true;
- var e = !!b.Uf[c],
- f = d.channeltype == "pm";
- if (f && !F.allowIncommingPMs) {
- x && A("newCHandler", "Ignored PM : " + c, K);
- return false
- }
- if (f && F.blurPMs) e = true;
- if (!f && !F.focusNewJoins) e =
- true;
- if (f && d.userInitiated) e = false;
- fulltitle = f ? c + "(pm)" : c + " (channel)";
- var g = c,
- h = c.indexOf(":", 10);
- if (h) g = g.substring(0, h);
- var k = b.j[g],
- l = document.getElementById("chats"),
- j = document.createElement("div");
- if (e) j.style.display = "none";
- l.appendChild(j);
- if (!e)
- if (Kb(Q, c, g)) Gb(Q);
- else Q.l[g] && Q.l[g].Jd(false);
- var n = new Pc(c, j, d.localchannel, g, k, f, F);
- b.i[c] = n;
- k.i[c] = n;
- var o = Lb(Q, c, j, d.localchannel, fulltitle, function() {
- return function(w, p) {
- n.b.Bb(p)
- }
- }(b), function(w) {
- return function(p) {
- w.i[p] && ad(w.i[p]);
- return true
- }
- }(b), {
- background: f ? F.tabColorPM : F.tabColorChannel,
- border: f ? F.tabBColorPM : F.tabBColorChannel
- }, e, true, g, false);
- if (f || F.focusNewJoins) e || b.i[c].b.Bb(true);
- b.i[c].W = o;
- e && o.pa();
- Jc(S, c, b.i[c]);
- f && Tc("newpm");
- bd && f && bd.Fg(c, d.localchannel)
- } catch (s) {
- x && A("newCHandler", "Exception " + s, C)
- }
- return true
- }
- function cd(b, c) {
- if (!Rc && b.j["IRCClient:" + c.server]) {
- b = b.j["IRCClient:" + c.server].b;
- pb(b.Ia, "Lag: " + (c.timeout ? "-" : c.lag + "ms"), b.Rd)
- }
- }
- function dd(b, c) {
- try {
- var d = c.split(" ");
- b = {
- channel: "IRCClient",
- cmd: "connect"
- };
- b.data = d[0];
- b.nick = ed();
- if (fd) b.nick = fd;
- if (d[1]) b.nick = d[1];
- b.pass = "";
- b.authmethod = "";
- b.joinchannels = "";
- x && A("connect", "to " + b.data + " nick=" + b.nick + " pass=" + b.pass + " authmethod=" + b.authmethod, K);
- V.G(b)
- } catch (e) {
- x && A("irc.connectServer", "exception " + e, C)
- }
- }
- function gd(b, c) {
- b = {};
- var d = false,
- e = false;
- if (c.search(/^(ircs?:\/\/)$/i) != -1) return null;
- b.ssl = c.search(/^(ircs:)/i) != -1;
- b.port = b.ssl ? 9999 : 6667;
- c = c.match(/^ircs?:\/\/([^\/\s]+)?(\/[^\s]*)?$/i);
- if (!c || !c[1]) return null;
- var f = c[1],
- g = "";
- if (typeof c[2] != "undefined") g = c[2];
- c = f.match(/^([^\:]+)(\:\+?\d+)?$/);
- if (!c) return null;
- b.host = c[1].toLowerCase();
- if (typeof c[2] != "undefined") {
- d = true;
- b.port = c[2].substr(1);
- if (b.port.substring(0, 1) == "+") {
- b.port = b.port.substr(1);
- b.ssl = true
- }
- } else if (b.host.indexOf(".") !=
- -1) d = true;
- if (!d) {
- c = hd[b.host.toLowerCase()];
- if (!c) return null;
- if (b.ssl && c.Gf) {
- b.host = c.Gf.host;
- b.port = c.Gf.port
- } else if (!b.ssl && c.t) {
- b.host = c.t.host;
- b.port = c.t.port
- } else return null
- }
- if (g) {
- c = g.match(/^\/([^\?\s\/,]*)?\/?(,[^\?]*)?(\?.*)?$/);
- if (!c) return null;
- b.target = typeof c[1] != "undefined" ? decodeURIComponent(c[1]) : "";
- if (b.target.search(/[\x07,\s]/) != -1) return null;
- if (typeof c[2] != "undefined")
- for (d = c[2].toLowerCase().split(","); d.length;) {
- g = d.pop();
- if (g != "")
- if (g == "isnick") e = true;
- else if (g == "isserver") b.isServer =
- true;
- else if (g == "needpass") b.needPass = true;
- else if (g == "needkey") e || (b.needKey = true)
- }
- if (!e && "#&+".indexOf(b.target.substring(0, 1)) == -1) b.target = "#" + b.target;
- if (typeof c[3] != "undefined")
- for (c = c[3].substr(1).split("&"); c.length;) {
- d = c.pop().split("=");
- g = d[0].toLowerCase();
- if (g == "msg") b.msg = decodeURIComponent(d[1]);
- else if (g == "pass") {
- b.needPass = true;
- b.pass = decodeURIComponent(d[1])
- } else if (g == "key") {
- if (!e) {
- b.needKey = true;
- b.key = decodeURIComponent(d[1])
- }
- } else if (g == "charset") b.charset = decodeURIComponent(d[1])
- }
- }
- return b
- }
- var hd = {
- mibbit: {
- server: {
- host: "irc.mibbit.net",
- port: 6667
- },
- serverssl: {
- host: "irc.mibbit.net",
- port: 6697
- }
- },
- moznet: {
- server: {
- host: "irc.mozilla.org",
- port: 6667
- },
- serverssl: {
- host: "irc.mozilla.org",
- port: 6697
- }
- },
- hybridnet: {
- server: {
- host: "irc.ssc.net",
- port: 6667
- }
- },
- slashnet: {
- server: {
- host: "irc.slashnet.org",
- port: 6667
- }
- },
- dalnet: {
- server: {
- host: "irc.dal.net",
- port: 6667
- }
- },
- undernet: {
- server: {
- host: "irc.undernet.org",
- port: 6667
- }
- },
- webbnet: {
- server: {
- host: "irc.webbnet.info",
- port: 6667
- }
- },
- quakenet: {
- server: {
- host: "irc.quakenet.org",
- port: 6667
- }
- },
- ircnet: {
- server: {
- host: "irc.open-ircnet.net",
- port: 6667
- }
- },
- freenode: {
- server: {
- host: "irc.freenode.net",
- port: 6667
- }
- },
- serenia: {
- serverssl: {
- host: "irc.serenia.net",
- port: 9999
- }
- },
- efnet: {
- server: {
- host: "irc.prison.net",
- port: 6667
- }
- },
- hispano: {
- server: {
- host: "irc.irc-hispano.org",
- port: 6667
- }
- }
- },
- id = ["UTF-8", "Big5", "ISO-8859-1", "ISO-8859-2", "ISO-8859-3", "ISO-8859-4", "ISO-8859-5", "ISO-8859-6", "ISO-8859-7", "ISO-8859-8", "ISO-8859-9", "ISO-8859-13", "ISO-8859-15", "windows-1250", "windows-1251", "windows-1252", "windows-1253", "windows-1254",
- "windows-1255", "windows-1256", "windows-1257", "windows-1258"
- ];
- function Pc(b, c, d, e, f, g, h) {
- function k(p) {
- return function(r) {
- p.W && p.W.pa(r);
- if (T) T.alert(r ? E.g("AlertsMyName") : E.g("AlertsGeneral"))
- }
- }
- function l(p) {
- return function(r) {
- p.t.send({
- cmd: "text",
- chan: this.f,
- data: "/join " + r
- })
- }
- }
- function j(p) {
- return function(r) {
- if (p.wc) {
- if (r == "" || r.substring(0, 1) == "/" && r.substring(0, 2) != "//") p.ac(false)
- } else if (r != "" && (r.substring(0, 1) != "/" || r.substring(0, 2) == "//")) p.ac(true)
- }
- }
- function n(p) {
- return function(r, y) {
- if (y.substring(0, 8) == "usermenu") {
- y = parseInt(y.substring(8, y.length));
- if (p.a.usermenus[y]) {
- var z = p.a.usermenus[y].command;
- z = z.replace(/\$nick/g, r);
- var B = p.b.U.F[r.toLowerCase()];
- if (B) {
- if (B.user) z = z.replace(/\$user/g, B.user);
- if (B.host) z = z.replace(/\$host/g, B.host)
- }
- if ((new jd({
- command: z,
- match: p.a.usermenus[y].title
- })).execCommand({
- f: p.f,
- h: p.t.Xa
- }, [], function() {
- return function(H) {
- p.Ba(H)
- }
- }(), function() {
- return function() {
- p.b.focus()
- }
- }(), "", 0, 0)) return
- }
- } else if (y == "banu") {
- if ((B = p.b.U.F[r.toLowerCase()]) && B.user) {
- p.t.send({
- cmd: "text",
- chan: p.f,
- data: "/mode " + p.f + " +b " + B.user +
- "@*"
- });
- p.t.send({
- cmd: "text",
- chan: p.f,
- data: "/kick " + r
- })
- }
- } else if (y == "banh") {
- if ((B = p.b.U.F[r.toLowerCase()]) && B.host) {
- p.t.send({
- cmd: "text",
- chan: p.f,
- data: "/mode " + p.f + " +b *@" + B.host
- });
- p.t.send({
- cmd: "text",
- chan: p.f,
- data: "/kick " + r
- })
- }
- } else if (y == "ignore") kd(p.b, r, true);
- else if (y == "unignore") kd(p.b, r, false);
- else if (y == "getoptions") {
- z = [];
- for (y = 0; y < p.a.usermenus.length; y++) z.push({
- id: "usermenu" + y,
- desc: p.a.usermenus[y].title
- });
- if (p.Ed)
- if (p.b.U.F[r.toLowerCase()]) {
- B = p.b.U.F[r.toLowerCase()];
- if (B.mibbituser ==
- "true")
- if (B.user != "Mibbit" && B.user != "cgiirc") B.user && z.push({
- id: "banu",
- desc: "Ban " + B.user + "@*"
- });
- else B.host && z.push({
- id: "banh",
- desc: "Ban *@" + B.host
- });
- else {
- B.user && z.push({
- id: "banu",
- desc: "Ban " + B.user + "@*"
- });
- B.host && z.push({
- id: "banh",
- desc: "Ban *@" + B.host
- })
- }
- }
- ld(p.b, r) ? z.push({
- id: "unignore",
- desc: E.g("UMenu_Unignore")
- }) : z.push({
- id: "ignore",
- desc: E.g("UMenu_Ignore")
- });
- return z
- }
- p.b.focus()
- }
- }
- function o(p) {
- return function(r) {
- p.ra.jc = r
- }
- }
- function s(p) {
- return function() {
- try {
- if (!p.ya) return false;
- p.Ba(p.b.n.ea.value)
- } catch (r) {
- x &&
- A("submit", r, C)
- }
- return false
- }
- }
- x && A("ChatChannel", "ch=" + b + ", chan=" + d + ", sname=" + e + ", sobj=" + f, K);
- this.na = b;
- this.f = d;
- this.Mb = e;
- this.t = f;
- this.za = g;
- this.ya = true;
- this.a = h;
- this.Ed = this.wc = false;
- x && A("ChatChannel", "New chat channel for " + d, K);
- this.Yb = 0;
- this.ra = new md;
- c.style.background = g ? this.a.tabColorPM : this.a.tabColorChannel;
- b = {};
- b.Id = s(this);
- b.xc = j(this);
- b.hh = n(this);
- b.eb = l(this);
- b.M = k(this);
- b.mc = function(p) {
- return function(r, y, z) {
- y = new jd({
- command: r,
- match: y
- });
- x && A("processCommand", r, K);
- y.execCommand({
- f: p.f,
- h: z ? z : p.t.Xa
- }, [], function() {
- return function(B) {
- p.Ba(B)
- }
- }(), function() {
- return function() {
- p.b.focus()
- }
- }(), "", 0, 0)
- }
- }(this);
- this.df = b.mc;
- b.De = o(this);
- b.Qg = function(p) {
- return function(r) {
- r != "" && V.G({
- cmd: "paste",
- channel: "PasteBin",
- returnchannel: p.na,
- data: r
- })
- }
- }(this);
- b.Pg = function(p) {
- return function(r) {
- r != "" && V.G({
- cmd: "minify",
- channel: "LinkManager",
- returnchannel: p.na,
- url: r
- })
- }
- }(this);
- b.gh = function(p) {
- return function(r) {
- p.t.send({
- cmd: "text",
- chan: p.f,
- data: "/mode " + p.f + " -b " + r
- });
- p.b.focus()
- }
- }(this);
- if (this.a.ircNickClick) b.Dg =
- function(p) {
- return function(r) {
- if (r) {
- Za(p.b.n.da) == 0 ? p.b.n.Ub(r + ": ") : p.b.n.Ub(r + " ");
- p.b.focus()
- }
- }
- }(this);
- b.Hf = function(p) {
- return function(r) {
- if (W) {
- if (!Rc) {
- var y = PermalinkInfo.create(p.b.d, p.Mb.substring(10, p.Mb.length), p.f);
- r("Link to channel", function() {
- ea(W, {
- element: y
- })
- })
- }
- p.Ed && r("Set topic", function() {
- W.alert("Set topic for " + p.f, function(H) {
- H && H != p.b.U.Jc && p.Ba("/topic " + H)
- }, true, p.b.U.Jc)
- })
- }
- for (var z = 0; z < p.a.channelmenus.length; z++) {
- var B = p.a.channelmenus[z];
- r(B.title, function(H) {
- return function() {
- var P =
- new jd({
- command: H.command,
- match: H.title
- });
- x && A("setupoptions", "Running ch menu... " + H.command, K);
- P.execCommand({
- f: p.f,
- h: p.t.Xa
- }, [], function() {
- return function(N) {
- p.Ba(N)
- }
- }(), function() {
- return function() {
- p.b.focus()
- }
- }(), "", 0, 0)
- }
- }(B))
- }
- }
- }(this);
- b.Cf = function(p) {
- return function(r) {
- V.G({
- cmd: "plugin",
- channel: p.na,
- data: r
- })
- }
- }(this);
- b.tf = function(p) {
- return function() {
- p.t.yd("Change nickname", function() {
- return function(r) {
- r && p.t.send({
- cmd: "text",
- data: "/nick " + r
- })
- }
- }())
- }
- }(this);
- this.b = new X(c, !this.za, this.a,
- b, true, g ? this.a.tabColorPM : this.a.tabColorChannel);
- this.b.f = this.na;
- this.b.uc(this.t.Xa);
- pb(this.b.Ia, nd, this.b.Rd);
- try {
- this.b.n.ea.maxLength = 361
- } catch (w) {}
- if (!this.za && od) {
- this.b.U.Cd = od;
- this.b.U.Ac = true
- }!this.za && this.a.noUListInChannels && pd(this.b, false);
- if (this.za) {
- this.b.$[this.f.toLowerCase()] = this.f;
- this.b.$[this.b.h.toLowerCase()] = this.b.h;
- kb(this.b.n.da, this.f);
- kb(this.b.n.da, this.b.h)
- }
- }
- function qd(b) {
- !Rc && !b.za && rd.match(">" + b.t.Sg + ">" + b.f, {
- f: b.f,
- h: b.t.Xa
- }, function(c) {
- return function(d) {
- c.Ba(d)
- }
- }(b), function() {
- return q()
- }(b), function(c) {
- return function() {
- c.b.focus()
- }
- }(b))
- }
- Pc.prototype.Ba = function(b) {
- if (this.Yb > 3) x && A("ChatChannel", "Max recurse. Bad alias? (" + b + ")" + this.Yb, C);
- else {
- this.Yb++;
- if (b) {
- var c = b.toLowerCase(),
- d = b;
- if (d.toLowerCase().substring(0, 4) == "/me ")
- if (this.za || sd(this.b)) {
- var e = d.substring(4);
- if (e = td.apply(e, false, this.df)) {
- c = {
- cmd: "emote",
- idd: true,
- local: true,
- emote: ud(this.ra, e),
- nick: this.b.h
- };
- this.t.send({
- cmd: "text",
- chan: this.f,
- data: "/me " + ud(this.ra, e)
- });
- this.b.Ma(c);
- this.ac(false);
- this.Yb--;
- return false
- }
- } else {
- this.Yb--;
- return false
- }
- else if (d.substring(0,
- 2) == "//" || d.substring(0, 1) != "/") {
- if (d.substring(0, 2) == "//") d = d.substring(1, b.length);
- if ((d = td.apply(d, false, this.df)) && (this.za || sd(this.b))) {
- c = {
- cmd: "msg",
- nick: this.b.h,
- local: true,
- idd: true,
- msg: ud(this.ra, d)
- };
- if (d.substring(0, 1) == "/") d = "/" + d;
- if (this.a.parseChannels && d.match(/^([\s]*)\#([\S]+)([\s]*)$/g)) {
- x && A("CHANNEL", "Matched regexp...", C);
- var f = {
- he: false
- };
- f.Zg = window.setTimeout(function(k) {
- return function() {
- k.t.send({
- cmd: "text",
- chan: k.f,
- data: ud(k.ra, d)
- });
- f.he = true
- }
- }(this), 5E3);
- c.channelclick = function(k) {
- return function(l) {
- if (!f.he) {
- window.clearTimeout(f.Zg);
- f.he = true;
- var j = Y(k.b, "^^ " + l + " was not sent to this channel. Please use /join to join channels.", {}, k.a.colorSystem, null, false, k.b.k);
- k.b.e("error", j)
- }
- k.b.w.eb(l)
- }
- }(this)
- } else this.t.send({
- cmd: "text",
- chan: this.f,
- data: ud(this.ra, d)
- });
- this.b.Ma(c);
- this.ac(false)
- }
- this.Yb--;
- return false
- }
- if (c.substring(0, 7) == "/style ") {
- b = b.substring(7, b.length);
- e = b.split(" ");
- this.ra.reset();
- for (c = 0; c < e.length; c++) {
- if (e[c] == "bold") this.ra.bold = true;
- if (e[c] == "underline") this.ra.Ie = true;
- var g = parseInt(e[c]);
- if (!isNaN(g))
- if (this.ra.jc ===
- null) this.ra.jc = g;
- else this.ra.rd = g
- }
- } else if (c == "/style") this.ra.reset();
- else if (c == "/redraw") this.b.z();
- else if (c == "/mute") {
- vd = false;
- e = Y(this.b, "Sounds off", {}, this.a.colorSystem, null, false, this.b.k);
- this.b.e("sounds", e)
- } else if (c == "/unmute") {
- vd = true;
- e = Y(this.b, "Sounds on", {}, this.a.colorSystem, null, false, this.b.k);
- this.b.e("sounds", e)
- } else if (c.substring(0, 7) == "/splay ") wd(b.substring(7, b.length));
- else if (c.substring(0, 6) == "/echo ") this.b.Ma({
- cmd: "msg",
- nick: "*",
- local: true,
- idd: true,
- msg: b.substring(6,
- b.length)
- });
- else if (W && !this.za && c == "/permalink") {
- e = PermalinkInfo.create(this.b.d, this.Mb.substring(10, this.Mb.length), this.f);
- W && ea(W, {
- element: e
- })
- } else if (c.substring(0, 7) == "/umode ") this.t.send({
- cmd: "text",
- chan: this.f,
- data: "/mode " + this.b.h + " " + b.substring(7, b.length)
- });
- else if (c.substring(0, 7) == "/query ") {
- e = b.substring(7, b.length);
- g = null;
- c = e.indexOf(" ");
- if (c != -1) {
- g = e.substring(c + 1, e.length);
- e = e.substring(0, c)
- }
- c = {
- channeltype: "pm",
- userInitiated: true
- };
- c.channel = this.Mb + ":" + e.toLowerCase();
- c.localchannel =
- e;
- $c(G, c.channel, c);
- g && this.t.i[c.channel].Ba(g)
- } else if (c.substring(0, 8) == "/minify ") {
- e = b.substring(8, b.length);
- V.G({
- channel: "LinkManager",
- cmd: "minify",
- url: e,
- returnchannel: this.na
- })
- } else if (c.substring(0, 8) == "/server ") dd(G, b.substring(8, b.length));
- else if (c == "/debug") xd();
- else if (c == "/notify on") {
- this.b.U.gd = true;
- e = Y(this.b, "Notifications on", {}, this.a.colorSystem, null, false, this.b.k);
- this.b.e("notify", e)
- } else if (c == "/notify off") {
- this.b.U.gd = false;
- e = Y(this.b, "Notifications off", {}, this.a.colorSystem,
- null, false, this.b.k);
- this.b.e("notify", e)
- } else if (c == "/togglemenu smilies") Ya(this.b.n, "smilies");
- else if (c == "/togglemenu colors") Ya(this.b.n, "colors");
- else if (c == "/togglemenu pastebin") Ya(this.b.n, "pastebin");
- else if (c == "/togglemenu minify") Ya(this.b.n, "minify");
- else if (c == "/ulshow") pd(this.b, true);
- else if (c == "/ulhide") pd(this.b, false);
- else if (c == "/help") yd(this.b, vc);
- else if (c.substring(0, 8) == "/remove ") {
- hc(this.b.la, b.substring(8, b.length));
- U(this.b)
- } else if (c == "/clear") zd(this.b);
- else if (c.substring(0,
- 9) == "/showurl ") {
- e = b.substring(9, b.length);
- Sc(this.b, e)
- } else if (c.substring(0, 8) == "/ignore ") {
- e = b.substring(8, b.length);
- kd(this.b, e, true)
- } else if (c.substring(0, 10) == "/unignore ") {
- e = b.substring(10, b.length);
- kd(this.b, e, false)
- } else if (c == "/pastebin") Xa(this.b.n, "pastebin");
- else if (c.substring(0, 6) == "/bbon ") {
- g = (new Date).getTime();
- e = b.substring(6, b.length);
- this.b.U.Xd[e] = true;
- this.b.e("bb", Y(this.b, "Bridgebot on: " + e, {}, this.a.colorNotice, null, false, this.b.k, g))
- } else if (c.substring(0, 7) == "/bboff ") {
- g =
- (new Date).getTime();
- e = b.substring(7, b.length);
- delete this.b.U.Xd[e];
- this.b.e("bb", Y(this.b, "Bridgebot off: " + e, {}, this.a.colorNotice, null, false, this.b.k, g))
- } else if (c == "/hints") {
- g = (new Date).getTime();
- var h = Ad(od, 20);
- for (c = 0; c < h.length; c++) {
- e = "Hint: " + h[c];
- this.b.e("hints", Y(this.b, e, {}, this.a.colorNotice, null, false, this.b.k, g))
- }
- } else {
- rd.match(b, {
- f: this.f,
- h: this.t.Xa
- }, function(k) {
- return function(l) {
- k.Ba(l)
- }
- }(this), function(k) {
- return function() {
- k.t.send({
- cmd: "text",
- chan: k.f,
- data: b
- })
- }
- }(this), function(k) {
- return function() {
- k.b.focus()
- }
- }(this));
- this.ac(false)
- }
- }
- this.Yb--
- }
- };
- Pc.prototype.ac = function(b) {
- if (this.t.ya && (this.za || sd(this.b))) {
- b != this.wc && V.G({
- cmd: "typing",
- channel: this.na,
- typing: b
- });
- var c = this.b;
- c.c && Fa(c.c, c.h, b)
- }
- this.wc = b
- };
- Pc.prototype.remove = function(b) {
- this.ya = false;
- this.b.close();
- Kc(S, this.na);
- Bd(this.t, this.na);
- if (b) this.W && Ib(Q, this.W.id);
- else this.W && Jb(Q, this.W.id)
- };
- Pc.prototype.ic = function() {
- this.b.ic()
- };
- function ad(b) {
- if (!b.za && sd(b.b)) {
- b.t.send({
- cmd: "text",
- chan: b.f,
- data: "/part " + b.f
- });
- b.t.pe.Yf(b.na)
- }
- b.remove(false)
- }
- Pc.prototype.Ya = function(b) {
- if (this.ya) try {
- this.b.Ma(b);
- if (b.nick == this.b.h && (b.cmd == "usermode" || b.cmd == "join") || b.cmd == "nicklist") {
- var c = sd(this.b);
- if (c) this.Ed = c.sa.owner || c.sa.admin || c.sa.op
- }
- b.nick == this.b.h && b.cmd == "join" && qd(this);
- if (b.cmd == "changenick" && b.nick.toLowerCase() == this.f.toLowerCase()) {
- var d = this.Mb + ":" + b.newnick.toLowerCase();
- (Q.l[d] ? true : false) && Ib(Q, d);
- if (this.W) {
- c = Q;
- var e = this.na;
- if (c.l[e]) {
- var f = c.l[e];
- Nb(c, f);
- f.id = d;
- Mb(c, f)
- }
- rb(this.W, b.newnick.toLowerCase())
- }
- delete this.b.$[this.f.toLowerCase()];
- Kc(S, this.na);
- this.f = b.newnick.toLowerCase();
- this.na = d;
- this.b.f = this.na;
- Jc(S, this.na, this);
- this.b.$[this.f.toLowerCase()] = this.f
- }
- if (this.a.showChannelTabUsers && this.b.c) {
- var g = this.b.c.size();
- rb(this.W, this.f + " (" + g + ")")
- }
- } catch (h) {
- x && A("recv", h + "( " + b + " )", C)
- }
- };
- Pc.prototype.Uc = function(b) {
- x && A("ChatChannel", "prefsUpdated: " + b, K);
- if (b && b == "CGMlayout") {
- this.b.C();
- U(this.b)
- } else {
- Cd(this.b);
- this.b.z();
- U(this.b);
- this.b.p.style.background = this.za ? this.a.tabColorPM : this.a.tabColorChannel;
- if (this.b.c) rb(this.W, this.f + (this.a.showChannelTabUsers ? " (" + this.b.c.size() + ")" : ""))
- }
- };
- var nd = "For the latest news checkout the blog: http://blog.mibbit.com";
- function Oc(b, c, d, e) {
- function f(k) {
- return function() {
- k.W && k.W.pa(false);
- T && T.alert("Server stuff !")
- }
- }
- function g(k) {
- return function(l) {
- k.send({
- cmd: "text",
- chan: this.f,
- data: "/join " + l
- })
- }
- }
- function h(k) {
- return function() {
- try {
- if (!k.ya) return false;
- k.Ba(k.b.n.ea.value)
- } catch (l) {
- x && A("IRCServerTab", "onsubmit " + l, C)
- }
- return false
- }
- }
- this.Mb = this.f = c;
- this.Xa = "unknown";
- this.Ed = false;
- this.ya = true;
- this.ed = 1;
- this.a = e;
- this.Hh = new R;
- this.k = new Zb(function(k) {
- return function(l) {
- k.send({
- cmd: "text",
- chan: k.f,
- data: "/join " +
- l
- })
- }
- }(this), new Tb(new cc(new R), this.a), this.a);
- this.pe = d;
- this.i = {};
- c = {};
- c.Id = h(this);
- c.eb = g(this);
- c.M = f(this);
- c.tf = function(k) {
- return function() {
- k.yd("Change nickname", function() {
- return function(l) {
- l && k.send({
- cmd: "text",
- data: "/nick " + l
- })
- }
- }())
- }
- }(this);
- if (b) {
- b.style.background = this.a.tabColorServer;
- this.b = new X(b, false, this.a, c, false, this.a.tabColorServer);
- pb(this.b.Ia, nd, this.b.Rd)
- }
- }
- Oc.prototype.Ba = function(b) {
- if (b) {
- var c = b.toLowerCase();
- if (c.substring(0, 7) == "/query ") {
- var d = b.substring(7, b.length);
- c = null;
- var e = d.indexOf(" ");
- if (e != -1) {
- c = d.substring(e + 1, d.length);
- d = d.substring(0, e)
- }
- e = {
- channeltype: "pm",
- userInitiated: true
- };
- e.channel = this.Mb + ":" + d.toLowerCase();
- e.localchannel = d;
- $c(G, e.channel, e);
- if (c)(d = this.i[e.channel]) && d.Ba(c)
- } else if (c == "/debug") xd();
- else if (c == "/help") yd(this.b, vc);
- else if (c == "/clear") zd(this.b);
- else if (c == "/redraw") this.b.z();
- else if (c == "/mute") {
- vd = false;
- c = Y(this.b, "Sounds off", {}, this.a.colorSystem, null, false, this.b.k);
- this.b.e("sounds", c)
- } else if (c == "/unmute") {
- vd = true;
- c = Y(this.b, "Sounds on", {}, this.a.colorSystem, null, false, this.b.k);
- this.b.e("sounds", c)
- } else if (c.substring(0, 7) == "/splay ") wd(b.substring(7, b.length));
- else if (c.substring(0, 6) == "/echo ") this.b.Ma({
- cmd: "msg",
- nick: "*",
- local: true,
- idd: true,
- msg: b.substring(6, b.length)
- });
- else if (c.substring(0, 7) == "/umode ") this.t.send({
- cmd: "text",
- chan: this.f,
- data: "/mode " + this.b.h + " " + b.substring(7, b.length)
- });
- else if (c.substring(0, 8) == "/server ") dd(G, b.substring(8, b.length));
- else if (c.substring(0, 9) == "/showurl ") {
- c = b.substring(9, b.length);
- Sc(this.b, c)
- } else rd.match(b, {
- f: "",
- h: this.Xa
- }, function(f) {
- return function(g) {
- f.Ba(g)
- }
- }(this), function(f) {
- return function() {
- f.send({
- cmd: "text",
- chan: f.f,
- data: b
- })
- }
- }(this))
- }
- };
- Oc.prototype.close = q();
- Oc.prototype.send = function(b) {
- b.channel = this.f;
- V.G(b)
- };
- Oc.prototype.Ya = function(b) {
- this.ya = true;
- try {
- var c = false;
- if (b.cmd == "whoisreply")
- if (b.user) c = Dd(this, b);
- else {
- c = true;
- this.b.Ma({
- cmd: "log",
- nick: "",
- message: b.nick + " is away (" + b.away + ")"
- })
- }
- if (b.cmd == "channellist" || b.cmd == "whowas" || b.cmd == "who" || b.cmd == "invite") c = Dd(this, b);
- b.cmd == "whoisreply" && Xc(this, {
- cmd: "userdetails",
- nick: b.nick,
- user: b.user,
- host: b.host
- });
- if ((b.cmd == "notice" || b.cmd == "ctcp") && this.a.noticesToActiveTab) c = Dd(this, b);
- if (b.cmd == "error" && this.a.errorsToActiveTab) c = Dd(this, b);
- if (b.cmd == "infobar" ||
- b.cmd == "away" || b.cmd == "part" || b.cmd == "changenick" || b.cmd == "init") {
- b.cmd == "infobar" && this.b.Ma(b);
- Xc(this, b);
- c = true
- }
- b.cmd == "nickprompt" && this.yd(b.reason, function(e) {
- return function(f) {
- f && e.send({
- cmd: "text",
- data: "/nick " + f
- })
- }
- }(this));
- if (b.cmd == "changenick") b.nick == this.Xa && Ed(this, b.newnick);
- else if (b.cmd == "init") Ed(this, b.nick);
- else if (b.cmd == "closedchannel") {
- x && A("closedchannel", "cc cmd for : " + b.chan, K);
- this.pe.$f(b.chan)
- }
- c || this.b.Ma(b)
- } catch (d) {
- x && A(this.f + " (recv)", d + " (" + b + ")", C)
- }
- };
- function Ed(b, c) {
- b.Xa = c;
- b.b.uc(b.Xa)
- }
- function Dd(b, c) {
- for (ch in b.i)
- if (b.i.hasOwnProperty(ch))
- if (b.i[ch].W.va) {
- b.i[ch].Ya(c);
- return true
- }
- return false
- }
- function Wc(b, c, d, e) {
- b.kg || Fd(b.b, c, new xc(d, b.b.Me), e);
- for (ch in b.i) b.i.hasOwnProperty(ch) && Fd(b.i[ch].b, c, new xc(d, b.b.Me), e)
- }
- function Vc(b, c) {
- b.kg || hc(b.b.la, c);
- for (ch in b.i) b.i.hasOwnProperty(ch) && hc(b.i[ch].b.la, c)
- }
- function Xc(b, c) {
- for (ch in b.i) b.i.hasOwnProperty(ch) && b.i[ch].Ya(c)
- }
- function Bd(b, c) {
- x && A(b.f, "Removing channel: " + c, K);
- delete b.i[c];
- delete b.pe.i[c]
- }
- Oc.prototype.ic = function() {
- this.ya = false;
- this.b.ic();
- for (ch in this.i) this.i.hasOwnProperty(ch) && this.i[ch].ic()
- };
- Oc.prototype.closed = function(b) {
- this.ya = false;
- Kc(S, this.f);
- var c = (new Date).getTime();
- this.b.e(Y(this.b, "- - - - Disconnected - - - -", {}, "red", null, false, this.k, c));
- this.b.close();
- if (b) this.W && Ib(Q, this.f);
- else this.W && Jb(Q, this.W.id);
- for (ch in this.i) this.i.hasOwnProperty(ch) && this.i[ch].remove(false);
- for (ch in this.i) this.i.hasOwnProperty(ch) && Bd(this, ch)
- };
- Oc.prototype.Uc = function() {
- Cd(this.b);
- this.b.z();
- this.b.p.style.background = this.a.tabColorServer
- };
- Oc.prototype.yd = function(b, c) {
- b = window.prompt("Please choose a new nickname (" + b + ")");
- c(b)
- };
- function Gd() {
- this.Ec = []
- }
- Gd.prototype.clear = function() {
- this.Ec = []
- };
- Gd.prototype.load = function(b) {
- this.Ec = [];
- for (var c = 0; c < b.length; c++) this.Ec.push(new jd(b[c]))
- };
- Gd.prototype.match = function(b, c, d, e, f) {
- try {
- for (var g = 0; g < this.Ec.length; g++)
- if (this.Ec[g].exec(b, c, d, f)) return
- } catch (h) {
- x && A("aliases", "Issue running match " + h, K)
- }
- e && e()
- };
- Gd.prototype.prompt = function(b, c) {
- c && c("")
- };
- function jd(b) {
- this.od = b.match;
- this.bf = b.command.split(/\s\|\s/)
- }
- function Hd(b, c, d, e) {
- if (c == "") return e;
- return c + (d ? " " : "") + e
- }
- jd.prototype.execCommand = function(b, c, d, e, f, g, h) {
- for (var k = g; k < this.bf.length; k++) {
- g = this.bf[k].split(/\s/);
- var l = f,
- j = true;
- f = "";
- for (var n = h; n < g.length; n++) {
- var o = g[n];
- if (!(n == 0 && o.toLowerCase() == "/say"))
- if (o.match(/^\#?\$?\$\d+$/)) {
- h = o.match(/^\#?\$?\$(\d+)$/)[1];
- if (h > c.length || h < 1) {
- if (o.match(/^\#?\$\$/)) {
- l = "";
- break
- }
- return false
- }
- l = Hd(this, l, j, (o.substring(0, 1) == "#" ? "#" : "") + c[h - 1]);
- j = true
- } else if (o.match(/^\$\d+\-\d+$/)) {
- o = o.match(/^\$(\d+)\-(\d+)$/);
- h = o[1];
- o = o[2];
- if (h > c.length || o > c.length || o < h ||
- h < 1 || o < 1) return false;
- for (h = h; h <= o; h++) {
- l = Hd(this, l, j, c[h - 1]);
- j = true
- }
- } else if (o.match(/^\$\d+\-$/)) {
- h = o.match(/^\$(\d+)\-$/)[1];
- if (h > c.length || h < 1) return false;
- for (h = h; h <= c.length; h++) {
- l = Hd(this, l, j, c[h - 1]);
- j = true
- }
- } else if (o == "#") {
- l = Hd(this, l, j, b.f);
- j = true
- } else if (o.match(/^\$me([\.\,\!\?]?)/i)) {
- h = o.match(/^\$me([\.\,\!\?]?)/i);
- l = Hd(this, l, j, b.h + h[1]);
- j = true
- } else if (o == "$?") {
- f = function(w) {
- return function(p) {
- l = Hd(w, l, j, p);
- w.execCommand(b, c, d, e, l, k, n + 1)
- }
- }(this);
- Gd.prototype.prompt(this.od, f);
- return true
- } else if (o ==
- "$+") j = false;
- else {
- if (o.substring(0, 2) == "\\u" || o.substring(0, 2) == "\\x") try {
- l = Hd(this, l, j, String.fromCharCode(parseInt(o.substring(2, o.length), 16)))
- } catch (s) {} else l = Hd(this, l, j, o);
- j = true
- }
- }
- l != "" && d(l);
- h = 0
- }
- e && e();
- return false
- };
- jd.prototype.exec = function(b, c, d, e) {
- var f = b.split(/\s/);
- if (this.od && f.length > 0 && (f[0].toLowerCase() == this.od.toLowerCase() || b.toLowerCase() == this.od.toLowerCase())) {
- f.shift();
- this.execCommand(c, f, d, e, "", 0, 0);
- return true
- }
- return false
- };
- function Id(b, c, d, e) {
- this.a = e;
- this.window = b;
- this.zd = false;
- this.rh = 0;
- this.nd = false;
- this.je = 0;
- this.jf = c;
- this.We = d;
- this.Wb = function(f) {
- window != window.parent && window.parent.postMessage && window.parent.postMessage(t(f), "*")
- };
- this.alert = function(f) {
- if (this.a.windowAlertMaxFlashes == 0) return false;
- if (this.nd) return false;
- if (this.zd) return false;
- this.window.document.title = "* " + f + " *";
- this.nd = true;
- this.je = 0;
- var g = true,
- h = this.window.setInterval(function(k) {
- return function() {
- if (k.zd) {
- k.window.document.title = k.jf;
- k.nd = false;
- k.window.clearInterval(h)
- } else if (k.je > k.a.windowAlertMaxFlashes) {
- k.window.document.title = "[ " + f + " ]";
- k.nd = false;
- k.window.clearInterval(h)
- } else {
- k.je++;
- k.window.document.title = g ? k.We : "* " + f + " *";
- g = !g
- }
- }
- }(this), this.a.windowAlertPeriod);
- return true
- };
- this.xg = 0;
- this.Fc = function(f) {
- this.xg++;
- var g = function(k) {
- return function() {
- k.zd = true;
- k.window.document.title = k.jf;
- return true
- }
- }(this),
- h = function(k) {
- return function() {
- k.zd = false;
- k.window.document.title = k.We;
- return true
- }
- }(this);
- if (f.addEventListener) {
- f.addEventListener("focus",
- g, false);
- f.addEventListener("blur", h, false)
- } else {
- f.attachEvent("onfocus", g);
- f.attachEvent("onblur", h)
- }
- }
- }
- function Jd() {
- this.hasFocus = true;
- this.Qb = null;
- this.Gd = {};
- this.Jb = [];
- this.Ib = {};
- this.Bf = 0;
- this.Fg = function(d, e) {
- if (!this.hasFocus)
- if (!this.Gd[d]) {
- this.Gd[d] = e;
- this.Jb.push(e);
- this.update()
- }
- };
- this.wf = function(d, e) {
- if (!this.hasFocus) {
- if (this.Ib[d]) this.Ib[d].rf++;
- else this.Ib[d] = {
- rf: 1,
- ng: e
- };
- this.Bf++;
- this.update()
- }
- };
- this.update = function() {
- this.Qb != null && this.Qb.cancel();
- var d = "";
- if (this.Jb.length > 0) {
- d += this.Jb.length + " New PM" + (this.Jb.length == 1 ? "" : "s");
- if (this.Jb.length < 4) {
- d += " (";
- for (var e = 0; e < this.Jb.length; e++) {
- if (e >
- 0) d += ", ";
- d += this.Jb[e]
- }
- d += ")"
- }
- }
- var f = "";
- for (e in this.Ib)
- if (this.Ib.hasOwnProperty(e))
- if (!this.Gd[e]) {
- if (f != "") f += ", ";
- f += this.Ib[e].ng + "(" + this.Ib[e].rf + ")"
- }
- if (f != "") {
- if (d != "") d += ", ";
- d += "New chat from " + f
- }
- if (window.webkitNotifications && F.desktopNotifications)
- if (window.webkitNotifications.checkPermission() == 0) {
- this.Qb = window.webkitNotifications.createNotification("http://mibbit.com/icon.png", "Mibbit", d);
- this.Qb.show()
- } else x && A("Notifications", "NO PERMISSION TO DISPLAY NOTIFICATIONS")
- };
- this.reset =
- function() {
- this.Qb != null && this.Qb.cancel();
- this.Qb = null;
- this.Gd = {};
- this.Jb = [];
- this.Ib = {};
- this.Bf = 0
- };
- this.Fc = function(d, e, f) {
- if (d.addEventListener) {
- d.addEventListener("focus", e, false);
- d.addEventListener("blur", f, false)
- } else {
- d.attachEvent("onfocus", e);
- d.attachEvent("onblur", f)
- }
- };
- var b = function(d) {
- return function() {
- d.hasFocus = true;
- d.reset();
- x && A("Notifications", "onfocus")
- }
- }(this),
- c = function(d) {
- return function() {
- d.hasFocus = false;
- x && A("Notifications", "onblur")
- }
- }(this);
- this.Fc(window, b, c)
- }
- function md() {
- this.Ie = this.bold = false;
- this.rd = this.jc = null
- }
- md.prototype.reset = function() {
- this.Ie = this.bold = false;
- this.rd = this.jc = null
- };
- function ud(b, c) {
- var d = "";
- if (b.bold) d += "\u0002";
- if (b.Ie) d += "\u001f";
- var e = "";
- if (b.jc != null) e += b.jc;
- if (b.rd != null) e += "," + b.rd;
- if (e != "") d += "\u0003" + e;
- b = d.substring(d.length - 1, d.length);
- e = c.substring(0, 1);
- if (b >= "0" && b <= "9" && e >= "0" && e <= "9") d += " ";
- d += c;
- return d
- }
- function X(b, c, d, e, f, g, h) {
- try {
- this.Af = h;
- this.Fd = this.ue = this.ve = false;
- this.p = b;
- this.a = d;
- this.d = b.ownerDocument;
- this.w = e;
- this.aa = this.a.extraContentWidth;
- this.U = new Kd(this);
- this.h = "unknown";
- this.$ = {};
- this.ed = 0;
- this.Lc = true;
- this.Ve = f;
- Cd(this);
- this.vc = new R;
- this.ob = new cc(new R);
- this.ob = new Tb(this.ob, this.a);
- if (!Rc) this.ob = new Zb(e.eb, this.ob, this.a);
- this.ob = new ac(this.ob);
- d = {};
- d.th = function(n) {
- n = n.substring(6, n.length);
- var o = "",
- s = n.indexOf("/");
- if (s != -1) {
- o = n.substring(s + 1, n.length);
- n = n.substring(0,
- s);
- if ("#&+".indexOf(o.substring(0, 1)) == -1) o = "#" + o
- }
- try {
- s = "mib_" + Ld;
- if (fd) s = fd;
- var w = "",
- p = "",
- r = F.defaultCharset;
- if (Md) {
- var y = Md.rg;
- if (y)
- for (var z = 0; z < y.length; z++)
- if (y[z].Sf == n) {
- s = y[z].h;
- w = y[z].Kg;
- p = y[z].Tf;
- r = y[z].charset;
- break
- }
- }
- Zc(G, n, s, w, o, false, false, p, r)
- } catch (B) {}
- };
- this.Me = new Zb(e.eb, new Tb(new R, this.a, d), this.a);
- this.Wf = new Zb(e.eb, new Tb(new cc(new R)), this.a);
- f = {};
- u(this.a, f);
- f.yh = false;
- this.Rd = new ac(new Zb(e.eb, new Tb(new cc(new R), f, d), this.a));
- u({
- border: "0",
- fontSize: "13px",
- position: "absolute",
- textAlign: "left",
- overflow: "hidden"
- }, b.style);
- this.lb = {
- left: 0,
- right: 0,
- top: Pb,
- bottom: Qb
- };
- if (!O && this.a.useTabList) this.lb.left = this.a.tabListWidth;
- u({
- top: this.lb.top + "px",
- bottom: this.lb.bottom + "px",
- left: this.lb.left + "px",
- right: this.lb.right + "px"
- }, b.style);
- this.S = Nd(this);
- u({
- display: "block",
- overflow: "auto",
- overflowX: "hidden"
- }, this.S.style);
- if (kc) this.S.style.marginRight = "15px";
- b.appendChild(this.S);
- this.Fb = this.d.createElement("div");
- u({
- padding: "0",
- margin: "0",
- position: "absolute",
- top: "0px",
- left: "0px",
- right: "0px",
- overflow: "hidden"
- }, this.Fb.style);
- this.Ia = new mb(this.Fb, this.a, g);
- b.appendChild(this.Fb);
- if (c) {
- this.oa = true;
- this.X = this.d.createElement("div");
- u({
- position: "absolute",
- right: "0px",
- overflow: "auto",
- overflowX: "hidden",
- textAlign: "left"
- }, this.X.style);
- b.appendChild(this.X);
- this.c = new ga(this.X, e.hh, this.a)
- }
- this.ha = this.d.createElement("div");
- u({
- position: "absolute",
- overflow: "hidden",
- bottom: "0px",
- left: "0px",
- right: "0px"
- }, this.ha.style);
- e.zg = function(n) {
- return function(o) {
- n.w.Pg(o)
- }
- }(this);
- e.Ld =
- function(n) {
- return function() {
- n.Ld(true)
- }
- }(this);
- e.pg = function(n) {
- return function() {
- n.Ld(false)
- }
- }(this);
- e.Rg = function(n) {
- return function() {
- n.w.Qg(n.Tc.value())
- }
- }(this);
- if (c) {
- e.qf = function(n) {
- return function() {
- Od(n, !n.ua)
- }
- }(this);
- this.Z = this.d.createElement("div");
- u({
- position: "absolute",
- right: "0px",
- overflow: "auto",
- overflowX: "hidden",
- textAlign: "left"
- }, this.Z.style);
- this.Z.style.display = "none";
- this.ua = false;
- b.appendChild(this.Z)
- }
- e.ig = function(n) {
- return function(o, s) {
- var w = n.c.c[o],
- p = n.c.c[s];
- if (n.a.chatInputTabSort ==
- "idle" && w && p) {
- if (w.Ha > p.Ha) return -1;
- if (w.Ha < p.Ha) return 1
- } else {
- if (o < s) return -1;
- if (o > s) return 1
- }
- return 0
- }
- }(this);
- this.xd = this.d.createElement("form");
- this.xd.style.display = "inline";
- this.xd.setAttribute("accept-charset", "UTF-8");
- this.xd.onsubmit = e.Id;
- this.n = new Pa(this.ha, this.a, this.xd, e, this.a.showInputOptions && this.Ve);
- b.appendChild(this.ha);
- this.qb = Nd(this);
- this.Tc = new tc(this.qb);
- b.appendChild(this.qb);
- this.gb = Nd(this);
- this.gb.style.background = "white";
- var k = function(n) {
- return function(o) {
- n.w.Cf &&
- n.w.Cf(o)
- }
- }(this);
- this.Fa = new mc(this.gb, this.a, k);
- b.appendChild(this.gb);
- this.ub = this.d.createElement("div");
- u({
- padding: "0",
- position: "absolute",
- right: "0px",
- bottom: "0px",
- cursor: "pointer",
- textAlign: "center",
- fontSize: "13px",
- verticalAlign: "middle"
- }, this.ub.style);
- this.ub.onclick = function(n) {
- return function() {
- e.Id();
- hb(n.n.da);
- n.focus()
- }
- }(this);
- this.ub.appendChild(document.createTextNode(E.g("SendButton")));
- b.appendChild(this.ub);
- if (O) {
- this.onresize = function(n) {
- return function() {
- Pd(n)
- }
- }(this);
- window.attachEvent ?
- window.attachEvent("onresize", this.onresize) : window.addEventListener("resize", this.onresize, false);
- window.setTimeout(function(n) {
- return function() {
- n.C();
- Pd(n)
- }
- }(this), 100)
- }
- function l(n) {
- return function() {
- n.focus()
- }
- }
- this.la = new ec(this.S, this.a, l(this));
- for (b = 0; b < 40; b++) gc(this.la, this.ed++, Y(this));
- this.z();
- U(this);
- T && T.Fc(this.n.ea)
- } catch (j) {
- x && A("ChatGuiModule", j, C)
- }
- }
- var Yc;
- X.prototype.z = function() {
- if (this.Lc) {
- this.ve = false;
- this.c && this.c.z();
- this.la.z();
- this.n.Ad = this.a.showInputOptions && this.Ve;
- this.n.z();
- this.Ia.z();
- u({
- background: this.a.sendButtonBackground,
- border: "1px solid " + this.a.sendButtonBorder,
- color: this.a.sendButtonColor,
- fontFamily: this.a.chatInputFontFamily,
- fontSize: this.a.chatInputFontSize + "px",
- padding: this.a.chatInputPadding + "px",
- Vf: this.a.chatInputRounding + "px",
- MozBorderRadius: this.a.chatInputRounding + "px",
- WebkitBorderRadius: this.a.chatInputRounding + "px"
- },
- this.ub.style);
- var b = {
- background: this.a.chatPaneBackground,
- border: "1px solid " + this.a.chatPaneBorder
- };
- b.borderRadius = this.a.chatPaneRounding + "px";
- b.MozBorderRadius = this.a.chatPaneRounding + "px";
- b.WebkitBorderRadius = this.a.chatPaneRounding + "px";
- b.padding = this.a.chatPaneRounding + "px";
- u(b, this.S.style);
- u(b, this.gb.style);
- u(b, this.qb.style);
- this.C()
- } else this.ve = true
- };
- function Nd(b) {
- b = b.d.createElement("div");
- u({
- position: "absolute",
- overflow: "hidden",
- display: "none",
- left: "0px",
- right: "0px"
- }, b.style);
- return b
- }
- function Qd(b, c) {
- b.Ta = c;
- b.a.hideULonEC && pd(b, !c);
- b.C();
- U(b)
- }
- X.prototype.Ld = function(b) {
- this.Tc.Kd(b);
- this.C();
- U(this)
- };
- function pd(b, c) {
- if (!b.Tc.vb()) {
- c && b.ua && Od(b, false);
- if (b.c) {
- b.oa = c;
- b.Hd = c;
- b.C();
- U(b)
- }
- }
- }
- function Od(b, c) {
- if (!b.Tc.vb()) {
- if (c && b.oa) {
- b.Hd = true;
- b.oa = false
- }
- if (!c && !b.oa && b.Hd) b.oa = true;
- b.ua = c;
- if (b.ua) {
- for (; b.Z.firstChild;) b.Z.removeChild(b.Z.firstChild);
- var d = function(f) {
- return function() {
- Od(f, false)
- }
- }(b);
- function e(f, g, h) {
- var k = f.ownerDocument.createElement("div");
- u({
- border: "1px solid #888",
- background: "#ccc",
- padding: "3px",
- margin: "2px",
- fontFamily: "sans-serif",
- cursor: "pointer",
- fontSize: "13px",
- borderRadius: "3px",
- MozBorderRadius: "3px",
- WebkitBorderRadius: "3px"
- }, k.style);
- k.appendChild(f.ownerDocument.createTextNode(g));
- k.onmouseover = function() {
- u({
- border: "1px solid #ccc",
- background: "#eee"
- }, this.style)
- };
- k.onmouseout = function() {
- u({
- border: "1px solid #888",
- background: "#ccc"
- }, this.style)
- };
- k.onclick = function() {
- d();
- h && h()
- };
- f.appendChild(k)
- }
- e(b.Z, b.Hd ? "Hide userlist" : "Show userlist", function(f) {
- return function() {
- pd(f, !f.Hd)
- }
- }(b));
- e(b.Z, b.a.needSendButton ? "Hide send button" : "Show send button", function(f) {
- return function() {
- f.a.needSendButton = !f.a.needSendButton;
- Rd(f.a)
- }
- }(b));
- b.w.Hf && b.w.Hf(function(f) {
- return function(g, h) {
- e(f,
- g, h)
- }
- }(b.Z), b.Z)
- }
- b.C();
- U(b);
- b.focus()
- }
- }
- function U(b) {
- b.S.scrollTop = b.S.scrollHeight
- }
- function Sd(b) {
- return b.S.scrollTop + b.S.clientHeight >= b.S.scrollHeight - b.a.chatFontSize
- }
- X.prototype.focus = function() {
- try {
- this.n.ea.focus()
- } catch (b) {}
- };
- function Td() {}
- X.prototype.jd = function() {
- if (!this.ld) {
- this.ld = true;
- this.la.jd("--MARKER--")
- }
- };
- function sd(b) {
- if (b.c) return b.c.c[b.h];
- return null
- }
- function zd(b) {
- b.la.clear();
- for (var c = 0; c < 40; c++) gc(b.la, b.ed++, Y(b));
- U(b)
- }
- X.prototype.e = function(b, c, d) {
- var e = Sd(this);
- if (!d && !this.Lc && this.a.showMarkers) this.ld || this.jd();
- gc(this.la, b + " " + this.ed++, c, d);
- !d && e && U(this)
- };
- function yd(b, c) {
- Fd(b, b.ed++, c)
- }
- function Fd(b, c, d, e) {
- var f = Sd(b);
- fc(b.la, c, d, e);
- f && U(b)
- }
- X.prototype.Gc = function() {
- if (this.c) {
- this.$ = {};
- this.n.da.Rb = {};
- this.U.Gc();
- this.c.clear();
- Cd(this)
- } else {
- delete this.$[this.h.toLowerCase()];
- lb(this.n.da, this.h)
- }
- };
- X.prototype.close = function() {
- this.c && this.c.fe();
- if (this.onresize) window.detachEvent ? window.detachEvent("onresize", this.onresize) : window.removeEventListener("resize", this.onresize, false)
- };
- function ld(b, c) {
- return typeof b.U.Eb[c] != "undefined"
- }
- function kd(b, c, d) {
- var e = null;
- if (b.c) e = b.c.c[c];
- if (d) {
- b.U.Eb[c] = true;
- if (e) {
- e.yf = e.P;
- Ka(e, {
- name: "ignored",
- title: "Ignored"
- })
- }
- } else {
- delete b.U.Eb[c];
- e && e.yf && Ka(e, e.yf)
- }
- }
- X.prototype.Bb = function(b) {
- (this.Lc = b) && this.ve && this.z();
- b && this.ue && this.C();
- if (b) {
- if (this.n.C() || this.Ia.C()) this.C()
- } else if (this.ld) {
- this.ld = false;
- hc(this.la, "--MARKER--")
- }
- try {
- if (b) {
- U(this);
- window.setTimeout(function(d) {
- return function() {
- d.focus()
- }
- }(this), 200)
- } else window.focus()
- } catch (c) {
- x && A("activecb", c, C)
- }
- };
- X.prototype.C = function() {
- if (this.Lc) {
- this.ue = false;
- try {
- this.n.C();
- this.Ia.C();
- var b = true;
- if (O) b = false;
- var c = this.n.Va() + 2 + this.a.cgmMargins * 2,
- d = this.Ia.Va(),
- e = this.a.cgmMargins + d,
- f = this.a.cgmMargins + 2 + this.a.userListWidth;
- if (b) {
- if (!this.Da) {
- this.Da = this.d.createElement("div");
- this.Da.onmousedown = function(j) {
- return function(n) {
- if (!n) n = window.event;
- j.Fd = true;
- j.gg = n.clientX;
- j.hg = j.a.userListWidth;
- j.Ta && nc(j.Fa, true);
- document.onmousemove = function() {
- return function(o) {
- if (!o) o = window.event;
- j.a.userListWidth =
- j.hg + (j.gg - o.clientX);
- if (j.a.userListWidth < 0) j.a.userListWidth = 0;
- o = document.body.clientWidth - 2 - 2 - j.a.cgmMargins * 3;
- if (j.Ta) o -= j.aa + 2 + j.a.cgmMargins;
- if (!O && j.a.useTabList) o -= j.a.tabListWidth;
- if (j.a.userListWidth > o) j.a.userListWidth = o;
- j.C();
- return false
- }
- }();
- document.onmouseup = function() {
- j.Fd = false;
- document.onmousemove = null;
- document.onmouseup = null;
- nc(j.Fa, false);
- j.C();
- U(j);
- j.focus();
- Rd(j.a, "CGMlayout")
- };
- return false
- }
- }(this);
- this.p.appendChild(this.Da);
- u({
- position: "absolute",
- cursor: "move"
- }, this.Da.style);
- this.Da.onmouseover = function() {
- this.style.background = "#888"
- };
- this.Da.onmouseout = function() {
- this.style.background = "transparent"
- }
- }
- this.Da.style.width = this.a.cgmMargins + "px";
- this.Da.style.top = e + this.a.cgmMargins + "px";
- this.Da.style.bottom = c + "px";
- this.Da.style.right = (this.Ta && this.a.extraContentPosition == "right" ? f + this.aa + 2 + this.a.cgmMargins : f) + "px";
- this.Da.style.display = this.oa || this.ua ? "block" : "none"
- }
- u({
- padding: "0",
- margin: "0",
- position: "absolute",
- top: "0px",
- left: "0px",
- height: d + "px",
- right: "0px",
- overflow: "hidden"
- },
- this.Fb.style);
- Ud(this, this.Fb, 1, 1, 0, 1);
- var g = this.a.cgmMargins;
- if (!O && this.a.useTabList) g += this.a.tabListWidth;
- if (!this.Af || !this.Af.Eg) Adverts.Ug(g, this.a.cgmMargins + Pb);
- u({
- position: "absolute",
- overflow: "hidden",
- bottom: "0px",
- left: "0px",
- height: this.n.Va() + "px",
- right: (this.a.needSendButton ? f : 0) + "px"
- }, this.ha.style);
- Ud(this, this.ha, 0, 1, 1, 1);
- this.ub.style.display = this.a.needSendButton ? "block" : "none";
- this.ub.style.height = this.n.Va() - 2 * this.a.chatInputPadding + "px";
- this.ub.style.width = this.a.userListWidth -
- 2 * this.a.chatInputPadding + "px";
- Ud(this, this.ub, 0, 1, 1, 0);
- if (this.Tc.vb()) {
- this.qb.style.top = e + "px";
- this.qb.style.bottom = c + "px";
- Ud(this, this.qb, 1, 1, 0, 1);
- this.S.style.display = "none";
- if (this.oa) this.X.style.display = "none";
- if (this.ua) this.Z.style.display = "none";
- if (this.Ta) this.gb.style.display = "none"
- } else {
- var h = document.body.clientWidth - 2 - 2 - this.a.cgmMargins * 3;
- if (this.oa || this.ua) h -= this.a.userListWidth + this.a.cgmMargins + 2;
- if (!O && this.a.useTabList) h -= this.a.tabListWidth;
- if (this.aa > h) this.aa = h;
- if (kc) this.S.style.marginRight =
- "15px";
- u({
- display: "block",
- top: e + "px",
- bottom: c + "px"
- }, this.S.style);
- this.S.style.left = (this.Ta && this.a.extraContentPosition == "left" ? this.aa + 2 + this.a.cgmMargins : "0") + "px";
- this.S.style.right = (this.oa || this.ua ? f : 0) + (this.Ta && this.a.extraContentPosition != "left" ? this.aa + 2 + this.a.cgmMargins : 0) + "px";
- Ud(this, this.S, 1, 1, 0, 1);
- this.X && Ud(this, this.X, 1, 1, 0, 0);
- this.Z && Ud(this, this.Z, 1, 1, 0, 0);
- if (this.oa) {
- u({
- position: "absolute",
- right: (this.Ta && this.a.extraContentPosition == "right" ? this.aa + 2 + this.a.cgmMargins : "0") +
- "px",
- overflow: "auto",
- display: "block",
- top: e + "px",
- bottom: c + "px",
- width: this.a.userListWidth - 2 * this.a.ulistPaneRounding + "px",
- overflowX: "hidden",
- textAlign: "left"
- }, this.X.style);
- if (this.Z) this.Z.style.display = "none"
- } else if (this.ua) {
- u({
- position: "absolute",
- right: (this.Ta && this.a.extraContentPosition == "right" ? this.aa + 2 + this.a.cgmMargins : "0") + "px",
- overflow: "auto",
- display: "block",
- top: e + "px",
- bottom: c + "px",
- width: this.a.userListWidth - 2 * this.a.ulistPaneRounding + "px",
- padding: this.a.ulistPaneRounding + "px",
- overflowX: "hidden",
- textAlign: "left"
- }, this.Z.style);
- if (this.X) this.X.style.display = "none"
- } else {
- if (this.X) this.X.style.display = "none";
- if (this.Z) this.Z.style.display = "none"
- }
- if (this.Ta) {
- u({
- display: "block",
- top: e + "px",
- bottom: c + "px",
- width: this.aa + "px",
- left: this.a.extraContentPosition == "left" ? "0px" : "auto",
- right: this.a.extraContentPosition == "left" ? "auto" : ((this.oa || this.ua) && this.a.extraContentPosition != "right" ? f : 0) + "px"
- }, this.gb.style);
- Ud(this, this.gb, 1, 1, 0, 1);
- if (b) {
- if (!this.ia) {
- this.ia = this.d.createElement("div");
- this.ia.onmousedown =
- function(j) {
- return function(n) {
- if (!n) n = window.event;
- j.Fd = true;
- j.ef = n.clientX;
- j.ff = j.aa;
- j.Ta && nc(j.Fa, true);
- document.onmousemove = function() {
- return function(o) {
- if (!o) o = window.event;
- j.aa = j.a.extraContentPosition == "left" ? j.ff - (j.ef - o.clientX) : j.ff + (j.ef - o.clientX);
- if (j.aa < 0) j.aa = 0;
- o = document.body.clientWidth - 2 - 2 - j.a.cgmMargins * 3;
- if (j.oa || j.ua) o -= j.a.userListWidth + j.a.cgmMargins + 2;
- if (!O && j.a.useTabList) o -= j.a.tabListWidth;
- if (j.aa > o) j.aa = o;
- j.C();
- return false
- }
- }();
- document.onmouseup = function() {
- j.Fd = false;
- document.onmousemove = null;
- document.onmouseup = null;
- nc(j.Fa, false);
- j.C();
- U(j);
- j.focus()
- };
- return false
- }
- }(this);
- this.p.appendChild(this.ia);
- u({
- position: "absolute",
- cursor: "move"
- }, this.ia.style);
- this.ia.onmouseover = function() {
- this.style.background = "#888"
- };
- this.ia.onmouseout = function() {
- this.style.background = "transparent"
- }
- }
- if (this.a.extraContentPosition == "left") {
- this.ia.style.right = "auto";
- this.ia.style.left = this.aa + 2 + this.a.cgmMargins + "px"
- } else if (this.a.extraContentPosition == "middle") {
- var k = this.oa || this.ua ?
- this.a.userListWidth + this.a.cgmMargins + 2 : 0;
- k += this.aa + 2 + this.a.cgmMargins;
- this.ia.style.left = "auto";
- this.ia.style.right = k + "px"
- } else {
- this.ia.style.left = "auto";
- this.ia.style.right = this.aa + 2 + this.a.cgmMargins + "px"
- }
- u({
- width: this.a.cgmMargins + "px",
- top: e + this.a.cgmMargins + "px",
- bottom: c + "px",
- display: "block"
- }, this.ia.style)
- }
- } else {
- if (this.ia) this.ia.style.display = "none";
- this.gb.style.display = "none"
- }
- }
- O && Pd(this)
- } catch (l) {
- x && A("ChatGuiModule.layout", l, C)
- }
- } else this.ue = true
- };
- function Pd(b) {
- var c = document.body.clientHeight - b.lb.top - b.lb.bottom,
- d = document.body.clientWidth - b.lb.left - b.lb.right;
- b.p.style.height = c + "px";
- b.p.style.width = d + "px";
- var e = c - (b.n.Va() + 2 + b.Ia.Va() + F.cgmMargins * 4 + 4);
- d = d - 2 - F.cgmMargins * 2;
- x && A("size", "height=" + c + " " + e, K);
- b.S.style.height = e - 2 * b.a.chatPaneRounding + "px";
- if (b.oa) b.X.style.height = e - 2 * b.a.ulistPaneRounding + "px";
- if (b.ua) b.Z.style.height = e - 2 * b.a.ulistPaneRounding + "px";
- b.gb.style.height = e + "px";
- if (b.qb) {
- b.qb.style.height = e - 2 * b.a.chatPaneRounding +
- "px";
- b.qb.style.width = d - 2 * b.a.chatPaneRounding + "px"
- }
- c = parseInt(b.S.style.left);
- e = parseInt(b.S.style.right);
- b.S.style.width = d - 2 * b.a.chatPaneRounding - c - e + "px";
- c = parseInt(b.ha.style.left);
- e = parseInt(b.ha.style.right);
- b.ha.style.width = d - c - e + "px";
- c = parseInt(b.Fb.style.left);
- e = parseInt(b.Fb.style.right);
- b.Fb.style.width = d - c - e + "px"
- }
- function Ud(b, c, d, e, f, g) {
- b = b.a.cgmMargins + "px";
- if (d) c.style.marginTop = b;
- if (e) c.style.marginRight = b;
- if (f) c.style.marginBottom = b;
- if (g) c.style.marginLeft = b
- }
- X.prototype.ic = function() {
- try {
- var b = (new Date).getTime();
- this.e("system", Y(this, "You have disconnected from the server", {}, "red", "system", false, this.vc, b));
- this.Gc()
- } catch (c) {
- x && A("disconnected", "disconnected error... " + c, C)
- }
- };
- var Vd = [{
- Df: "parseYouTubes",
- Cb: "youtube",
- vd: "Show YouTube video",
- P: "https://s3.amazonaws.com/mibbit/gfx/youtube.png",
- le: 42,
- ke: 30,
- match: /youtube\.com\/watch\?.*v\=([a-zA-Z0-9\_\-]*)/i,
- wd: true
- }, {
- Df: "parseGoogleViewer",
- Cb: "gview",
- vd: "gview",
- match: /.*\.(pdf|ppt|doc|xls|xlsx|pptx|pages|ai|psd|dxf|svg|eps|ps|ttf|xps)/i,
- re: "View next to chat",
- wd: false
- }];
- function Wd(b, c) {
- for (var d = 0; d < Vd.length; d++) {
- var e = Vd[d],
- f = c.match(e.match);
- if (f) return {
- le: e.le,
- ke: e.ke,
- P: e.P,
- Cb: e.Cb,
- vd: e.vd,
- wd: e.wd,
- match: f,
- enabled: b.a && b.a[e.Df],
- re: e.re
- }
- }
- return false
- }
- function Sc(b, c, d) {
- var e = Wd(b, c);
- if (e) {
- Qd(b, true);
- e.Cb == "youtube" && rc(b.Fa, e.match[1], c, function(f) {
- return function() {
- Qd(f, false)
- }
- }(b))
- } else {
- Qd(b, true);
- e = function(f) {
- return function() {
- Qd(f, false)
- }
- }(b);
- if (d) e = q();
- pc(b.Fa, c, e, d)
- }
- }
- function Cd(b) {
- b.k = Xd(b, b.w);
- if (b.a.parseSimple) b.Vc = new ac(b.Vc);
- if (b.a.parseSmilies) b.Vc = new Xb(b.Vc, b.a);
- if (b.a.parseLinks) b.Vc = new Tb(b.Vc, b.a, Yd(b));
- x && A("createRenderer", "Created a new renderer", K)
- }
- function Yd(b) {
- var c = {};
- c.youtube = function(d) {
- return function(e, f) {
- if (e[1]) {
- Qd(d, true);
- rc(d.Fa, e[1], f, function() {
- Qd(d, false)
- })
- }
- }
- }(b);
- c.web = function(d) {
- return function(e) {
- Qd(d, true);
- pc(d.Fa, e, function() {
- Qd(d, false)
- })
- }
- }(b);
- c.gview = function(d) {
- return function(e) {
- Qd(d, true);
- qc(d.Fa, e, function() {
- Qd(d, false)
- })
- }
- }(b);
- c.showImage = function(d) {
- return function(e) {
- Qd(d, true);
- sc(d.Fa, e, function() {
- Qd(d, false)
- })
- }
- }(b);
- c.mediaCheck = function(d) {
- return function(e) {
- e = Wd(d, e);
- if (!e.enabled) return false;
- return e
- }
- }(b);
- c.ircLink =
- function(d) {
- d = d.substring(6, d.length);
- var e = "",
- f = d.indexOf("/");
- if (f != -1) {
- e = d.substring(f + 1, d.length);
- d = d.substring(0, f);
- if ("#&+".indexOf(e.substring(0, 1)) == -1) e = "#" + e
- }
- try {
- var g = ed();
- if (fd) g = fd;
- var h = f = "",
- k = F.defaultCharset;
- if (Md) {
- var l = Md.rg;
- if (l)
- for (var j = 0; j < l.length; j++)
- if (l[j].Sf == d) {
- g = l[j].h;
- f = l[j].Kg;
- h = l[j].Tf;
- k = l[j].charset;
- break
- }
- }
- Zc(G, d, g, f, e, false, false, h, k)
- } catch (n) {}
- };
- return c
- }
- function Xd(b, c) {
- var d = new R;
- if (b.xh) d = new dc(d);
- if (b.a.parseSimple) d = new ac(d);
- if (b.a.parseNicks) d = new Yb(b.$, d, function(e) {
- return function(f, g) {
- Zd(e, f, g)
- }
- }(b));
- if (b.a.parseColor) d = new cc(d);
- if (b.a.parseSmilies) d = new Xb(d, b.a);
- if (b.a.parseChannels && c.eb) d = new Zb(c.eb, d, b.a);
- if (b.a.parseLinks) d = new Tb(d, b.a, Yd(b));
- return d
- }
- function Zd(b, c, d) {
- try {
- var e = c == b.h.toLowerCase();
- d.style.color = e ? b.a.nickHighlightMe : b.a.nickHighlight;
- d.style.fontWeight = e ? "bold" : "normal";
- if (b.a.chatBackgroundHighlight) {
- var f = b.la,
- g = b.a;
- d.onmouseover = function() {
- return function() {
- c && ic(f, c.toLowerCase(), {
- background: g.chatBackgroundHighlight
- })
- }
- }();
- d.onmouseout = function() {
- return function() {
- c && ic(f, c.toLowerCase(), {
- background: g.chatBackground
- })
- }
- }()
- }
- } catch (h) {}
- }
- function Y(b, c, d, e, f, g, h, k, l, j, n) {
- e || (e = b.a.colorChat);
- var o = b.a,
- s = b.w.Dg,
- w = b.la,
- p = n ? n : g ? b.a.nickColorMe : j ? b.a.nickColorGuest : l ? b.a.nickColorNotice : b.a.nickColor;
- return {
- tb: function(r) {
- lc(w, r, o, f, p, s, e, h, c, d)
- },
- oc: function(r) {
- w.oc(r, o, f, p, s)
- },
- pc: function(r) {
- w.pc(r, o, k)
- }
- }
- }
- X.prototype.Ma = function(b) {
- this.U.Ma(b)
- };
- var Bb = 94,
- Pb = 120,
- Qb = 0,
- O = false;
- X.prototype.Ae = function(b) {
- this.Fa.Ae(b)
- };
- X.prototype.uc = function(b) {
- this.h = b;
- this.n.uc(b)
- };
- function Kd(b) {
- this.b = b;
- this.a = b.a;
- this.mh = this.Ue = this.Te = true;
- this.Ac = false;
- this.gd = true;
- this.F = {};
- this.Eb = {};
- this.Xd = [];
- this.Jc = ""
- }
- Kd.prototype.Gc = function() {
- this.F = {};
- this.Eb = {}
- };
- Kd.prototype.Ma = function(b) {
- try {
- var c = (new Date).getTime(),
- d = b.channel;
- if (d) {
- var e = d.indexOf(":", 10);
- d = d.substring(e + 1, d.length)
- }
- if (b.cmd == "whoisreply") yd(this.b, new wc(b, this.a, this.b.Me));
- else if (b.cmd == "motd" && this.a.showMOTD) {
- var f = Y(this.b, b.motd, {}, "#888", null, false, this.b.k, c);
- f.tb = function(N) {
- var I = N.a;
- return function(J) {
- u({
- overflow: "hidden",
- fontFamily: "monospace",
- paddingBottom: "1px",
- paddingTop: "1px",
- paddingLeft: "3px",
- fontSize: I.chatFontSize + "px",
- color: "#888",
- background: I.chatBackground
- },
- J.style);
- J.setAttribute("valign", "top");
- N.ob.reset();
- N.ob.r += b.message;
- N.ob.A(J)
- }
- }(this.b);
- this.b.e("motd", f);
- this.Ac && $d(this.Cd, b.message, this.b.$)
- } else if (b.cmd == "infobar")
- if (b.type == "announcement") this.b.Ia.Eh(b.message);
- else {
- if (b.type == "topic") {
- pb(this.b.Ia, b.topic, this.b.Rd);
- this.b.C()
- }
- }
- else if (b.cmd == "whowas") {
- var g = ">>> " + b.nick + " was " + b.user + "@" + b.host + " " + b.realname;
- this.b.e("whowas", Y(this.b, g, {}, this.a.colorNotice, null, false, this.b.k, c))
- } else if (b.cmd == "who") {
- g = ">>> " + b.nick + " (" + b.user +
- "@" + b.host + " " + b.realname + ") " + b.serv + " (" + b.hops + " hops) " + b.chan + " " + b.flag;
- this.b.e("who", Y(this.b, g, {}, this.a.colorNotice, null, false, this.b.k, c))
- } else if (b.cmd == "channellist") {
- g = b.name + " (" + b.users + ") " + b.topic;
- this.b.e("channellist", Y(this.b, g, {}, this.a.colorNotice, null, false, this.b.Wf, c))
- } else if (b.cmd == "invite") {
- this.b.e(b.nick, Y(this.b, "%%% " + b.nick + " " + E.g("InviteText") + " " + b.localchannel, {}, this.a.colorInvite, null, false, this.b.k, c));
- this.b.w.M && this.b.w.M()
- } else if (b.cmd == "notice" && this.Ue) {
- if (!ld(this.b,
- b.nick)) {
- this.b.e(b.nick.toLowerCase(), Y(this.b, b.notice, {}, this.a.colorNotice, b.nick, b.nick == this.b.h, this.b.k, c, true));
- this.b.w.M && this.b.w.M(b.notice.indexOf(this.b.h) != -1)
- }
- } else if (b.cmd == "ctcp" && this.a.showCTCP) {
- if (!ld(this.b, b.nick)) {
- this.b.e(b.nick.toLowerCase(), Y(this.b, b.data, {}, this.a.colorNotice, b.nick, b.nick == this.b.h, this.b.k, c, true));
- this.b.w.M && this.b.w.M(b.data.indexOf(this.b.h) != -1)
- }
- } else if (b.cmd == "ban") this.a.showBans && this.b.e("::ban", Y(this.b, "--- " + b.by + " " + E.g("BanText") + " " +
- b.nick, {}, this.a.colorBan, null, false, this.b.k, c));
- else if (b.cmd == "unban") this.a.showBans && this.b.e("::ban", Y(this.b, "--- " + b.by + " " + E.g("UnbanText") + " " + b.nick, {}, this.a.colorBan, null, false, this.b.k, c));
- else if (b.cmd == "typing") this.b.c ? Fa(this.b.c, b.nick, b.typing) : Ta(this.b.n, b.typing);
- else if (b.cmd == "topic") {
- this.Jc = b.topic;
- this.b.e("::topic", Y(this.b, b.topic, {}, this.a.colorTopic, null, false, this.b.k));
- if (b.nick) {
- var h = new Date;
- this.b.e("::topic", Y(this.b, E.g("TopicText") + " " + b.nick + " " + E.g("TopicText2") +
- " " + h, {}, this.a.colorTopicWho, null, false, this.b.k))
- }
- this.Ac && ae(this.Cd, b.topic, this.b.$)
- } else if (b.cmd == "topicwho") {
- h = new Date;
- h.setTime(b.date * 1E3);
- this.b.e("topic", Y(this.b, E.g("TopicText") + " " + b.creator + " " + E.g("TopicText2") + " " + h, {}, this.a.colorTopicWho, null, false, this.b.k))
- } else if (b.cmd == "away") {
- if (this.b.c && this.b.c.c[b.nick]) {
- var k = this.b.c.c[b.nick];
- if (b.reason) {
- Ba(k, b.reason);
- za(this.b.c, b.nick, false);
- this.a.showAwaysBacks && this.b.e(b.nick.toLowerCase(), Y(this.b, "--- " + b.nick + " " + E.g("AwayText") +
- " (" + b.reason + ")", {}, this.a.colorAway, null, false, this.b.k, c))
- } else {
- Ba(k, b.nick);
- za(this.b.c, b.nick, true);
- this.a.showAwaysBacks && this.b.e(b.nick.toLowerCase(), Y(this.b, "--- " + b.nick + " " + E.g("BackText"), {}, this.a.colorBack, null, false, this.b.k, c))
- }
- }
- } else if (b.cmd == "msg") {
- if (this.b.c) {
- Fa(this.b.c, b.nick, false);
- Aa(this.b.c, b.nick)
- }
- if (!ld(this.b, b.nick)) {
- b.msg.toLowerCase().indexOf(this.b.h.toLowerCase()) != -1 && Tc("mentionednick");
- Tc("newmsg");
- T && T.Wb({
- ae: "newmsg"
- });
- this.gd && bd && bd.wf(b.channel, d);
- var l =
- c;
- if (b.dtime) l = c - b.dtime;
- b.local || (b.msg = td.apply(b.msg, true, this.b.w.mc, b.nick));
- if (b.msg) {
- c = false;
- if (this.Xd[b.nick])
- if (b.msg.substring(0, 3) == "[**") {
- e = b.msg.indexOf(" ");
- if (e != -1) {
- this.Ma({
- cmd: "emote",
- nick: b.msg.substring(3, e),
- emote: b.msg.substring(e + 1, b.msg.length - 2),
- vh: "#844"
- });
- return
- }
- } else if (b.msg.substring(0, 1) == "[") {
- e = b.msg.indexOf("]");
- if (e != -1) {
- b.nick = b.msg.substring(1, e);
- b.msg = b.msg.substring(e + 2, b.msg.length);
- c = "#844"
- }
- }
- var j = this.b.k;
- if (b.channelclick) {
- e = {};
- e.eb = b.channelclick;
- j = Xd(this.b,
- e)
- }
- this.b.e(b.nick.toLowerCase(), Y(this.b, b.msg, typeof b.md == "undefined" ? {} : b.md, b.nick == this.b.h ? this.a.colorChatMe : this.a.colorChat, b.nick, b.nick == this.b.h, j, l, false, !b.idd, c));
- this.b.w.M && this.b.w.M(b.msg.toLowerCase().indexOf(this.b.h.toLowerCase()) != -1)
- }
- }
- this.Ac && $d(this.Cd, b.msg, this.b.$)
- } else if (b.cmd == "emote") {
- if (this.b.c) {
- Fa(this.b.c, b.nick, false);
- Aa(this.b.c, b.nick)
- }
- b.local || (b.emote = td.apply(b.emote, true, this.b.w.mc, b.nick));
- if (b.emote && !ld(this.b, b.nick)) {
- b.emote.toLowerCase().indexOf(this.b.h.toLowerCase()) !=
- -1 && Tc("mentionednick");
- Tc("newmsg");
- T && T.Wb({
- ae: "newmsg"
- });
- this.gd && bd && bd.wf(b.channel, d);
- this.b.e(b.nick.toLowerCase(), Y(this.b, b.nick + " " + b.emote, {}, b.nick == this.b.h ? this.a.colorEmoteMe : this.a.colorEmote, null, b.nick == this.b.h, this.b.k, c, false, !b.idd));
- this.b.w.M && this.b.w.M(b.emote.toLowerCase().indexOf(this.b.h.toLowerCase()) != -1)
- }
- this.Ac && $d(this.Cd, b.emote, this.b.$)
- } else if (b.cmd == "rmsg") {
- b.local || (b.msg = td.apply(b.msg, true, this.b.w.mc, b.nick));
- b.msg && !ld(this.b, b.nick) && this.b.e(b.nick.toLowerCase(),
- Y(this.b, b.msg, {}, this.a.colorChatRecent, b.nick, false, this.b.k, c - b.dtime))
- } else if (b.cmd == "remote") {
- b.local || (b.emote = td.apply(b.emote, true, this.b.w.mc, b.nick));
- b.emote && !ld(this.b, b.nick) && this.b.e(b.nick.toLowerCase(), Y(this.b, b.nick + " " + b.emote, {}, this.a.colorEmoteRecent, null, false, this.b.k, c - b.dtime))
- } else if (b.cmd == "mode") this.a.showUserModes && this.b.e("::mode", Y(this.b, "+++ " + b.msg, {}, this.a.colorUserMode, null, false, this.b.k, c));
- else if (b.cmd == "usermode") {
- function n(N, I, J, ka) {
- return J + " " + E.g("ModeChange1") +
- " " + E.g(N ? "ModeGiven" : "ModeTaken") + " " + I + " " + E.g(N ? "ModeTo" : "ModeFrom") + " " + ka
- }
- if (typeof b.owner != "undefined") {
- this.b.c && Ca(this.b.c, b.nick, "owner", b.owner);
- this.a.showUserModes && this.b.e("::mode", Y(this.b, "+++ " + n(b.owner, E.g("ModeOwner"), b.by, b.nick), {}, this.a.colorUserMode, null, false, this.b.k, c))
- }
- if (typeof b.admin != "undefined") {
- this.b.c && Ca(this.b.c, b.nick, "admin", b.admin);
- this.a.showUserModes && this.b.e("::mode", Y(this.b, "+++ " + n(b.admin, E.g("ModeAdmin"), b.by, b.nick), {}, this.a.colorUserMode, null,
- false, this.b.k, c))
- }
- if (typeof b.halfop != "undefined") {
- this.b.c && Ca(this.b.c, b.nick, "halfop", b.halfop);
- this.a.showUserModes && this.b.e("::mode", Y(this.b, "+++ " + n(b.halfop, E.g("ModeHalfop"), b.by, b.nick), {}, this.a.colorUserMode, null, false, this.b.k, c))
- }
- if (typeof b.op != "undefined") {
- this.b.c && Ca(this.b.c, b.nick, "op", b.op);
- this.a.showUserModes && this.b.e("::mode", Y(this.b, "+++ " + n(b.op, E.g("ModeOp"), b.by, b.nick), {}, this.a.colorUserMode, null, false, this.b.k, c))
- }
- if (typeof b.voice != "undefined") {
- this.b.c && Ca(this.b.c,
- b.nick, "voice", b.voice);
- this.a.showUserModes && this.b.e("::mode", Y(this.b, "+++ " + n(b.voice, E.g("ModeVoice"), b.by, b.nick), {}, this.a.colorUserMode, null, false, this.b.k, c))
- }
- } else if (b.cmd == "nicklist") {
- var o = [];
- for (j = 0; j < b.nicks.length; j++) {
- l = b.nicks[j];
- var s = be(this, l.mibbituser, l.device),
- w = {};
- if (l.info) w = ba(l.info);
- if (this.a.ciUserIcon && w.userIcon) s = {
- title: "Custom icon",
- src: w.userIcon
- };
- var p = l.nick;
- if (l.mibbitaway) p = l.mibbitaway;
- var r = {};
- r.admin = !!l.admin;
- r.op = !!l.op;
- r.halfop = !!l.halfop;
- r.voice = !!l.voice;
- r.owner = !!l.owner;
- r.active = !l.mibbitaway;
- if (this.b.c) {
- var y = -1;
- if (l.hasOwnProperty("idletime")) y = parseInt(l.idletime);
- this.b.c.kd({
- id: l.nick,
- ci: w,
- countrycode: l.cc,
- localtime: l.ct,
- timezone: l.tz,
- nick: l.nick,
- icon: s,
- desc: p,
- modes: r,
- idleTime: y
- })
- }
- this.b.$[l.nick.toLowerCase()] = l.nick;
- kb(this.b.n.da, l.nick);
- if (this.F[l.nick.toLowerCase()]) u({
- device: l.device,
- mibbituser: l.mibbituser,
- embed: l.embed,
- host: l.host
- }, this.F[l.nick.toLowerCase()]);
- else this.F[l.nick.toLowerCase()] = {
- device: l.device,
- mibbituser: l.mibbituser,
- embed: l.embed,
- host: l.host
- }
- }
- this.b.c && Td(this.b, this.b.c.size() + " " + E.g("UserCount"))
- } else if (b.cmd == "userinfo") {
- var z = b.id ? b.id : b.nick;
- s = be(this, b.mibbituser, b.device);
- w = {};
- if (b.info) w = ba(b.info);
- if (this.a.ciUserIcon && w.userIcon) s = {
- title: "Custom icon",
- src: w.userIcon
- };
- p = b.nick;
- if (b.mibbitaway) p = b.mibbitaway;
- if (b.status) p = b.status;
- if (this.b.c) {
- y = -1;
- if (b.hasOwnProperty("idletime")) y = parseInt(b.idletime);
- var B = this.b.c.c[z];
- if (B) {
- B.Ic = b.cc;
- B.te = parseInt(b.ct) - (new Date).getTime();
- B.Ge = b.tz;
- B.P = s;
- B.description =
- p;
- B.Ha = Math.floor((new Date).getTime() / 1E3) - y;
- B.sd = w;
- B.pa = !b.mibbitaway;
- if (b.hasOwnProperty("awaystate")) thuser.pa = !b.awaystate;
- la(this.b.c, z);
- B.z()
- }
- }
- this.F[b.nick.toLowerCase()].device = b.device;
- this.F[b.nick.toLowerCase()].embed = b.embed;
- this.F[b.nick.toLowerCase()].mibbituser = b.mibbituser
- } else if (b.cmd == "join") {
- Tc("userjoin");
- T && T.Wb({
- ae: "userjoin"
- });
- z = b.id ? b.id : b.nick;
- s = be(this, b.mibbituser, b.device);
- w = {};
- if (b.info) w = ba(b.info);
- if (this.a.ciUserIcon && w.userIcon) s = {
- title: "Custom icon",
- src: w.userIcon
- };
- p = b.nick;
- if (b.mibbitaway) p = b.mibbitaway;
- if (b.status) p = b.status;
- if (this.b.c) {
- y = -1;
- if (b.hasOwnProperty("idletime")) y = parseInt(b.idletime);
- r = {};
- r.admin = false;
- r.op = false;
- r.halfop = false;
- r.voice = false;
- r.owner = false;
- r.active = !b.mibbitaway;
- if (b.hasOwnProperty("awaystate")) r.active = !b.awaystate;
- this.b.c && this.b.c.kd({
- id: z,
- ci: w,
- countrycode: b.cc,
- localtime: b.ct,
- timezone: b.tz,
- nick: b.nick,
- icon: s,
- desc: p,
- modes: r,
- idleTime: y
- });
- Td(this.b, this.b.c.size() + " " + E.g("UserCount"))
- }
- if (this.a.showJoinsParts) {
- g = "*** " + b.nick +
- " " + E.g("JoinText") + (b.localchannel ? " " + b.localchannel : "");
- if (this.a.showJoinInfo) {
- g += " " + b.user + "@" + b.host + " ";
- if (b.mibbituser) {
- if (b.device) g += " [" + b.device + "]";
- g += b.embed ? " (Widget)" : " (Mibbit)"
- }
- }
- this.b.e(b.nick.toLowerCase(), Y(this.b, g, {}, this.a.colorJoin, null, false, this.b.k, c))
- }
- this.b.$[z.toLowerCase()] = b.nick;
- kb(this.b.n.da, b.nick);
- this.F[b.nick.toLowerCase()] = {
- user: b.user,
- host: b.host,
- device: b.device,
- embed: b.embed,
- mibbituser: b.mibbituser
- }
- } else if (b.cmd == "userdetails") {
- if (this.F[b.nick.toLowerCase()])
- if (this.F[b.nick.toLowerCase()]) {
- this.F[b.nick.toLowerCase()].user =
- b.user;
- this.F[b.nick.toLowerCase()].host = b.host
- } else this.F[b.nick.toLowerCase()] = {
- user: b.user,
- host: b.host
- }
- } else if (b.cmd == "part") {
- if (this.b.c && this.b.c.c[b.id ? b.id : b.nick]) {
- Tc("userpart");
- T && T.Wb({
- cmd: "userpart"
- });
- z = b.id ? b.id : b.nick;
- this.b.c.nc(z);
- Td(this.b, this.b.c.size() + " " + E.g("UserCount"));
- delete this.b.$[z.toLowerCase()];
- lb(this.b.n.da, b.nick);
- delete this.F[z.toLowerCase()];
- delete this.Eb[b.nick];
- if (this.a.showJoinsParts) {
- if (b.quit) g = "*** " + b.nick + " " + E.g("QuitText") + " (" + b.message + ")";
- else {
- g =
- "*** " + b.nick + " " + E.g("LeftText");
- g += b.localchannel ? " " + b.localchannel : ".";
- if (b.message) g += " (" + b.message + ")"
- }
- if (this.a.showPartInfo) {
- g += " " + b.user + "@" + b.host + " ";
- if (b.mibbituser) {
- if (b.device) g += " [" + b.device + "]";
- g += b.embed ? " (Widget)" : " (Mibbit)"
- }
- }
- this.b.e(b.nick.toLowerCase(), Y(this.b, g, {}, this.a.colorPart, null, false, this.b.k, c))
- }
- }
- if (b.nick == this.b.h) {
- this.b.e(b.nick.toLowerCase(), Y(this.b, "!!! You left " + b.localchannel, {}, this.a.colorPart, null, false, this.b.k, c));
- this.b.Gc()
- }
- } else if (b.cmd == "kick") {
- if (this.b.c &&
- this.b.c.c[b.nick]) {
- Tc("userpart");
- T && T.Wb({
- ae: "userpart"
- });
- this.b.c.nc(b.nick);
- Td(this.b, this.b.c.size() + " " + E.g("UserCount"));
- delete this.b.$[b.nick.toLowerCase()];
- lb(this.b.n.da, b.nick);
- delete this.F[b.nick.toLowerCase()];
- delete this.Eb[b.nick];
- b.reason ? this.b.e(b.nick.toLowerCase(), Y(this.b, "*** " + b.nick + " " + E.g("KickText") + " " + b.kicker + " (" + b.reason + ")", {}, this.a.colorKick, null, false, this.b.k, c)) : this.b.e(b.nick.toLowerCase(), Y(this.b, "*** " + b.nick + " " + E.g("KickText") + " " + b.kicker, {}, this.a.colorKick,
- null, false, this.b.k, c))
- }
- if (b.nick == this.b.h) {
- this.b.e(b.nick.toLowerCase(), Y(this.b, "!!! You have been kicked from " + b.localchannel, {}, this.a.colorKick, null, false, this.b.k, c));
- this.b.Gc()
- }
- } else if (b.cmd == "init") {
- this.b.uc(b.nick);
- if (!this.b.c) {
- this.b.$[b.nick.toLowerCase()] = b.nick;
- kb(this.b.n.da, b.nick)
- }
- } else if (b.cmd == "changenick") {
- if (this.b.c && this.b.c.c[b.nick]) {
- o = this.b.c.c[b.nick];
- o.description == b.nick && Ba(o, b.newnick);
- Ea(this.b.c, b.nick, b.newnick)
- }
- if (ld(this.b, b.nick)) {
- delete this.Eb[b.nick];
- this.Eb[b.newnick] = true
- }
- if (this.b.$[b.nick.toLowerCase()]) {
- this.b.$[b.newnick.toLowerCase()] = b.newnick;
- kb(this.b.n.da, b.newnick);
- this.b.e(b.nick.toLowerCase(), Y(this.b, "*** " + b.nick + " " + E.g("NickText") + " " + b.newnick, {}, this.a.colorChangeNick, null, false, this.b.k, c));
- if (b.nick.toLowerCase() != b.newnick.toLowerCase()) {
- delete this.b.$[b.nick.toLowerCase()];
- lb(this.b.n.da, b.nick)
- }
- }
- if (this.F[b.nick.toLowerCase()]) {
- this.F[b.newnick.toLowerCase()] = this.F[b.nick.toLowerCase()];
- delete this.F[b.nick.toLowerCase()]
- }
- b.nick ==
- this.b.h && this.b.uc(b.newnick)
- } else if (b.cmd == "log" && this.Te) {
- this.b.e("::log", Y(this.b, b.message, {}, this.a.colorSystem, b.nick, false, this.b.vc, c));
- this.b.w.M && this.b.w.M()
- } else if (b.cmd == "error") {
- this.b.e("::error", Y(this.b, b.msg, {}, this.a.colorSystem, "", false, this.b.vc, c));
- this.b.w.M && this.b.w.M()
- } else if (b.cmd == "pastereply") b.error ? this.b.e("::paste", Y(this.b, b.error, {}, this.a.colorNotice, "PasteBin", false, this.b.k, c, true)) : this.b.n.Ub("http://mibpaste.com/" + b.url + " ");
- else if (b.cmd == "minifyreply") this.b.n.Ub("http://miburl.com/" +
- b.uniq + " ");
- else if (b.cmd == "removechat") {
- if (this.a.allowChatRemoval) {
- hc(this.b.la, b.chatid);
- U(this.b)
- }
- } else if (b.cmd == "banlist") {
- h = new Date;
- h.setTime(b.ctime * 1E3);
- var H = Y(this.b, null, {}, this.a.colorBan, null, false, this.b.k);
- H.tb = yc(b, this.a, this.b.w.gh);
- this.b.e("banlist", H)
- } else b.cmd == "plugin" && this.b.Ae(b.data)
- } catch (P) {
- x && A("cmh.process", t(b) + "|" + P, C)
- }
- };
- function be(b, c, d) {
- b = {
- name: "user",
- title: ""
- };
- if (c)
- if (d)
- if (d == "ipod") b = {
- name: "ipod",
- title: "iPod Mibbitian"
- };
- else if (d == "iphone") b = {
- name: "iphone",
- title: "iPhone Mibbitian"
- };
- else {
- if (d == "wii") b = {
- name: "wii",
- title: "Wii Mibbitian"
- }
- } else b = {
- name: "mibbituser",
- title: "Mibbitian"
- };
- return b
- }
- function ce() {
- this.qa = []
- }
- ce.prototype.load = function(b) {
- this.qa = [];
- for (var c = 0; c < b.length; c++) try {
- this.qa.push({
- reg: b[c].reg,
- replacement: b[c].replacement,
- replacein: b[c].replacein,
- replaceout: b[c].replaceout,
- block: b[c].block,
- cmd: b[c].cmd
- })
- } catch (d) {}
- };
- ce.prototype.apply = function(b, c, d, e) {
- for (var f = 0; f < this.qa.length; f++)
- if (c && this.qa[f].replacein || !c && this.qa[f].replaceout) {
- var g = new RegExp(this.qa[f].reg, "g");
- !Rc && d && this.qa[f].cmd && g.test(b) && d(this.qa[f].cmd, this.qa[f].reg, e);
- x && A("filters.apply", "d=" + b + " isin=" + c + " block=" + this.qa[f].block, K);
- if (this.qa[f].block) {
- x && A("filters.apply", "block d=" + b + " rg=" + g + " match=" + g.test(b), K);
- if (g.test(b)) return false
- } else b = b.replace(g, this.qa[f].replacement)
- }
- return b
- };
- function u(b, c) {
- for (v in b)
- if (b.hasOwnProperty(v)) c[v] = b[v]
- }
- function nb(b) {
- if (!b) return true;
- try {
- if (b.substring(0, 1) == "#") {
- b = b.substring(1, b.length);
- var c, d, e;
- if (b.length == 6) {
- e = parseInt(b.substring(0, 2), 16);
- d = parseInt(b.substring(2, 4), 16);
- c = parseInt(b.substring(4, 6), 16);
- return e + d + c > 384
- } else if (b.length == 3) {
- e = parseInt(b.substring(0, 1), 16);
- d = parseInt(b.substring(1, 2), 16);
- c = parseInt(b.substring(2, 3), 16);
- return e + d + c > 24
- }
- }
- } catch (f) {}
- return true
- }
- function de() {
- if (navigator.appName == "Microsoft Internet Explorer") {
- var b = /MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent);
- if (b != null) return parseFloat(b[1])
- }
- return -1
- }
- function ee() {
- this.ad = [];
- this.Wd = [];
- this.Qa = {}
- }
- function ae(b, c, d) {
- $d(b, c, d);
- if (c = c.match(/[^\s\#\!\@\$\%\^\&\*\(\)\_\+\-\=\{\}\[\]\:\;\"\'\,\.\/\<\>\?\~\|\\]+/g))
- for (var e = 0; e < c.length; e++) {
- var f = c[e].toLowerCase();
- if (!d || !d[f])
- if (" the and for are but not you all any can had her was one our out day get has him his how man new now old see two way who boy did its let put say she too use lol ftw hey that with have this will your from they know want been good much some time very when come here just like long make many more only over such take than them well were what book cool there their which ".indexOf(" " + f +
- " ") == -1 && f.length >= 3 && !f.match(/^[0-9]+$/)) {
- fe(b, f, b.ad);
- b.ad.length > 15 && b.ad.shift()
- }
- }
- }
- function fe(b, c, d) {
- if (c) {
- for (b = 0; b < d.length; b++)
- if (d[b] == c) return;
- d.push(c)
- }
- }
- function $d(b, c, d) {
- if (c = c.match(/[^\s\#\!\@\$\%\^\&\*\(\)\_\+\-\=\{\}\[\]\:\;\"\'\,\.\/\<\>\?\~\|\\]+/g))
- for (var e = 0; e < c.length; e++)
- if (!d || !d[c[e].toLowerCase()]) {
- var f = c[e];
- f = f.toLowerCase();
- if (!(" the and for are but not you all any can had her was one our out day get has him his how man new now old see two way who boy did its let put say she too use lol ftw hey that with have this will your from they know want been good much some time very when come here just like long make many more only over such take than them well were what book cool there their which ".indexOf(" " + f +
- " ") != -1 || f.length < 3 || f.match(/^[0-9]+$/))) {
- b.Wd.push(f);
- if (b.Qa[f]) b.Qa[f]++;
- else b.Qa[f] = 1;
- if (b.Wd.length > 500) {
- f = b.Wd.shift();
- b.Qa[f]--;
- b.Qa[f] == 0 && delete b.Qa[f]
- }
- }
- }
- }
- function Ad(b, c) {
- for (var d = [], e = 0; e < Math.min(b.ad.length, 15); e++) d.push(b.ad[e]);
- var f = {};
- for (e = 0; e < c; e++) {
- var g;
- g = null;
- var h = 0;
- for (var k in b.Qa)
- if (b.Qa.hasOwnProperty(k) && !f[k])
- if (b.Qa[k] > h) {
- h = b.Qa[k];
- g = k
- }
- g = g;
- if (g == null) break;
- f[g] = b.Qa[g];
- fe(b, g, d)
- }
- return d
- }
- var vd = true;
- function Tc(b) {
- F.sounds[b] && F.sounds[b].enabled && wd(F.sounds[b].sound)
- }
- function ge(b) {
- if (b.substr(0, 7) == "http://" || b.substr(0, 8) == "https://") return b;
- if (b.substr(0, 27) == "//static.mibbit.com/sounds/") return "https://s3.amazonaws.com/mibbit/sounds/" + b.substr(27);
- if (b.substr(0, 8) == "/sounds/") return "https://s3.amazonaws.com/mibbit" + b;
- return b
- }
- function wd(b) {
- try {
- if (vd) {
- var c = "",
- d = b.lastIndexOf(".");
- if (d != -1) {
- var e = b.substring(d, b.length).toLowerCase();
- if (e == ".mp3" || e == ".wav" || e == ".ogg" || e == ".m4a") {
- c = e;
- b = b.substring(0, d)
- }
- }
- if ("Audio" in window) {
- var f = new Audio;
- if (c == "") {
- c = f.canPlayType && f.canPlayType('audio/ogg; codecs="vorbis"').replace(/no/, "") ? ".ogg" : f.canPlayType && f.canPlayType("audio/mpeg;").replace(/no/, "") ? ".mp3" : f.canPlayType && f.canPlayType('audio/mp4; codecs="mp4a.40.2"').replace(/no/, "") ? ".m4a" : ".mp3";
- x && A("Sounds", "Picked " + c + " for file " +
- b, K)
- }
- f.src = ge(b + c);
- f.autoplay = true;
- f.play && f.play()
- } else {
- if (c == "") c = ".mp3";
- var g = document.getElementById("current_sound");
- g && g.parentNode.removeChild(g);
- g = document.createElement("bgsound");
- g.id = "current_sound";
- g.setAttribute("src", ge(b + c));
- g.setAttribute("loop", 1);
- document.appendChild(g)
- }
- }
- } catch (h) {
- x && A("Sounds", "Source " + b + " " + h, C)
- }
- }
- var Ma = true,
- he = false,
- kc = false,
- Rc = false,
- ie = "WebSocket" in window ? true : false,
- je = 12E4,
- ke = 9E5,
- le = 2E4,
- me = null,
- ne = [],
- oe = 6,
- F, V, S, pe, Ld, fd, qe = false,
- re, Md, rd, td, W, od, G, x = false,
- M = "FINE",
- K = "INFO",
- C = "WARNING",
- se = {
- FINE: "#aaa",
- INFO: "#00f",
- WARNING: "#f00"
- };
- function A(b, c, d) {
- d == C && V.G({
- cmd: "clientlog",
- m: "WARNING :" + b + " : " + c
- })
- }
- var te = {},
- ue, Q, T, bd, ve = "",
- Z;
- window.onerror = function(b, c, d) {
- x && te && A("onerror", b + " " + c + " :" + d, C)
- };
- function we(b) {
- var c = b.target ? b.target : b.srcElement;
- c = c.tagName ? c.tagName : c.nodeName;
- if (c.toLowerCase() != "input" && c.toLowerCase() != "textarea" && b.keyCode == 8) return false;
- return true
- }
- function xe(b) {
- if (!b) b = window.event;
- return we(b)
- }
- function ye(b) {
- if (!b) b = window.event;
- if (b.altKey) {
- try {
- if (b.keyCode == 37) a: for (var c = Q, d = 0; d < c.q.length; d++) {
- if (c.q[d].va) {
- if (d == 0) break a;
- Gb(c);
- c.q[d - 1].open();
- break
- }
- } else if (b.keyCode == 39) a: {
- c = Q;
- for (d = 0; d < c.q.length; d++)
- if (c.q[d].va) {
- if (d == c.q.length - 1) break a;
- Gb(c);
- c.q[d + 1].open();
- break
- }
- }
- else b.keyCode == 38 && Ob(Q)
- } catch (e) {}
- if (b.keyCode == 37 || b.keyCode == 39) return false
- }
- return we(b)
- }
- document.onkeydown = ye;
- document.onkeypress = xe;
- function ze(b) {
- V.Pa = b;
- V.reset();
- x && A("sessionSetHandler", "mysession=" + Ld + " s=" + b, K);
- if (Ld) {
- W.alert("Connection to Mibbit was lost.");
- G.Gg();
- Uc("")
- }
- Ld = b;
- (new Date).getTime();
- b = new Date;
- var c = -b.getTimezoneOffset();
- b = {
- cmd: "clientinfo",
- localtime: b.getTime() + c * 6E4,
- tzoffset: c
- };
- x && A("sessionSetHandler", "ic = " + t(b), K);
- V.G(b);
- Ae()
- }
- function Be(b) {
- x && A("ooHandler", "oo=" + b, K);
- var c = document.getElementById("connlogo"),
- d = document.getElementById("serverstatus");
- d.style.color = b ? "#aaa" : "#f00";
- c.style.display = b ? "inline" : "none";
- b = b ? ve : E.g("MibbitDisconnected");
- if (d.firstChild) d.firstChild.nodeValue = b;
- else d.appendChild(document.createTextNode(b))
- }
- function Ce(b) {
- try {
- x && A("globalCHandler", t(b), K);
- if (b.cmd == "serverstatus") {
- var c = document.getElementById("serverstatus"),
- d = b.status,
- e = d.lastIndexOf(" ");
- if (e) d = d.substring(0, e);
- if (c.firstChild) c.firstChild.nodeValue = d;
- else c.appendChild(document.createTextNode(d));
- ve = d
- } else if (b.cmd == "global") G.Og(b.msg);
- else if (b.cmd == "ping") {
- var f = (new Date).getTime();
- f = Math.floor((f - b.ts) / 2);
- De("lag: " + f + "ms");
- ne.push(f);
- ne.length > oe && ne.shift()
- } else b.cmd == "lagtime" && cd(G, b)
- } catch (g) {
- x && A("globalCHandler", "Exception " +
- g, C)
- }
- }
- function Ae() {
- x && A("checkLag", "Checking lag...", K);
- me && window.clearTimeout(me);
- me = window.setTimeout(function() {
- me = null;
- De("(TIMEOUT)")
- }, le);
- V.G({
- cmd: "ping",
- ts: (new Date).getTime()
- });
- return false
- }
- function Ee() {
- for (var b = 0, c = 0; c < ne.length; c++) b += ne[c];
- return b = Math.floor(b / ne.length)
- }
- function De(b) {
- me && window.clearTimeout(me);
- me = null;
- var c = document.getElementById("laginfo");
- c.onclick = Ae;
- if (c.firstChild) c.firstChild.nodeValue = b;
- else c.appendChild(document.createTextNode(b))
- }
- function Uc(b, c, d, e) {
- var f = document.getElementById("clientstatus"),
- g = document.getElementById("clientstatus" + b);
- if (!g) {
- g = document.createElement("span");
- g.id = "clientstatus" + b;
- f.appendChild(g)
- }
- for (; g.firstChild;) g.removeChild(g.firstChild);
- if (c + d + e > 0) {
- g.appendChild(document.createTextNode(b.toUpperCase() + ": " + c + " "));
- if (d + e > 0) {
- b = document.createElement("span");
- b.style.color = "#880";
- g.appendChild(b);
- b.appendChild(document.createTextNode("+" + (d + e)))
- }
- }
- }
- function Fe(b, c) {
- if (b.substring(0, 10) == "IRCClient:") return $c(G, b, c);
- x && A("newCHandler", "New channel " + b + " (" + t(c) + ")", K);
- return false
- }
- function Ge(b, c, d, e) {
- if (b) {
- b = document.createElement("span");
- b.style.color = "#666";
- b.appendChild(document.createTextNode(" | "));
- c.appendChild(b)
- }
- b = document.createElement("span");
- u({
- cursor: "pointer",
- fontWeight: "bold",
- color: "#aaa"
- }, b.style);
- b.appendChild(document.createTextNode(d));
- c.appendChild(b);
- b.onclick = e
- }
- function He(b, c, d, e, f, g) {
- if (g && g.type == "Premium") {
- qe = true;
- Ie(true)
- } else qe = false;
- c = document.getElementById("loginstatus");
- if (b) {
- fd = d;
- re = f;
- Md = g;
- x && A("lioHandler", "prefs=" + e, M);
- F.reset();
- F.load(e);
- rd.load(F.aliases);
- for (td.load(F.filters); c.firstChild;) c.removeChild(c.firstChild);
- c.appendChild(document.createTextNode(d));
- Ge(true, c, E.g("Menu_Logout"), function() {
- Je(pe)
- })
- } else {
- fd = null;
- re = {};
- x && A("lioHandler", "Logged out, reset defaultPrefs", M);
- F.reset();
- Rd(F);
- for (Ie(false); c.firstChild;) c.removeChild(c.firstChild);
- Ge(false, c, E.g("Menu_Login"), uGui.Vg);
- Ge(true, c, E.g("Menu_Register"), uGui.Wg);
- Jb(Q, ".XAccount");
- Jb(Q, ".XChannels");
- Jb(Q, ".XPrefs");
- Jb(Q, ".XLogs");
- Jb(Q, ".XProfile")
- }
- uGui.Je(b);
- fa(W)
- }
- var Ke = false;
- function Le() {
- Ke = true;
- Ie(qe)
- }
- function Me() {
- var b = document.createElement("script");
- b.src = "https://www.google.com/jsapi?callback=loadedGoogle&key=" + (document.location.protocol == "https:" ? "ABQIAAAAMWVs2CFZKh4tHpNoyudfehT7a2vVMXy4YJ6gxszjGxhjLi1vThQlwj9IDi0zjID6pApN4CVCYpZgqg" : "ABQIAAAAMWVs2CFZKh4tHpNoyudfehSLjyhLxcdKYU-OPaY8o4Pq0SJYtxQiGwbiPerGixwxOrqB1yCoy0TTOg");
- b.type = "text/javascript";
- document.getElementsByTagName("head")[0].appendChild(b);
- b = de();
- if (b != -1) {
- Ma = false;
- kc = true;
- if (b < 7) he = true
- }
- try {
- if (top.location != location) {
- alert("The official Mibbit website is at www.mibbit.com. Please update your links.");
- top.location.href = document.location.href
- }
- } catch (c) {}
- if (he) O = true;
- od = new ee;
- b = document.createElement("div");
- b.id = "errorlog";
- document.body.appendChild(b);
- W = new ca(b);
- Nc.prototype.If = function(g, h) {
- h && W.alert(g + ": " + h)
- };
- Nc.prototype.Jf = function(g, h, k) {
- if (h) W.alert(g + ": " + h + (k ? "\r\n\r\n" + k : ""))
- };
- Nc.prototype.ce = function(g) {
- W.alert("Are you sure you want to disconnect from " + g + "?", function(h) {
- h && Qc(G, g)
- })
- };
- Oc.prototype.yd = function(g, h) {
- W.alert("Please pick a new nick: ", function(k) {
- k && h(k)
- }, true)
- };
- Gd.prototype.prompt =
- function(g, h) {
- W.alert("Alias " + g + ":", h, true)
- };
- rd = new Gd;
- td = new ce;
- G = new Nc;
- F = new Ne;
- rd.load(F.aliases);
- td.load(F.filters);
- Q = new Ab(document.getElementById("tabs"), F, true, 6, 20);
- Ie(false);
- uGui.Je(false);
- try {
- if (navigator.userAgent.indexOf("Nintendo Wii") != -1) F.needSendButton = true
- } catch (d) {}
- T = new Id(window, "Mibbit", "[ Mibbit ]", F);
- T.Fc(window, "window");
- T.Fc(window.document, "doc");
- bd = new Jd;
- He(false);
- Oe(F, function() {
- function g(h, k) {
- if (h = Q.l[h]) {
- h.content.style.background = F.tabColorGeneral;
- k || (k = {});
- k.background =
- F.tabColorGeneral;
- k.border = F.tabBColorGeneral;
- h.H = k;
- tb(h, h.va)
- }
- }
- Q.z();
- Fb(Q, F.useTabList);
- g("..Welcome", {
- icon: "/icons/house.png",
- iconWidth: 16,
- iconHeight: 16
- });
- g(".XChannels");
- g(".XPrefs", {
- iconWidth: 16,
- iconHeight: 16,
- icon: "/icons/wrench.png"
- });
- g(".XProfile", {
- iconWidth: 16,
- iconHeight: 16,
- icon: "/icons/user_green.png"
- });
- g(".XAccount");
- g(".XLogs");
- g(".Log");
- window.webkitNotifications && F.desktopNotifications && window.webkitNotifications.checkPermission() != 0 && W.alert("Desktop notifications are set in your prefs. Would you like to enable them for this chat backend?",
- function(h) {
- h && window.webkitNotifications.requestPermission(q())
- }, false)
- });
- Oe(F, function() {
- uGui.Je(fd != null)
- });
- Oe(F, function(g) {
- G.Uc(g)
- });
- document.getElementById("chats");
- if (typeof VERSION == "undefined" || $("debug") != null) xd();
- var e = Pe("..Welcome", "Home", "Mibbit Home", false, false, null);
- b = e.ownerDocument.createElement("div");
- u({
- position: "absolute",
- top: "8px",
- bottom: "8px",
- left: "8px",
- right: "8px",
- overflow: "hidden"
- }, b.style);
- e.appendChild(b);
- e = e.ownerDocument.createElement("iframe");
- e.style.width = "100%";
- e.style.height = "100%";
- e.style.minHeight = "100%";
- b.appendChild(e);
- e.src = "https://my.chat.mibbit.com/home";
- if (b = $("url")) Z = gd(G, b);
- if (Z) {
- if (Z.target && "#&+".indexOf(Z.target.substring(0, 1)) == -1) {
- for (b = document.getElementById("ircstargettype"); b.firstChild;) b.removeChild(b.firstChild);
- b.appendChild(document.createTextNode("Target nick:"));
- document.getElementById("ircskeyopt").style.display = "none"
- }
- } else {
- if ($("server") != null) {
- Z = {
- ssl: false,
- port: 6667,
- host: $("server")
- };
- b = Z.host.split(":");
- Z.host = b[0];
- if (b[1]) {
- Z.port =
- b[1];
- if (Z.port.substring(0, 1) == "+") {
- Z.ssl = true;
- Z.port = Z.port.substr(1)
- }
- }
- Z.target = $("channel");
- if (Z.target == null) Z.target = "";
- Z.nick = $("nick");
- Z.pass = $("pass");
- Z.charset = $("charset");
- Z.needPass = $("needPass");
- Z.key = $("key");
- Z.needKey = $("needKey")
- }
- if (b = window.location.hash) {
- Z = {
- ssl: false,
- port: 6667,
- host: "irc.mibbit.net",
- target: b
- };
- e = b.indexOf("@");
- if (e != -1) {
- Z.host = b.substring(e + 1, b.length);
- Z.target = b.substring(0, e)
- }
- var f = b.toLowerCase().indexOf("&server=");
- if (f != -1) {
- Z.host = b.substring(e + 8, b.length);
- Z.target =
- b.substring(0, f)
- }
- b = Z.host.split(":");
- Z.host = b[0];
- if (b[1]) {
- Z.port = b[1];
- if (Z.port.substring(0, 1) == "+") {
- Z.ssl = true;
- Z.port = Z.port.substr(1)
- }
- }
- }
- }
- if (Z) {
- document.getElementById("connectspecific").style.display = "block";
- b = document.getElementById("connectspecific");
- b = Lb(Q, ".Connect", b, "Connect", "Connect", null, Qe(b), {
- background: F.tabColorGeneral,
- border: F.tabBColorGeneral
- }, false);
- Re(document.getElementById("ircconnectform2"), Z, function() {
- Jb(Q, ".Connect")
- }, "f_nick2");
- Gb(Q);
- b.open()
- }
- S = new Dc("/j/mibbit", {
- nch: Fe,
- gph: Ce,
- ooh: Be,
- ssh: ze
- });
- V = new zc("/j/mibbit", {
- recv: function(g) {
- return function(h) {
- Ic(g, h)
- }
- }(S),
- psh: null
- });
- if (typeof VERSION == "undefined" || $("debug") != null) {
- S.onerror = function(g) {
- x && A("rcomms", g, M)
- };
- V.onerror = function(g) {
- x && A("scomms", g, M)
- }
- }
- if (("WebSocket" in window || "MozWebSocket" in window) && $("nowebsocket") == null) {
- x && A("init", "Using Websocket...", K);
- Mc(S, V)
- }
- pe = new Se(He, true);
- Jc(S, "LoginManager", pe);
- S.start();
- De("-");
- window.setInterval(Ae, je);
- window.setInterval(function() {
- V.G({
- cmd: "clientlog",
- m: "avg lag:" +
- Ee() + (ie ? " WS" : "")
- })
- }, ke);
- pe.Fe = function(g) {
- var h = document.getElementById("loginstatus");
- x && A("settingscallback", "prefs=" + g, M);
- F.reset();
- F.load(g);
- rd.load(F.aliases);
- for (td.load(F.filters); h.firstChild;) h.removeChild(h.firstChild);
- h.appendChild(document.createTextNode(fd));
- Ge(true, h, E.g("Menu_Logout"), function() {
- Je(pe)
- })
- };
- pe.Oc = function(g) {
- if (g) {
- for (g = document.getElementById("loginstatus"); g.firstChild;) g.removeChild(g.firstChild);
- g.appendChild(document.createTextNode("Please wait..."))
- }
- };
- pe.Yd = function(g) {
- W.alert(g ?
- "Your password has been changed successfuly" : "Invalid password. Please make sure it is 4-16 characters")
- };
- pe.Nc = function(g, h) {
- x && A("loginCallback", "s=" + g + ", msg=" + h);
- g || W.alert("Invalid login: " + h)
- };
- Jc(S, "IRCClient", G);
- document.getElementById("loading").style.display = "none";
- document.getElementById("mibbitapp").style.display = "block";
- window.clearInterval(loadingtimer)
- }
- window.onbeforeunload = function() {
- if (F.confirmUnload) return "Any Chat Connections will be closed!"
- };
- function Te() {
- S.stop()
- }
- function xd() {
- var b = {};
- b.Id = function() {
- var e = ue.n.ea.value;
- if (e.substring(0, 8) == "/global ") {
- var f = e.indexOf(" ", 8);
- if (f != -1) {
- var g = e.substring(8, f);
- e = e.substring(f + 1, e.length);
- f = (new Date).getTime();
- ue.e("::log", Y(ue, "Sending global...", {}, se.INFO, "", false, ue.vc, f));
- V.G({
- cmd: "global",
- pw: g,
- msg: e
- })
- }
- }
- return false
- };
- b.xc = q();
- b.M = q();
- var c = document.getElementById("chats"),
- d = document.createElement("div");
- d.style.background = "#ccc";
- d.style.display = "none";
- c.appendChild(d);
- ue = new X(d, false, Ue, b, false, "#ccc", {
- Eg: true
- });
- pb(ue.Ia, "Debug console", ue.vc);
- Lb(Q, ".Log", d, "Log", "Debug Log", function(e, f) {
- ue.Bb(e, f);
- Adverts.R && Adverts.Ee(!f)
- }, function() {
- x = false;
- return true
- }, {
- background: "#ccc",
- border: "#888"
- }, true, true);
- A = function(e, f, g) {
- var h = (new Date).getTime();
- ue.e("::log", Y(ue, f, {}, se[g], e, false, ue.vc, h))
- };
- x = true
- }
- function $(b) {
- var c = window.location.search.substring(1);
- if (c.length > 0) {
- begin = c.indexOf(b + "=");
- if (begin != -1) {
- begin += b.length + 1;
- end = c.indexOf("&", begin);
- return decodeURIComponent(c.substring(begin, end == -1 ? c.length : end))
- }
- }
- return null
- }
- function ed() {
- var b = ["amphibulus", "bletch", "bernard", "blinky", "bugweiser", "claude", "curmet", "ferdinand", "figaro", "flabbergaster", "frogaincia", "frogonia", "frogmella", "froglegstew", "frogzilla", "gamakichi", "guacamole", "gunther", "huddler", "kermit", "kermi", "keret", "krebbit", "leaper", "lilybet", "madalynn", "mermi", "mr_fribble", "mortisha", "napoleon", "obi_wan", "panitaliemom", "pachuco", "pheleas_frog", "Puddles", "pudgetta", "quibbit", "quiggle", "schnozzle", "skippydippy", "smerft", "sluggo", "slimer", "sprocket", "sprog",
- "sproing", "squiggy", "stomper", "wikkit", "wilma", "weirdo", "xarcus", "xorcon", "yoshi", "zucchini", "zippity", "zenon", "zelda", "bellows", "charmander", "cornelius", "fuogo", "gretchen", "jasper", "kermie", "rumpler", "findow", "fenster", "kendle", "whidgle", "mohawk", "montezuma", "morton", "mr_evil", "mr_sticky", "mudpit", "onix", "peeves", "raisin", "shmoo", "umbridge", "mr_wibble", "dr_bibble", "mr_boo", "wippler", "reedlepee", "calatalee", "ferminter", "quaddle", "blaphmat", "hatman", "sockmister", "mr_trousers", "mr_pants"
- ];
- if (Math.random() <
- 0.5) return b[Math.floor(Math.random() * b.length)];
- b = "mib_";
- for (var c = 0; c < 6; c++) {
- var d = Math.random() * 36;
- b += "abcdefghijklmnopqrstuvwxyz0123456789".charAt(d)
- }
- return b
- }
- window.init = Me;
- window.shutdown = Te;
- window.loadedGoogle = Le;
- var Ve = null;
- function Ie(b) {
- var c = document.getElementById("header");
- u({
- textAlign: "left",
- background: "url(https://s3.amazonaws.com/mibbit/gradg.png) repeat-x",
- overflow: "hidden"
- }, c.style);
- c.style.height = (b ? 24 : 94) + "px";
- c.style.background = b ? "url(https://s3.amazonaws.com/mibbit/gradg.png) repeat-x 0px -50px" : "url(https://s3.amazonaws.com/mibbit/gradg.png) repeat-x";
- var d = document.getElementById("googa");
- if (!d) {
- d = document.createElement("div");
- d.id = "googa"
- }
- var e = document.getElementById("usermenu1");
- if (!e) {
- e = document.createElement("ul");
- u({
- display: "inline",
- listStyleType: "none",
- fontFamily: "sansSerif",
- fontSize: "11px",
- color: "#666"
- }, e.style);
- e.id = "usermenu1"
- }
- var f = document.getElementById("serverstatus");
- if (!f) {
- f = document.createElement("span");
- u({
- fontSize: "11px",
- padding: "0px"
- }, f.style);
- f.id = "serverstatus"
- }
- var g = document.getElementById("laginfo");
- if (!g) {
- g = document.createElement("span");
- g.id = "laginfo";
- g.title = "Lag between you and Mibbit.";
- u({
- fontSize: "11px",
- color: "#666",
- cursor: "pointer",
- padding: "0px"
- }, g.style)
- }
- var h = document.getElementById("clientstatus");
- if (!h) {
- h = document.createElement("span");
- h.id = "clientstatus";
- u({
- fontSize: "11px",
- color: "#cc0",
- marginLeft: "17px",
- padding: "0px"
- }, h.style)
- }
- var k = document.getElementById("loginstatus");
- if (!k) {
- k = document.createElement("span");
- k.id = "loginstatus";
- u({
- fontSize: "11px",
- color: "#aaa",
- marginLeft: "17px",
- padding: "0px"
- }, k.style)
- }
- for (; c.firstChild;) c.removeChild(c.firstChild);
- if (Ve) {
- window.clearInterval(Ve);
- Ve = null
- }
- if (b) {
- Bb = 24;
- Pb = Bb + 20 + 6;
- b = document.createElement("table");
- b.setAttribute("cellpadding", "0");
- b.setAttribute("cellspacing",
- "0");
- b.setAttribute("border", "0");
- b.style.height = "24px";
- b.style.width = "100%";
- c.appendChild(b);
- c = b.insertRow(-1);
- d = c.insertCell(-1);
- var l = document.createElement("img");
- l.id = "connlogo";
- l.style.width = "24px";
- l.style.height = "24px";
- l.src = "/gfx/icon_24.png";
- d.appendChild(l);
- c.insertCell(-1).appendChild(f);
- c.insertCell(-1).appendChild(g);
- c.insertCell(-1).appendChild(h);
- d = c.insertCell(-1);
- d.style.textAlign = "right";
- d.style.paddingRight = "8px";
- d.appendChild(k);
- k.style.paddingRight = "16px";
- d.appendChild(e)
- } else {
- Bb =
- 94;
- Pb = Bb + 20 + 6;
- b = document.createElement("table");
- b.setAttribute("cellpadding", "0");
- b.setAttribute("cellspacing", "0");
- b.setAttribute("border", "0");
- b.style.height = "90px";
- b.style.width = "100%";
- c.appendChild(b);
- c = b.insertRow(-1);
- b = b.insertRow(-1);
- l = c.insertCell(-1);
- l.rowSpan = 2;
- l.style.width = "170px";
- l.vAlign = "top";
- var j = document.createElement("img");
- j.style.margin = "2px";
- j.style.marginLeft = "8px";
- j.src = "https://s3.amazonaws.com/mibbit/minifrog.png";
- j.style.height = "86px";
- j.style.width = "166px";
- j.title = "Mibbit.com";
- j.title = "Mibbit version ." + (typeof VERSION == "undefined" ? "(dev)" : VERSION);
- l.appendChild(j);
- l = c.insertCell(-1);
- l.rowSpan = 2;
- l.align = "center";
- l.vAlign = "middle";
- l.appendChild(d);
- l = c.insertCell(-1);
- l.vAlign = "top";
- l.noWrap = true;
- l.style.width = "280px";
- c = document.createElement("div");
- u({
- background: "#222423 url(//static.mibbit.com/gfx/blackpanel.png) no-repeat top left",
- border: "2px solid #888",
- borderRadius: "8px",
- MozBorderRadius: "8px",
- WebkitBorderRadius: "8px",
- padding: "4px",
- marginRight: "4px",
- marginTop: "4px",
- height: "60px",
- overflow: "hidden"
- }, c.style);
- c.id = "statusbox";
- l.appendChild(c);
- l = document.createElement("img");
- l.id = "connlogo";
- l.style.width = "17px";
- l.style.height = "17px";
- l.src = "//static.mibbit.com/gfx/online-small.png";
- c.appendChild(l);
- c.appendChild(f);
- c.appendChild(document.createTextNode(" "));
- c.appendChild(g);
- c.appendChild(document.createElement("br"));
- c.appendChild(h);
- c.appendChild(document.createElement("br"));
- c.appendChild(k);
- k = b.insertCell(-1);
- k.vAlign = "bottom";
- k.appendChild(e);
- f = k = 0;
- if (document.body.clientWidth -
- 450 < 728) {
- k = 468;
- f = 60
- } else {
- k = 728;
- f = 90
- }
- for (e = document.createElement("iframe"); d.firstChild;) d.removeChild(d.firstChild);
- d.appendChild(e);
- d.style.width = k + "px";
- d.style.height = f + "px";
- d.style.overflow = "hidden";
- u({
- border: "0",
- overflow: "hidden",
- margin: "0",
- width: k + "px",
- height: f + "px"
- }, e.style);
- e.setAttribute("framespacing", "0");
- e.setAttribute("frameborder", "no");
- e.setAttribute("scrolling", "no");
- if (k == 728) {
- e.id = "ae6e7b42";
- e.name = "ae6e7b42";
- e.src = "https://as.mibbit.com/www/delivery/afr.php?refresh=120&zoneid=1&target=_blank&cb=" +
- Math.random();
- d = document.createElement("a");
- d.href = "https://as.mibbit.com/www/delivery/ck.php?n=a4414c80&cb=" + Math.random();
- d.target = "_blank";
- k = document.createElement("img");
- k.border = "0";
- k.src = "https://as.mibbit.com/www/delivery/avw.php?zoneid=1&cb=" + Math.random() + "&n=a4414c80";
- e.appendChild(d);
- d.appendChild(k)
- } else if (k == 468) {
- e.id = "a98f5f04";
- e.name = "a98f5f04";
- e.src = "https://as.mibbit.com/www/delivery/afr.php?refresh=120&zoneid=2&target=_blank&cb=" + Math.random();
- d = document.createElement("a");
- d.href =
- "https://as.mibbit.com/www/delivery/ck.php?n=aa3899a0&cb=" + Math.random();
- d.target = "_blank";
- k = document.createElement("img");
- k.border = "0";
- k.src = "https://as.mibbit.com/www/delivery/avw.php?zoneid=2&cb=" + Math.random() + "&n=aa3899a0";
- e.appendChild(d);
- d.appendChild(k)
- }
- }
- Fb(Q, Q.$a == "list");
- Q.z()
- }
- function Re(b, c, d, e) {
- function f(ha, aa) {
- var xa = document.createElement("option");
- xa.value = ha;
- xa.appendChild(document.createTextNode(aa));
- return xa
- }
- function g(ha, aa, xa) {
- var Wb = aa.style.display != "block";
- aa.style.display = Wb ? "block" : "none";
- ha.style.color = Wb ? "#b51abf" : "#444";
- try {
- if (Wb) xa && xa.focus();
- else ha.blur()
- } catch (kf) {}
- return Wb
- }
- var h = document.createElement("form");
- b.appendChild(h);
- b = document.createElement("div");
- u({
- width: "480px",
- margin: "auto",
- textAlign: "center"
- }, b.style);
- b.style.marginTop = "16px";
- h.appendChild(b);
- var k = document.createElement("table");
- k.setAttribute("cellpadding", "0");
- k.setAttribute("cellspacing", "0");
- k.setAttribute("border", "0");
- u({
- width: "100%",
- margin: "auto",
- fontFamily: "sans-serif",
- border: "2px solid #51661c",
- color: "#000",
- background: "#fff"
- }, k.style);
- k.style.borderRadius = "10px";
- k.style.MozBorderRadius = "10px";
- k.style.WebkitBorderRadius = "10px";
- k.style.padding = "10px";
- b.appendChild(k);
- var l = k.insertRow(-1).insertCell(-1);
- u({
- textAlign: "center",
- background: "#ccc",
- fontSize: "15px",
- color: "#51661c",
- fontWeight: "bold",
- borderRadius: "4px",
- MozBorderRadius: "4px",
- WebkitBorderRadius: "4px"
- }, l.style);
- l.appendChild(document.createTextNode("IRC: "));
- if (!c || !c.host) {
- var j = document.createElement("select");
- l.appendChild(j);
- ircnets.sort(function(ha, aa) {
- if (ha.name == "Mibbit") return -1;
- if (aa.name == "Mibbit") return 1;
- if (ha.name.toLowerCase() < aa.name.toLowerCase()) return -1;
- if (ha.name.toLowerCase() > aa.name.toLowerCase()) return 1;
- return 0
- });
- for (var n = 0; n < ircnets.length; n++) {
- b = ircnets[n];
- b = f(b.addr, b.name + (b.webirc ?
- " [webirc]" : ""));
- j.appendChild(b)
- }
- } else {
- b = document.createElement("span");
- u({
- color: "#444",
- fontSize: "13px"
- }, b.style);
- l.appendChild(b);
- var o = ":" + (c.ssl ? "+" : "") + c.port;
- if (!c.ssl && c.port == 6667) o = "";
- b.appendChild(document.createTextNode(c.host + o))
- }
- b = document.createElement("span");
- l.appendChild(document.createTextNode(" "));
- l.appendChild(b);
- b.style.fontSize = "11px";
- b.style.color = "#444";
- n = k.insertRow(-1).insertCell(-1);
- k = document.createElement("table");
- k.width = "100%";
- k.setAttribute("cellspacing", "2");
- k.setAttribute("border",
- "0");
- k.setAttribute("cellpadding", "2");
- n.appendChild(k);
- l = k.insertRow(-1).insertCell(-1);
- l.colSpan = "6";
- if (!c || !c.host) {
- b.firstChild && b.appendChild(document.createTextNode(" | "));
- var s = document.createElement("span");
- u({
- fontSize: "11px",
- color: "#444",
- textDecoration: "underline",
- cursor: "pointer"
- }, s.style);
- s.appendChild(document.createTextNode("Server"));
- b.appendChild(s);
- var w = document.createElement("input");
- w.size = "14";
- w.type = "text";
- u({
- background: "#fff",
- padding: "2px",
- fontFamily: "Sans-Serif",
- fontSize: "13px",
- color: "#222",
- border: "1px solid #484",
- borderRadius: "4px",
- MozBorderRadius: "4px",
- WebkitBorderRadius: "4px"
- }, w.style);
- w.value = "";
- var p = We(document.createTextNode("Server address:"), w, "Specify SSL with a '+' eg irc.mibbit.net:+6697");
- l.appendChild(p);
- s.onclick = function() {
- w.value = "";
- j.disabled = g(s, p, w);
- return false
- }
- }
- var r = document.createElement("select");
- u({
- border: "1px solid #484",
- background: "white",
- fontFamily: "sansSerif",
- fontSize: "13px",
- color: "#222"
- }, r.style);
- n = document.createElement("option");
- n.value =
- "nickserv";
- n.appendChild(document.createTextNode("NickServ"));
- r.appendChild(n);
- n = document.createElement("option");
- n.value = "pass";
- n.appendChild(document.createTextNode("Pass"));
- r.appendChild(n);
- var y = document.createElement("option");
- y.value = "auth";
- y.appendChild(document.createTextNode("Auth"));
- r.appendChild(y);
- n = document.createElement("option");
- n.value = "sasl-plain";
- n.appendChild(document.createTextNode("SASL PLAIN"));
- r.appendChild(n);
- n = document.createElement("option");
- n.value = "sasl-dh-blowfish";
- n.appendChild(document.createTextNode("SASL BLOWFISH"));
- r.appendChild(n);
- var z = document.createElement("input");
- z.size = "14";
- z.type = "password";
- u({
- background: "#fff",
- padding: "2px",
- fontFamily: "Sans-Serif",
- fontSize: "13px",
- color: "#222",
- border: "1px solid #484",
- borderRadius: "4px",
- MozBorderRadius: "4px",
- WebkitBorderRadius: "4px"
- }, z);
- z.value = "";
- var B = We(r, z);
- l.appendChild(B);
- y = document.createElement("span");
- u({
- fontSize: "11px",
- color: "#444",
- textDecoration: "underline",
- cursor: "pointer"
- }, y.style);
- y.appendChild(document.createTextNode("Auth"));
- b.firstChild && b.appendChild(document.createTextNode(" | "));
- b.appendChild(y);
- y.onclick = function() {
- g(y, B, z);
- return false
- };
- if (c && c.pass) {
- z.value = c.pass;
- g(y, B)
- } else c && c.needPass && g(y, B);
- var H = document.createElement("select");
- u({
- border: "1px solid #484",
- background: "white",
- fontFamily: "sansSerif",
- fontSize: "13px",
- color: "#222"
- }, H.style);
- for (n = 0; n < id.length; n++) {
- o = id[n];
- H.appendChild(f(o, o))
- }
- var P = We(document.createTextNode("Charset:"), H);
- l.appendChild(P);
- var N = document.createElement("span");
- u({
- fontSize: "11px",
- color: "#444",
- textDecoration: "underline",
- cursor: "pointer"
- },
- N.style);
- N.onclick = function() {
- g(N, P, H);
- return false
- };
- N.appendChild(document.createTextNode("Charset"));
- b.firstChild && b.appendChild(document.createTextNode(" | "));
- b.appendChild(N);
- if (c && c.charset) {
- H.value = c.charset;
- g(N, P)
- }
- if (c) {
- var I = document.createElement("input");
- u({
- border: "1px solid #484",
- background: "white",
- fontFamily: "sansSerif",
- fontSize: "13px",
- color: "#222"
- }, I.style);
- var J = We(document.createTextNode("Channel key:"), I);
- l.appendChild(J);
- var ka = document.createElement("span");
- u({
- fontSize: "11px",
- color: "#444",
- textDecoration: "underline",
- cursor: "pointer"
- }, ka.style);
- ka.onclick = function() {
- g(ka, J, I);
- return false
- };
- ka.appendChild(document.createTextNode("Key"));
- b.firstChild && b.appendChild(document.createTextNode(" | "));
- b.appendChild(ka);
- if (c && c.key) {
- I.value = c.key;
- g(ka, J, I)
- } else c && c.needKey && g(ka, J, I)
- }
- b = k.insertRow(-1);
- k = b.insertCell(-1);
- k.width = "46";
- n = document.createElement("img");
- n.src = "/gfx/irc_icon.png";
- n.width = "46";
- n.height = "45";
- k.appendChild(n);
- k = b.insertCell(-1);
- k.align = "right";
- k.width = "40";
- k.appendChild(document.createTextNode("Nick:"));
- k = b.insertCell(-1);
- var ya = document.createElement("input");
- ya.type = "text";
- ya.size = "8";
- u({
- background: "#fff",
- padding: "2px",
- fontFamily: "Sans-Serif",
- fontSize: "13px",
- color: "#222",
- border: "1px solid #484",
- borderRadius: "4px",
- MozBorderRadius: "4px",
- WebkitBorderRadius: "4px"
- }, ya.style);
- ya.id = e;
- ya.value = ed();
- k.appendChild(ya);
- if (c && c.nick) ya.value = c.nick;
- e = b.insertCell(-1);
- e.align = "right";
- e.width = "70";
- e.appendChild(document.createTextNode("Channel:"));
- e = b.insertCell(-1);
- if (!c || !c.target) {
- var ub = document.createElement("input");
- ub.type = "text";
- ub.size = "8";
- u({
- background: "#fff",
- padding: "2px",
- fontFamily: "Sans-Serif",
- fontSize: "13px",
- color: "#222",
- border: "1px solid #484",
- borderRadius: "4px",
- MozBorderRadius: "4px",
- WebkitBorderRadius: "4px"
- }, ub.style);
- e.appendChild(ub)
- } else {
- k = document.createElement("span");
- u({
- color: "#888",
- fontWeight: "bold"
- }, k.style);
- k.appendChild(document.createTextNode(c.target));
- e.appendChild(k)
- }
- e = b.insertCell(-1);
- b = document.createElement("input");
- b.type = "submit";
- b.className = "abutton";
- b.value = "Go";
- e.appendChild(b);
- h.onsubmit = function() {
- return function() {
- try {
- var ha, aa;
- ha = c && c.host ? c.host + ":" + (c.ssl ? "+" : "") + c.port : w.value == "" ? j.value : w.value;
- aa = c && c.target ? c.target : ub.value;
- if (I && I.value) aa += " " + I.value;
- x && A("irc.connect", "Channel=" + aa, K);
- Zc(G, ha, ya.value, z.value, aa, false, false, r.value, H.value)
- } catch (xa) {
- x && A("irc.connect", "exception " + xa, C)
- }
- d && d();
- return false
- }
- }()
- }
- function We(b, c, d) {
- var e = document.createElement("div");
- u({
- display: "none",
- borderBottom: "1px solid #aaa"
- }, e.style);
- var f = document.createElement("table");
- e.appendChild(f);
- f.width = "100%";
- f.setAttribute("cellspacing", "2");
- f.setAttribute("border", "0");
- f.setAttribute("cellpadding", "0");
- var g = f.insertRow(-1),
- h = g.insertCell(-1);
- h.align = "right";
- h.width = "50%";
- h.appendChild(b);
- b = g.insertCell(-1);
- b.align = "left";
- b.appendChild(c);
- if (d) {
- c = f.insertRow(-1).insertCell(-1);
- c.colSpan = "2";
- c.align = "center";
- f = document.createElement("span");
- u({
- fontSize: "11px",
- color: "#888"
- }, f.style);
- f.appendChild(document.createTextNode(d));
- c.appendChild(f)
- }
- return e
- }
- uGui = {};
- uGui.v = undefined;
- uGui.Bc = undefined;
- uGui.Ih = function(b, c, d) {
- if (uGui.Bc != c) {
- uGui.v && uGui.Ze();
- c.style.display = "inline";
- b.style.color = "#f99";
- uGui.Bc = c;
- uGui.v = b;
- d && d.focus()
- } else uGui.Ze()
- };
- uGui.Ze = function() {
- if (uGui.Bc) {
- uGui.Bc.style.display = "none";
- uGui.v.style.color = "white";
- delete uGui.v;
- delete uGui.Bc
- }
- };
- uGui.Vg = function() {
- var b = document.createElement("div");
- u({
- overflow: "hidden",
- position: "absolute",
- top: "24px",
- bottom: "8px",
- left: "8px",
- right: "8px"
- }, b.style);
- var c = document.createElement("iframe");
- c.style.width = "100%";
- c.style.height = "100%";
- c.src = "https://my.chat.mibbit.com/login";
- b.appendChild(c);
- ea(W, {
- element: b,
- closecb: q(),
- initcb: q()
- })
- };
- uGui.Wg = function() {
- var b = document.createElement("div");
- u({
- overflow: "hidden",
- position: "absolute",
- top: "24px",
- bottom: "8px",
- left: "8px",
- right: "8px"
- }, b.style);
- var c = document.createElement("iframe");
- c.style.width = "100%";
- c.style.height = "100%";
- c.src = "https://my.chat.mibbit.com/signup";
- b.appendChild(c);
- ea(W, {
- element: b,
- closecb: q(),
- initcb: q()
- })
- };
- uGui.Je = function(b) {
- function c(e, f, g, h) {
- var k = document.createElement("li");
- k.style.display = "inline";
- e.appendChild(k);
- var l;
- if (h) {
- l = document.createElement("a");
- l.href = h;
- l.target = "_blank"
- } else {
- l = document.createElement("span");
- l.style.cursor = "pointer"
- }
- u({
- color: "#eee",
- textDecoration: "none",
- fontSize: "11px",
- fontWeight: "bold",
- fontFamily: "sans-serif"
- }, l.style);
- if (g) l.onclick = function() {
- return function() {
- try {
- g(l)
- } catch (j) {}
- return false
- }
- }(l);
- l.appendChild(document.createTextNode(f));
- k.appendChild(l)
- }
- for (var d =
- document.getElementById("usermenu1"); d.firstChild;) d.removeChild(d.firstChild);
- if (b) {
- c(d, E.g("Menu_Account"), Xe);
- d.appendChild(document.createTextNode(" | "));
- c(d, E.g("Menu_Prefs"), Ye);
- d.appendChild(document.createTextNode(" | "));
- c(d, E.g("Menu_Profile"), Ze);
- d.appendChild(document.createTextNode(" | "));
- c(d, E.g("Menu_Channels"), $e);
- d.appendChild(document.createTextNode(" | "));
- c(d, E.g("Menu_Logs"), af)
- }
- };
- function Se(b, c) {
- this.Qf = c;
- this.bg = 31536E7;
- this.lc = b;
- this.qe = this.Vb = this.ag = false;
- this.ih = this.Vd = this.Sd = null;
- this.Se = true;
- this.Fe = this.Yd = this.Xe = this.Ah = this.Nc = this.Oc = null;
- window.setInterval(function(d) {
- return function() {
- if (d.qe) {
- var e = new Date;
- e = new Date(e.getTime() + 5E3);
- document.cookie = "mc=1; path=/; domain=.mibbit.com; expires=" + e.toGMTString();
- e = ";" + document.cookie;
- var f = e.indexOf(";uid=");
- if (f == -1) f = e.indexOf(" uid=");
- if (f != -1) {
- var g = e.indexOf(";", f + 5);
- f = unescape(e.substring(f + 5, g == -1 ?
- e.length : g));
- !d.qc && f != "" && !d.Vb && bf(d, f)
- } else if (d.Vb) {
- x && A("loginManager", "Logout", K);
- Je(d)
- }
- f = e.indexOf(";cmd=");
- if (f == -1) f = e.indexOf(" cmd=");
- if (f != -1) {
- g = e.indexOf(";", f + 5);
- e = decodeURIComponent(e.substring(f + 5, g == -1 ? e.length : g));
- document.cookie = "cmd=; path=/; domain=.mibbit.com; expires=" + (new Date).toGMTString();
- e = ba(e);
- for (f = 0; f < e.length; f++)
- if (e[f].cmd == "connect") {
- g = e[f].addr;
- var h = e[f].channels,
- k = e[f].nick ? e[f].nick : "",
- l = e[f].pass ? e[f].pass : "",
- j = e[f].charset ? e[f].charset : "",
- n = e[f].authmethod ?
- e[f].authmethod : "";
- if (Md) {
- var o = Md.ircserverdetails;
- if (o)
- for (var s = 0; s < o.length; s++)
- if (o[s].addr == g) {
- if (k == "") k = o[s].nick;
- if (l == "") l = o[s].pass;
- if (n == "") n = o[s].authmethod;
- if (j == "") j = o[s].charset;
- break
- }
- }
- if (k == "") {
- k = ed();
- if (fd) k = fd
- }
- if (j == "") j = F.defaultCharset;
- Zc(G, g, k, l, h, false, false, n, j)
- } else if (e[f].cmd == "reload") {
- x && A("loginManager", "Requesting a reload... " + d.Sd, K);
- !d.qc && d.Vd && cf(d, d.Vd)
- }
- }
- }
- }
- }(this), 500)
- }
- Se.prototype.Sc = function() {
- x && A("loginManager", "ONLINE", K);
- this.qe = true;
- var b = {
- channel: "LoginManager",
- cmd: "guest"
- };
- b.version = typeof VERSION == "undefined" ? "dev" : VERSION;
- b.uagent = navigator.userAgent;
- V.G(b)
- };
- function Gc(b) {
- x && A("loginManager", "OFFLINE", K);
- b.qe = false;
- b.qc = false;
- b.ag = false;
- df(b, false)
- }
- Se.prototype.Ya = function(b) {
- try {
- if (b.cmd == "loginreply") {
- this.qc = false;
- this.Oc && this.Oc(false);
- if (b.data == "failure") {
- var c = new Date;
- document.cookie = "uid=; expires=" + c.toGMTString();
- document.cookie = "uid=; expires=" + c.toGMTString() + "; path=/";
- this.Nc && this.Nc(false, b.reason);
- this.lc && this.lc(false)
- } else if (b.data == "success") {
- this.Nc && this.Nc(true);
- var d = {};
- if (b.profile) d = ba(b.profile);
- c = {};
- if (b.account) c = ba(b.account);
- var e = b.uid,
- f = b.aid,
- g = b.username,
- h = b.prefs;
- b = d;
- c = c;
- this.Vb = true;
- this.Sd = e;
- this.Vd =
- f;
- this.ih = g;
- this.a = h;
- if (this.Qf) {
- var k = new Date;
- document.cookie = "uid=; expires=" + k.toGMTString();
- document.cookie = "uid=; expires=" + k.toGMTString() + "; path=/";
- document.cookie = "uid=; expires=" + k.toGMTString() + "; path=/; domain=.chat.mibbit.com";
- k = new Date(k.getTime() + this.bg);
- document.cookie = typeof VERSION == "undefined" ? "uid=" + this.Sd + (this.Se ? "; expires=" + k.toGMTString() : "") + "; path=/;" : "uid=" + this.Sd + (this.Se ? "; expires=" + k.toGMTString() : "") + "; path=/; domain=.chat.mibbit.com"
- }
- this.lc && this.lc(true,
- f, g, h, b, c)
- }
- } else if (b.cmd == "chgusernamereply") this.Xe && this.Xe(b.success);
- else if (b.cmd == "chgpasswordreply") this.Yd && this.Yd(b.success);
- else if (b.cmd == "loggedout") df(this, true);
- else if (b.cmd == "settings") {
- this.qc = false;
- this.Fe && this.Fe(b.prefs)
- }
- } catch (l) {}
- };
- function df(b, c) {
- b.Vb = false;
- if (b.Qf && c) {
- c = new Date;
- document.cookie = "uid=; expires=" + c.toGMTString();
- document.cookie = "uid=; expires=" + c.toGMTString() + "; path=/";
- document.cookie = "uid=; expires=" + c.toGMTString() + "; path=/; domain=.chat.mibbit.com"
- }
- b.lc && b.lc(false)
- }
- function bf(b, c) {
- if (!b.Vb) {
- b.qc = true;
- b.Oc && b.Oc(true);
- V.G({
- channel: "LoginManager",
- cmd: "continue",
- uid: c
- })
- }
- }
- function cf(b, c) {
- b.qc = true;
- V.G({
- channel: "LoginManager",
- cmd: "loadprefs",
- settings: c
- })
- }
- function Je(b) {
- b.Vb && V.G({
- channel: "LoginManager",
- cmd: "logout"
- })
- }
- function Ne() {
- this.reset()
- }
- Ne.prototype.reset = function() {
- this.userListColorNormal = "#444444";
- this.userListColorTyping = "#ff0000";
- this.userListColorInactive = "#888888";
- this.userListMenuColor = "#444444";
- this.userListMenuBackground = "#cccccc";
- this.userListMenuBackgroundHover = "#ddddff";
- this.userGroupColor = "#eee";
- this.userGroupBackground = "#2c629a";
- this.userListHover = "#bbbbbb";
- this.ulistPaneBorder = "#666666";
- this.ulistPaneBackground = "#dddddd";
- this.userListSelected = "#aaaaaa";
- this.userListWidth = 148;
- this.userListPadding = 0;
- this.userListGroups = [{
- def: "chatting",
- title: "Chatting",
- hideOnEmpty: true,
- startHidden: false
- }, {
- def: "!chatting",
- title: "Idlers",
- hideOnEmpty: true,
- startHidden: false
- }];
- this.userListSort = "chatting,owner,admin,op,halfop,voice,active";
- this.userListFontSize = 13;
- this.userListFontFamily = "Arial,Helvetica,sans-serif";
- this.userListMenuFontSize = 11;
- this.userListMenuFontFamily = "Arial,Helvetica,sans-serif";
- this.userGroupFontSize = 13;
- this.userGroupFontFamily = "Arial,Helvetica,sans-serif";
- this.userListMenuAutoCloseTime = 3E3;
- this.doubleClickTime =
- 400;
- this.userListBoldOnChat = this.doubleClickToPM = true;
- this.userListChattingTime = 600;
- this.userListShowIcons = true;
- this.userListIconWidth = this.userListIconHeight = 16;
- this.userListShowPrefixChars = false;
- this.userListModeIconWidth = this.userListModeIconHeight = 16;
- this.userListShowModesLeft = this.userListShowSingleMode = false;
- this.userListModeSpacing = 2;
- this.iconModeOwner = "https://s3.amazonaws.com/mibbit/gfx/mode_owner.png";
- this.iconModeAdmin = "https://s3.amazonaws.com/mibbit/gfx/mode_admin.png";
- this.iconModeOp =
- "https://s3.amazonaws.com/mibbit/gfx/mode_op.png";
- this.iconModeHalfop = "https://s3.amazonaws.com/mibbit/gfx/mode_halfop.png";
- this.iconModeVoice = "https://s3.amazonaws.com/mibbit/gfx/mode_voice.png";
- this.ulicon_user = "https://s3.amazonaws.com/mibbit/gfx/user.png";
- this.ulicon_mibbituser = "https://s3.amazonaws.com/mibbit/gfx/user_green.png";
- this.ulicon_ignored = "https://s3.amazonaws.com/mibbit/gfx/user_gray.png";
- this.ulicon_ipod = "https://s3.amazonaws.com/mibbit/gfx/user_ipod.png";
- this.ulicon_iphone = "https://s3.amazonaws.com/mibbit/gfx/user_iphone.png";
- this.ulicon_wii = "https://s3.amazonaws.com/mibbit/gfx/user_wii.png";
- this.userListModeIconAlign = this.userListIconAlign = "bottom";
- this.ulistPaneRounding = 6;
- this.chatInputBarBorder = "#666666";
- this.chatInputBarBackground = "#dddddd url('https://s3.amazonaws.com/mibbit/gfx/grad1.png') repeat-x";
- this.chatInputColor = "#000000";
- this.chatInputFontFamily = "Arial,Helvetica,sans-serif";
- this.chatInputFontSize = 15;
- this.chatInputBorder = "#888888";
- this.chatInputBackground = "#ffffff";
- this.chatInputSpacing = 4;
- this.chatInputPadding =
- 2;
- this.chatInputNickColor = "#008800";
- this.needSendButton = this.chatInputShowNick = false;
- this.sendButtonBorder = "#666666";
- this.sendButtonBackground = "#dddddd url('https://s3.amazonaws.com/mibbit/gfx/grad1.png') repeat-x";
- this.sendButtonColor = "#000";
- this.showInputOptions = true;
- this.colorInMenuSep = "#0000aa";
- this.colorInMenu = "#585858";
- this.colorInMenuActive = "#000000";
- this.colorInLinks = "#0000ff";
- this.colorInText = "#000000";
- this.ioMinify = this.ioPastebin = this.ioColors = this.ioSmilies = true;
- this.ioCustomMenus = [];
- this.chatInputMenuFontFamily = "Arial,Helvetica,sans-serif";
- this.chatInputMenuFontSize = 11;
- this.chatInputRounding = 6;
- this.chatInputTabSort = "idle";
- this.chatOutputShowTimes = true;
- this.timeBorderRight = "#888888";
- this.timeBackground = "#eeeeee";
- this.formatTime = "%H:%M";
- this.timeFontFamily = "Arial,Helvetica,sans-serif";
- this.timeFontSize = 11;
- this.timeColor = "#444444";
- this.chatOutputTimeWidth = 30;
- this.formatDate = "%a";
- this.chatOutputShowNicks = true;
- this.nickBorderRight = "#888888";
- this.nickBackground = "#cccccc";
- this.chatOutputNickLeft =
- "<";
- this.nickFontFamily = "Arial,Helvetica,sans-serif";
- this.nickFontSize = 11;
- this.nickColor = "#0000ff";
- this.chatOutputNickWidth = 110;
- this.chatOutputNickRight = ">: ";
- this.nickColorMe = "#224422";
- this.nickColorGuest = "#008800";
- this.nickColorNotice = "#a20814";
- this.nickVerticalAlign = "middle";
- this.chatBackground = "#ffffff";
- this.chatPaneBorder = "#666666";
- this.chatPaneBackground = "#ffffff";
- this.chatBackgroundHighlight = "#ffffaa";
- this.chatFontFamily = "Arial,Helvetica,sans-serif";
- this.chatFontSize = 13;
- this.chatPaddingBottom =
- this.chatPaddingTop = 1;
- this.chatBackgroundLines = "#eeeeee";
- this.chatOutputBackground = "transparent";
- this.chatOutputRTL = false;
- this.chatPaneRounding = 0;
- this.infobarFontFamily = "Arial,Helvetica,sans-serif";
- this.infobarFontSize = 15;
- this.infobarPadding = 3;
- this.infobarColor = "#000";
- this.infobarBackground = "transparent";
- this.infobarBorder = "";
- this.infobarColorHighlight = "#444";
- this.infobarBackgroundHighlight = "#ccc";
- this.infobarBorderHighlight = "#444";
- this.cgmMargins = 6;
- this.extraContentPosition = "middle";
- this.extraContentWidth =
- 400;
- this.hideULonEC = true;
- this.chatOutputMaxLines = 250;
- this.showMarkers = this.showChannelUsers = true;
- this.noUListInChannels = false;
- this.showChannelOptions = true;
- this.tabColorServer = "#5ecf96";
- this.tabColorChannel = "#5e96cf";
- this.tabColorPM = "#8c8c8c";
- this.tabBColorPM = this.tabBColorChannel = this.tabBColorServer = "#aaaaaa";
- this.iconSmileysBase = "https://s3.amazonaws.com/mibbit/gfx/smilies/";
- this.iconSmileysWidth = this.iconSmileysHeight = 19;
- this.iconSmileys = [{
- code: ":)",
- src: "yel02.png"
- }, {
- code: ":-)",
- src: "yel02.png"
- }, {
- code: ":(",
- src: "yel36.png"
- }, {
- code: ":-(",
- src: "yel36.png"
- }, {
- code: ":D",
- src: "yel06.png"
- }, {
- code: ":-D",
- src: "yel06.png"
- }, {
- code: ":s",
- src: "yel07.png"
- }, {
- code: ":-s",
- src: "yel07.png"
- }, {
- code: ":/",
- src: "yel22.png"
- }, {
- code: ":-/",
- src: "yel22.png"
- }, {
- code: ":P",
- src: "yel40.png"
- }, {
- code: ":-P",
- src: "yel40.png"
- }, {
- code: ":p",
- src: "yel40.png"
- }, {
- code: ":-p",
- src: "yel40.png"
- }, {
- code: ":O",
- src: "yel54.png"
- }, {
- code: ":-O",
- src: "yel54.png"
- }, {
- code: ":o",
- src: "yel54.png"
- }, {
- code: ":-o",
- src: "yel54.png"
- }, {
- code: ";)",
- src: "yel08.png"
- }, {
- code: ";-)",
- src: "yel08.png"
- }];
- this.colorChatMe = this.colorChat = "#000000";
- this.colorEmoteMe = this.colorEmote = "#cc4444";
- this.nickHighlight = "#668866";
- this.nickHighlightMe = "#44aa44";
- this.colorChatRecent = "#888888";
- this.colorEmoteRecent = "#ee8888";
- this.colorJoin = "#008800";
- this.colorPart = "#880000";
- this.colorBack = "#66cc66";
- this.colorAway = "#cc6666";
- this.colorKick = "#880000";
- this.colorInvite = "#6666cc";
- this.colorTopic = "#000088";
- this.colorTopicWho = "#008888";
- this.colorChangeNick = "#888800";
- this.colorNotice = this.colorSystem = "#880000";
- this.colorBan =
- "#2222cc";
- this.colorUserMode = "#666622";
- this.colorLinks = "#0000ff";
- this.colorIRCLinks = "#ff0000";
- this.colorChannels = "#008800";
- this.parseSmilies = true;
- this.sizeSmiliesToText = false;
- this.parseSimple = this.parseColor = this.parseNicks = this.parseLinks = this.parseChannels = true;
- this.openLinksInExtra = false;
- this.parseReplaceImages = true;
- this.parseReplaceImagesHeight = this.parseReplaceImagesWidth = 32;
- this.showAwaysBacks = this.showJoinsParts = this.parseGoogleViewer = this.parseYouTubes = true;
- this.showPartInfo = this.showJoinInfo =
- false;
- this.showRecentChat = this.showCTCP = this.showMOTD = this.showUserModes = this.showBans = true;
- this.waitingbackground = "#222";
- this.waitingcolor = "#ccc";
- this.waitingimage = "https://s3.amazonaws.com/mibbit/gfx/loading.gif";
- this.customloading = "Connecting to server...";
- this.promptbackground = "#222";
- this.promptcolor = "#ccc";
- this.promptimage = "https://s3.amazonaws.com/mibbit/gfx/button_connect.png";
- this.customprompt = "Chat Now";
- this.nickprompt = "Choose a nickname";
- this.tabColorGeneral = "#aaaaaa";
- this.tabColorYServer =
- "#c0c0f3";
- this.tabColorYChannel = "#c0f3c0";
- this.tabBColorGeneral = "#cccccc";
- this.tabBColorYServer = "#c0c0f3";
- this.tabBColorYChannel = "#c0f3c0";
- this.tabTextColor = this.tabBackgroundColor = "#000000";
- this.tabTextColorInactive = "#222222";
- this.tabTextColorActivityMe = "#DEDE43";
- this.tabTextColorActivity = "#f0f0f0";
- this.tabTextColorArrows = "#aaaaaa";
- this.tabFontFamily = "Arial,Helvetica,sans-serif";
- this.tabSpacing = 4;
- this.tabPadding = 3;
- this.tabFontSize = 11;
- this.colorLinksWait = "#aaaacc";
- this.useTabList = false;
- this.tabListWidth =
- 160;
- this.logChannels = this.logPMs = this.ircNickClick = false;
- this.confirmUnload = this.confirmServerClose = this.allowIncommingPMs = true;
- this.autoAway = 7200;
- this.autoAwayMessage = "Auto away";
- this.blurPMs = this.focusNewJoins = this.autoBack = true;
- this.windowAlertPeriod = 500;
- this.windowAlertMaxFlashes = 3;
- this.desktopNotifications = false;
- this.errorsToActiveTab = this.noticesToActiveTab = true;
- this.language = "en";
- this.inputHistorySize = 250;
- this.allowChatRemoval = true;
- this.defaultCharset = "UTF-8";
- this.showChannelTabUsers = true;
- this.tabIndividualCloses = false;
- this.autoconnects = [];
- this.aliases = [{
- match: "/j",
- command: "/join $1-"
- }, {
- match: "/cs",
- command: "/msg ChanServ $1-"
- }, {
- match: "/ns",
- command: "/msg NickServ $1-"
- }, {
- match: "/ms",
- command: "/msg MemoServ $1-"
- }, {
- match: "/os",
- command: "/msg OperServ $1-"
- }, {
- match: "/bs",
- command: "/msg BotServ $1-"
- }, {
- match: "/voice",
- command: "/mode # +v $1"
- }, {
- match: "/unvoice",
- command: "/mode # -v $1"
- }, {
- match: "/devoice",
- command: "/mode # -v $1"
- }, {
- match: "/ban",
- command: "/mode # +b $1"
- }, {
- match: "/unban",
- command: "/mode # -b $1"
- }, {
- match: "/deban",
- command: "/mode # -b $1"
- }, {
- match: "/op",
- command: "/mode # +o $1"
- }, {
- match: "/unop",
- command: "/mode # -o $1"
- }, {
- match: "/deop",
- command: "/mode # -o $1"
- }, {
- match: "/halfop",
- command: "/mode # +h $1"
- }, {
- match: "/unhalfop",
- command: "/mode # -h $1"
- }, {
- match: "/dehalfop",
- command: "/mode # -h $1"
- }, {
- match: "/admin",
- command: "/mode # +a $1"
- }, {
- match: "/unadmin",
- command: "/mode # -a $1"
- }, {
- match: "/deadmin",
- command: "/mode # -a $1"
- }, {
- match: "/owner",
- command: "/mode # +q $1"
- }, {
- match: "/unowner",
- command: "/mode # -q $1"
- }, {
- match: "/deowner",
- command: "/mode # -q $1"
- }];
- this.filters = [{
- reg: "\\bmibbiturl\\b",
- replacement: "http://chat.mibbit.com",
- replacein: true,
- replaceout: true,
- block: false,
- cmd: "/splay http://static.mibbit.com/sounds/beep1 | /echo cool eh"
- }];
- this.usermenus = [{
- title: "PM",
- command: "/query $nick"
- }, {
- title: "Whois",
- command: "/whois $nick"
- }];
- this.channelmenus = [];
- this.sounds = {
- newpm: {
- sound: "https://s3.amazonaws.com/mibbit/sounds/ribbit",
- enabled: false
- },
- ircdisconnect: {
- sound: "https://s3.amazonaws.com/mibbit/sounds/beep1",
- enabled: false
- },
- mentionednick: {
- sound: "https://s3.amazonaws.com/mibbit/sounds/beep2",
- enabled: false
- },
- newmsg: {
- sound: "https://s3.amazonaws.com/mibbit/sounds/msg",
- enabled: false
- },
- userjoin: {
- sound: "https://s3.amazonaws.com/mibbit/sounds/join",
- enabled: false
- },
- userpart: {
- sound: "https://s3.amazonaws.com/mibbit/sounds/part",
- enabled: false
- }
- };
- this.ciUserListColorNormal = this.ciUserIcon = false
- };
- Ne.prototype.load = function(b, c) {
- try {
- x && A("UserPrefs", "Loading prefs (" + b + ")", K);
- var d = ba(b);
- try {
- this.autoconnects = [];
- for (var e in d) {
- var f = d[e];
- if (e == "autoconnects" && f) {
- this.autoconnects = f;
- x && A("UserPrefs", "Loading autos (" + this.autoconnects + ") " + this.autoconnects.length, K)
- } else if (e == "sounds") u(f, this[e]);
- else if (this.hasOwnProperty(e)) {
- if (f == "true" || f == "false") f = f == "true" ? true : false;
- this[e] = f
- }
- }
- } catch (g) {
- x && A("UserPrefs", g, C)
- }
- c || Rd(this)
- } catch (h) {
- x && A("UserPrefs", h, C)
- }
- };
- Ne.prototype.Mc = [];
- function Oe(b, c) {
- x && A("UserPrefs", "ADD listener... (" + b.Mc.length + ")", K);
- b.Mc.push(c)
- }
- function Rd(b, c) {
- x && A("UserPrefs", "Telling listeners... (" + b.Mc.length + ")", K);
- for (var d = 0; d < b.Mc.length; d++) try {
- b.Mc[d](c)
- } catch (e) {
- x && A("UserPrefs", e, C)
- }
- }
- var Ue = new Ne;
- function ef(b) {
- this.p = b;
- this.document = b.ownerDocument;
- b.style.overflow = "auto";
- b.style.textAlign = "center";
- var c = this.document.createElement("div");
- c.style.width = "100%";
- c.style.margin = "auto";
- c.style.marginTop = "10px";
- c.style.textAlign = "center";
- c.style.fontSize = "17px";
- c.style.color = "#222";
- c.style.fontWeight = "bold";
- c.appendChild(this.document.createTextNode("My Logs"));
- b.appendChild(c);
- c = this.document.createElement("iframe");
- var d = this.document.createElement("div");
- u({
- background: "white",
- margin: "auto",
- textAlign: "center",
- position: "absolute",
- top: "90px",
- left: "16px",
- bottom: "16px",
- right: "16px",
- overflow: "hidden"
- }, d.style);
- b.appendChild(d);
- d.appendChild(c);
- c.width = "100%";
- c.height = "100%";
- c.style.minHeight = "100%";
- c.src = "https://my.chat.mibbit.com/pmlogs"
- }
- function ff(b) {
- this.p = b;
- this.document = b.ownerDocument;
- b.style.overflow = "auto";
- b.style.textAlign = "center";
- var c = this.document.createElement("h2");
- c.style.paddingTop = "10px";
- c.appendChild(this.document.createTextNode("My Profile"));
- b.appendChild(c);
- c = this.document.createElement("form");
- c.style.textAlign = "center";
- c.style.display = "inline";
- c.onsubmit = function() {
- return false
- };
- b.appendChild(c);
- var d = gf(this);
- hf(this, d.insertRow(-1), "General");
- jf(this, d.insertRow(-1), "Age", "age");
- jf(this, d.insertRow(-1), "Sex",
- "sex");
- jf(this, d.insertRow(-1), "Location", "location");
- jf(this, d.insertRow(-1), "Home page", "homepage");
- jf(this, d.insertRow(-1), "Pic URL", "avatar");
- c.appendChild(d);
- d = this.document.createElement("input");
- d.type = "submit";
- d.value = "Save and close";
- d.style.marginTop = "10px";
- d.className = "abutton";
- d.onclick = function() {
- return function() {
- pe.Vb && V.G({
- channel: "LoginManager",
- cmd: "profile",
- profile: re
- });
- Jb(Q, ".XProfile")
- }
- }(this);
- c.appendChild(d);
- c = this.document.createElement("div");
- c.style.paddingTop = "10px";
- c.appendChild(this.document.createTextNode("This profile data is public and will be shown in a /whois."));
- b.appendChild(c)
- }
- function gf(b) {
- b = b.document.createElement("table");
- b.setAttribute("border", "0");
- b.setAttribute("cell-padding", "0");
- b.setAttribute("cell-spacing", "0");
- u({
- borderCollapse: "collapse",
- margin: "auto",
- fontFamily: "sans-serif",
- width: "480px",
- padding: "0px",
- background: "#888",
- border: "1px solid #444"
- }, b.style);
- b.style.marginTop = "4px";
- return b
- }
- function hf(b, c, d) {
- c = c.insertCell(-1);
- c.setAttribute("colspan", "2");
- c.colSpan = "2";
- u({
- width: "480px",
- padding: "1px",
- textAlign: "center",
- background: "#888",
- color: "#eee",
- fontWeight: "bold",
- border: "1px solid #444"
- }, c.style);
- c.appendChild(b.document.createTextNode(d))
- }
- function jf(b, c, d, e) {
- var f = {
- textAlign: "left",
- padding: "2px",
- border: "1px solid #888",
- background: "#ccc"
- },
- g = c.insertCell(-1);
- u(f, g.style);
- g.style.textAlign = "right";
- g.appendChild(b.document.createTextNode(d));
- var h = b.document.createElement("input");
- u({
- type: "text",
- size: "24",
- value: typeof re[e] == "undefined" ? "" : re[e]
- }, h);
- h.onkeyup = function() {
- return function() {
- re[e] = h.value
- }
- }(b);
- b = c.insertCell(-1);
- u(f, b.style);
- b.appendChild(h)
- }
- function Qe(b) {
- u({
- background: F.tabColorGeneral,
- border: "0",
- fontSize: "13px",
- position: "absolute",
- textAlign: "left",
- overflow: "auto"
- }, b.style);
- var c = {
- left: 0,
- right: 0,
- top: Pb,
- bottom: Qb
- };
- if (!O && F.useTabList) c.left = F.tabListWidth;
- b.style.top = c.top + "px";
- b.style.bottom = c.bottom + "px";
- b.style.left = c.left + "px";
- b.style.right = c.right + "px";
- if (O) {
- var d = function(f) {
- return function() {
- var g = parseInt(f.style.left),
- h = parseInt(f.style.right);
- f.style.width = document.body.clientWidth - g - h + "px";
- g = parseInt(f.style.top);
- h = parseInt(f.style.bottom);
- f.style.height = document.body.clientHeight - g - h + "px"
- }
- }(b);
- window.attachEvent ? window.attachEvent("onresize", d) : window.addEventListener("resize", d, false);
- window.setTimeout(d, 100)
- }
- function e() {
- window.detachEvent ? window.detachEvent("onresize", d) : window.removeEventListener("resize", d, false);
- return true
- }
- return O ? e : null
- }
- function Pe(b, c, d, e, f, g) {
- try {
- var h;
- var k = Q;
- if (k.l[b]) {
- Gb(k);
- k.l[b].open();
- h = true
- } else h = false;
- if (!h) {
- var l = document.getElementById("chats"),
- j = document.createElement("div"),
- n = Qe(j);
- if (f) j.style.display = "none";
- l.appendChild(j);
- g || (g = {});
- g.background = F.tabColorGeneral;
- g.border = F.tabBColorGeneral;
- j.style.background = F.tabColorGeneral;
- Lb(Q, b, j, c, d, null, n, g, f, e);
- return j
- }
- } catch (o) {
- x && A("showUserTab", "e=" + o)
- }
- }
- function $e() {
- var b = Pe(".XChannels", "Channels", "Channels", true, false, null);
- if (b) {
- var c = b.ownerDocument.createElement("div");
- u({
- position: "absolute",
- top: "8px",
- bottom: "8px",
- left: "8px",
- right: "8px",
- overflow: "hidden"
- }, c.style);
- b.appendChild(c);
- b = b.ownerDocument.createElement("iframe");
- b.style.width = "100%";
- b.style.height = "100%";
- b.style.minHeight = "100%";
- c.appendChild(b);
- b.src = "https://my.chat.mibbit.com/mychannels"
- }
- }
- function Ye() {
- var b = Pe(".XPrefs", "Prefs", "Preferences", true, false, {
- Kc: 16,
- Tb: 16,
- P: "https://s3.amazonaws.com/mibbit/gfx/wrench.png"
- });
- if (b) {
- var c = b.ownerDocument.createElement("div");
- u({
- position: "absolute",
- top: "8px",
- bottom: "8px",
- left: "8px",
- right: "8px",
- overflow: "hidden"
- }, c.style);
- b.appendChild(c);
- b = b.ownerDocument.createElement("iframe");
- b.style.width = "100%";
- b.style.height = "100%";
- b.style.minHeight = "100%";
- c.appendChild(b);
- b.src = "https://my.chat.mibbit.com/myprefs"
- }
- }
- function Ze() {
- var b = Pe(".XProfile", "Profile", "Profile", true, false, {
- Kc: 16,
- Tb: 16,
- P: "https://s3.amazonaws.com/mibbit/gfx/user_green.png"
- });
- b && new ff(b)
- }
- function Xe() {
- var b = Pe(".XAccount", "Account", "Account", true, false, null);
- if (b) {
- var c = b.ownerDocument.createElement("div");
- u({
- position: "absolute",
- top: "8px",
- bottom: "8px",
- left: "8px",
- right: "8px",
- overflow: "hidden"
- }, c.style);
- b.appendChild(c);
- b = b.ownerDocument.createElement("iframe");
- b.style.width = "100%";
- b.style.height = "100%";
- b.style.minHeight = "100%";
- c.appendChild(b);
- b.src = "https://my.chat.mibbit.com/myaccount"
- }
- }
- function af() {
- var b = Pe(".XLogs", "Logs", "Logs", true, false);
- if (b) var c = new ef(b);
- logHandler.Kh = c;
- logHandler.load()
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement