rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
e.params[2] = toUnicode(e.params[2], this); if (!(this.list.regexp) || e.params[2].match(this.list.regexp) || e.params[4].match(this.list.regexp)) | var chanName = e.decodeParam(2); var topic = e.decodeParam(4); if (!this.list.regexp || chanName.match(this.list.regexp) || topic.match(this.list.regexp)) | function my_listrply (e){ if (!("list" in this) || !("done" in this.list)) this.listInit(); ++this.list.count; e.params[2] = toUnicode(e.params[2], this); if (!(this.list.regexp) || e.params[2].match(this.list.regexp) || e.params[4].match(this.list.regexp)) { this.list.push([e.params[2], e.params[3], toUnicode(e.params[4], this)]); }} |
this.list.push([e.params[2], e.params[3], toUnicode(e.params[4], this)]); | this.list.push([chanName, e.params[3], topic]); | function my_listrply (e){ if (!("list" in this) || !("done" in this.list)) this.listInit(); ++this.list.count; e.params[2] = toUnicode(e.params[2], this); if (!(this.list.regexp) || e.params[2].match(this.list.regexp) || e.params[4].match(this.list.regexp)) { this.list.push([e.params[2], e.params[3], toUnicode(e.params[4], this)]); }} |
if (this._list.cancelled) return; | function my_listrply (e){ if (!("_list" in this) || !("lastLength" in this._list)) this.listInit(); ++this._list.count; var chanName = e.decodeParam(2); var topic = e.decodeParam(4); if (!this._list.regexp || chanName.match(this._list.regexp) || topic.match(this._list.regexp)) { if (!("file" in this._list)) { this._list.push([chanName, e.params[3], topic]); } else { this._list.file.write(fromUnicode(chanName, "UTF-8") + " " + e.params[3] + " " + fromUnicode(topic, "UTF-8") + "\n"); } }} |
|
[this.name, e.server.hostname, e.server.port]); | [this.getURL(), e.server.getURL(), e.disconnectStatus]); | function my_netdisconnect (e){ var msg; var reconnect = false; if (typeof e.disconnectStatus != "undefined") { switch (e.disconnectStatus) { case 0: msg = getMsg(MSG_CONNECTION_CLOSED, [this.getURL(), e.server.getURL()]); break; case NS_ERROR_CONNECTION_REFUSED: msg = getMsg(MSG_CONNECTION_REFUSED, [this.getURL(), e.server.getURL()]); break; case NS_ERROR_NET_TIMEOUT: msg = getMsg(MSG_CONNECTION_TIMEOUT, [this.getURL(), e.server.getURL()]); break; case NS_ERROR_UNKNOWN_HOST: msg = getMsg(MSG_UNKNOWN_HOST, e.server.hostname); break; default: msg = getMsg(MSG_CLOSE_STATUS, [this.name, e.server.hostname, e.server.port]); reconnect = true; break; } } else { msg = getMsg(MSG_CONNECTION_CLOSED, [this.name, e.server.hostname, e.server.port]); } for (var v in client.viewsArray) { var obj = client.viewsArray[v].source; if (obj != client) { var details = getObjectDetails(obj); if ("server" in details && details.server == e.server) obj.displayHere (msg, "ERROR"); } } for (var c in this.primServ.channels) { var channel = this.primServ.channels[c]; client.rdf.clearTargets(channel.getGraphResource(), client.rdf.resChanUser); channel.active = false; } this.connecting = false; dispatch("sync-headers"); updateTitle(); if ("userClose" in client && client.userClose && client.getConnectionCount() == 0) window.close();} |
this.display (msg, "ERROR"); | for (var v in client.viewsArray) { var obj = client.viewsArray[v].source; if (obj != client) { var details = getObjectDetails(obj); if ("server" in details && details.server == e.server) obj.displayHere (msg, "ERROR"); } } for (var c in this.primServ.channels) { var channel = this.primServ.channels[c]; client.rdf.clearTargets(channel.getGraphResource(), client.rdf.resChanUser); } | function my_netdisconnect (e){ var connection = e.server.connection; if (typeof e.disconnectStatus != "undefined") { switch (e.disconnectStatus) { case 0: msg = getMsg("my_netdisconnectConnectionClosed", [this.name, connection.host, connection.port]); case NS_ERROR_CONNECTION_REFUSED: msg = getMsg("my_netdisconnectConnectionRefused", [this.name, connection.host, connection.port]); break; case NS_ERROR_NET_TIMEOUT: msg = getMsg("my_netdisconnectConnectionTimeout", [this.name, connection.host, connection.port]); break; case NS_ERROR_UNKNOWN_HOST: msg = getMsg("my_netdisconnectUnknownHost", connection.host); break; default: msg = getMsg("my_netdisconnectConnectionClosedStatus", [this.name, connection.host, connection.port]); break; } } else { msg = getMsg("my_neterrorConnectionClosed", [this.name, connection.host, connection.port]); } this.display (msg, "ERROR"); this.connecting = false; updateTitle(); if (client.userClose && client.getConnectionCount() == 0) window.close();} |
if (client.userClose && client.getConnectionCount() == 0) | if ("userClose" in client && client.userClose && client.getConnectionCount() == 0) | function my_netdisconnect (e){ var connection = e.server.connection; if (typeof e.disconnectStatus != "undefined") { switch (e.disconnectStatus) { case 0: msg = getMsg("my_netdisconnectConnectionClosed", [this.name, connection.host, connection.port]); case NS_ERROR_CONNECTION_REFUSED: msg = getMsg("my_netdisconnectConnectionRefused", [this.name, connection.host, connection.port]); break; case NS_ERROR_NET_TIMEOUT: msg = getMsg("my_netdisconnectConnectionTimeout", [this.name, connection.host, connection.port]); break; case NS_ERROR_UNKNOWN_HOST: msg = getMsg("my_netdisconnectUnknownHost", connection.host); break; default: msg = getMsg("my_netdisconnectConnectionClosedStatus", [this.name, connection.host, connection.port]); break; } } else { msg = getMsg("my_neterrorConnectionClosed", [this.name, connection.host, connection.port]); } this.display (msg, "ERROR"); this.connecting = false; updateTitle(); if (client.userClose && client.getConnectionCount() == 0) window.close();} |
e.server.parent.display (e.meat, "ERROR"); | this.display (msg + this.name + " (" + e.server.connection.host + ").", "ERROR"); this.connecting = false; updateTitle(); | function my_neterror (e){ e.server.parent.display (e.meat, "ERROR"); } |
updateNetwork (e.network); | updateNetwork (this); | function my_netping (e){ updateNetwork (e.network); } |
updateNetwork (e.network); | updateNetwork (this); | function my_netpong (e){ updateNetwork (e.network); } |
this.display (e.meat, "NOTICE"); | this.display (e.meat, "NOTICE", this, e.server.me); | function my_notice (e){ this.display (e.meat, "NOTICE"); } |
this.display (toUnicode(e.params[2], this), "NOTICE", this, e.server.me); | this.display (e.decodeParam(2), "NOTICE", this, e.server.me); | function my_notice (e){ this.display (toUnicode(e.params[2], this), "NOTICE", this, e.server.me); } |
if (e.CTCPData.length != 13) | if (stringTrim(e.CTCPData).length != 13) | function my_replyping (e){ // see bug 326523 if (e.CTCPData.length != 13) { this.display(getMsg(MSG_PING_REPLY_INVALID, e.user.unicodeName), "INFO", e.user, "ME!"); return; } var delay = formatDateOffset((new Date() - new Date(Number(e.CTCPData))) / 1000); this.display(getMsg(MSG_PING_REPLY, [e.user.unicodeName, delay]), "INFO", e.user, "ME!");} |
this.display (p + str, e.code.toUpperCase()); | this.displayHere (p + str, e.code.toUpperCase()); | function my_showtonet (e){ var p = (e.params[2]) ? e.params[2] + " " : ""; var str = ""; switch (e.code) { case "004": str = e.params.slice(1).join (" "); break; case "001": updateTitle(this); updateNetwork (this); if (this.pendingURLs) { var url = this.pendingURLs.pop(); while (url) { gotoIRCURL(url); url = this.pendingURLs.pop(); } delete this.pendingURLs; } str = e.meat; break; case "372": case "375": case "376": if (this.IGNORE_MOTD) return; /* no break */ default: str = e.meat; break; } this.display (p + str, e.code.toUpperCase()); } |
if (source.TYPE != "CIRCUser" && | if (source.TYPE != "IRCUser" && | function my_showtonet (e){ var p = (3 in e.params) ? e.params[2] + " " : ""; var str = ""; switch (e.code) { case "004": case "005": str = e.params.slice(3).join (" "); break; case "001": updateTitle(this); this.updateHeader(); client.updateHeader(); updateStalkExpression(this); for (var v in client.viewsArray) { // reconnect to any existing views var source = client.viewsArray[v].source; var details = getObjectDetails(client.viewsArray[v].source); if (source.TYPE != "CIRCUser" && "network" in details && details.network == this) { gotoIRCURL(source.getURL()); } } if ("pendingURLs" in this) { var url = this.pendingURLs.pop(); while (url) { gotoIRCURL(url); url = this.pendingURLs.pop(); } delete this.pendingURLs; } str = e.params[2]; break; case "372": case "375": case "376": if (this.IGNORE_MOTD) return; /* no break */ default: var length = e.params.length; str = e.params[length - 1]; break; } this.displayHere (p + str, e.code.toUpperCase()); } |
str = e.params[2]; | str = e.decodeParam(2); if ("onLogin" in this) { ev = new CEvent("network", "login", this, "onLogin"); client.eventPump.addEvent(ev); } | function my_showtonet (e){ var p = (3 in e.params) ? e.params[2] + " " : ""; var str = ""; switch (e.code) { case "004": case "005": str = e.params.slice(3).join (" "); break; case "001": updateTitle(this); this.updateHeader(); client.updateHeader(); updateStalkExpression(this); for (var v in client.viewsArray) { // reconnect to any existing views var source = client.viewsArray[v].source; var details = getObjectDetails(client.viewsArray[v].source); if (source.TYPE != "CIRCUser" && "network" in details && details.network == this) { gotoIRCURL(source.getURL()); } } if ("pendingURLs" in this) { var url = this.pendingURLs.pop(); while (url) { gotoIRCURL(url); url = this.pendingURLs.pop(); } delete this.pendingURLs; } str = e.params[2]; break; case "372": case "375": case "376": if (this.IGNORE_MOTD) return; /* no break */ default: var length = e.params.length; str = e.params[length - 1]; break; } this.displayHere (p + str, e.code.toUpperCase()); } |
var length = e.params.length; str = e.params[length - 1]; | str = e.decodeParam(e.params.length - 1); | function my_showtonet (e){ var p = (3 in e.params) ? e.params[2] + " " : ""; var str = ""; switch (e.code) { case "004": case "005": str = e.params.slice(3).join (" "); break; case "001": updateTitle(this); this.updateHeader(); client.updateHeader(); updateStalkExpression(this); for (var v in client.viewsArray) { // reconnect to any existing views var source = client.viewsArray[v].source; var details = getObjectDetails(client.viewsArray[v].source); if (source.TYPE != "CIRCUser" && "network" in details && details.network == this) { gotoIRCURL(source.getURL()); } } if ("pendingURLs" in this) { var url = this.pendingURLs.pop(); while (url) { gotoIRCURL(url); url = this.pendingURLs.pop(); } delete this.pendingURLs; } str = e.params[2]; break; case "372": case "375": case "376": if (this.IGNORE_MOTD) return; /* no break */ default: var length = e.params.length; str = e.params[length - 1]; break; } this.displayHere (p + str, e.code.toUpperCase()); } |
var p = (e.params[2]) ? e.params[2] + " " : ""; | var p = (2 in e.params) ? e.params[2] + " " : ""; | function my_showtonet (e){ var p = (e.params[2]) ? e.params[2] + " " : ""; var str = ""; switch (e.code) { case "004": str = e.params.slice(1).join (" "); break; case "001": updateTitle(this); updateNetwork (this); if (this.pendingURLs) { var url = this.pendingURLs.pop(); while (url) { gotoIRCURL(url); url = this.pendingURLs.pop(); } delete this.pendingURLs; } str = e.meat; break; case "372": case "375": case "376": if (this.IGNORE_MOTD) return; /* no break */ default: str = e.meat; break; } this.displayHere (p + str, e.code.toUpperCase()); } |
if (this.pendingURLs) | if (client.currentObject == this) { var status = document.getElementById("offline-status"); status.removeAttribute ("offline"); } if ("pendingURLs" in this) | function my_showtonet (e){ var p = (e.params[2]) ? e.params[2] + " " : ""; var str = ""; switch (e.code) { case "004": str = e.params.slice(1).join (" "); break; case "001": updateTitle(this); updateNetwork (this); if (this.pendingURLs) { var url = this.pendingURLs.pop(); while (url) { gotoIRCURL(url); url = this.pendingURLs.pop(); } delete this.pendingURLs; } str = e.meat; break; case "372": case "375": case "376": if (this.IGNORE_MOTD) return; /* no break */ default: str = e.meat; break; } this.displayHere (p + str, e.code.toUpperCase()); } |
if (e.code == "TOPIC") e.channel.display (e.channel.topicBy + " has changed the topic to '" + e.channel.topic + "'", "TOPIC"); updateChannel (e.channel); updateTitle (e.channel); | if (e.channel.pendingNamesReply) e.channel.display (e.meat, "NAMES"); | function my_topic (e){ if (e.code == "TOPIC") e.channel.display (e.channel.topicBy + " has changed the topic to '" + e.channel.topic + "'", "TOPIC"); updateChannel (e.channel); updateTitle (e.channel); } |
if (e.channel.pendingNamesReply) | if ("pendingNamesReply" in e.channel) | function my_topic (e){ if (e.channel.pendingNamesReply) e.channel.display (e.meat, "NAMES");} |
e.user.display (e.CTCPData, "ACTION", this, e.server.me); | e.user.display(toUnicode(e.CTCPData), "ACTION", this, e.server.me); | function my_uaction (e){ e.user.display (e.CTCPData, "ACTION", this, e.server.me);} |
"BAD-CTCP"); | "BAD-CTCP", this, e.server.me); | function my_unkctcp (e){ this.parent.parent.display ("Unknown CTCP " + e.CTCPCode + "(" + e.CTCPData + ") from " + e.user.properNick, "BAD-CTCP"); } |
var msg = getMsg("msg.err.irc." + e.code, null, ""); if (msg) { this.display(msg); return; } | function my_unknown (e){ e.params.shift(); /* remove the code */ e.params.shift(); /* and the dest. nick (always me) */ /* if it looks like some kind of "end of foo" code, and we don't * already have a mapping for it, make one up */ var length = e.params.length; if (!(e.code in client.responseCodeMap) && (e.params[length - 1].search (/^end of/i) != -1)) { client.responseCodeMap[e.code] = "---"; } this.display(toUnicode(e.params.join(" "), this), e.code.toUpperCase());} |
|
this.display (e.params.join(" "), e.code.toUpperCase()); | this.display(toUnicode(e.params.join(" "), this), e.code.toUpperCase()); | function my_unknown (e){ e.params.shift(); /* remove the code */ e.params.shift(); /* and the dest. nick (always me) */ /* if it looks like some kind of "end of foo" code, and we don't * already have a mapping for it, make one up */ var length = e.params.length; if (!(e.code in client.responseCodeMap) && (e.params[length - 1].search (/^end of/i) != -1)) { client.responseCodeMap[e.code] = "---"; } this.display (e.params.join(" "), e.code.toUpperCase());} |
if (!client.responseCodeMap[e.code] && e.meat.search (/^end of/i) != -1) | if (!(e.code in client.responseCodeMap) && e.meat.search (/^end of/i) != -1) | function my_unknown (e){ e.params.shift(); /* remove the code */ e.params.shift(); /* and the dest. nick (always me) */ /* if it looks like some kind of "end of foo" code, and we don't * already have a mapping for it, make one up */ if (!client.responseCodeMap[e.code] && e.meat.search (/^end of/i) != -1) client.responseCodeMap[e.code] = "---"; this.display (e.params.join(" ") + ": " + e.meat, e.code.toUpperCase());} |
text = e.params[2] + " is a member of " + e.meat; | var ary = stringTrim(e.meat).split(" "); text = e.params[2] + " is a member of " + arraySpeak(ary); | function my_whoisreply (e){ var text = "egads!"; switch (Number(e.code)) { case 311: text = e.params[2] + " (" + e.params[3] + "@" + e.params[4] + ") is " + e.meat; break; case 319: text = e.params[2] + " is a member of " + e.meat; break; case 312: text = e.params[2] + " is attached to " + e.params[3] break; case 317: text = e.params[2] + " has been idle for " + e.params[3] + " seconds (on since " + new Date(Number(e.params[4]) * 1000) + ")"; break; case 318: text = "End of whois information for " + e.params[2]; break; } e.server.parent.display(text, e.code); } |
text = e.params[2] + " is attached to " + e.params[3] | text = e.params[2] + " is attached to " + e.params[3] + " ``" + e.meat + "''"; | function my_whoisreply (e){ var text = "egads!"; switch (Number(e.code)) { case 311: text = e.params[2] + " (" + e.params[3] + "@" + e.params[4] + ") is " + e.meat; break; case 319: text = e.params[2] + " is a member of " + e.meat; break; case 312: text = e.params[2] + " is attached to " + e.params[3] break; case 317: text = e.params[2] + " has been idle for " + e.params[3] + " seconds (on since " + new Date(Number(e.params[4]) * 1000) + ")"; break; case 318: text = "End of whois information for " + e.params[2]; break; } e.server.parent.display(text, e.code); } |
text = e.params[2] + " has been idle for " + e.params[3] + " seconds (on since " + new Date(Number(e.params[4]) * 1000) + ")"; | text = e.params[2] + " has been idle for " + formatDateOffset(Number(e.params[3])) + " (on since " + new Date(Number(e.params[4]) * 1000) + ")"; | function my_whoisreply (e){ var text = "egads!"; switch (Number(e.code)) { case 311: text = e.params[2] + " (" + e.params[3] + "@" + e.params[4] + ") is " + e.meat; break; case 319: text = e.params[2] + " is a member of " + e.meat; break; case 312: text = e.params[2] + " is attached to " + e.params[3] break; case 317: text = e.params[2] + " has been idle for " + e.params[3] + " seconds (on since " + new Date(Number(e.params[4]) * 1000) + ")"; break; case 318: text = "End of whois information for " + e.params[2]; break; } e.server.parent.display(text, e.code); } |
text = "End of whois information for " + e.params[2]; | text = "End of WHOIS information for " + e.params[2]; | function my_whoisreply (e){ var text = "egads!"; switch (Number(e.code)) { case 311: text = e.params[2] + " (" + e.params[3] + "@" + e.params[4] + ") is " + e.meat; break; case 319: text = e.params[2] + " is a member of " + e.meat; break; case 312: text = e.params[2] + " is attached to " + e.params[3] break; case 317: text = e.params[2] + " has been idle for " + e.params[3] + " seconds (on since " + new Date(Number(e.params[4]) * 1000) + ")"; break; case 318: text = "End of whois information for " + e.params[2]; break; } e.server.parent.display(text, e.code); } |
toUnicode(e.params[6], this)]); | e.decodeParam(6)]); | function my_whoisreply (e){ var text = "egads!"; var nick = e.params[2]; var user; if (nick in e.server.users) user = e.server.users[nick]; switch (Number(e.code)) { case 311: text = getMsg(MSG_WHOIS_NAME, [nick, e.params[3], e.params[4], toUnicode(e.params[6], this)]); break; case 319: var ary = stringTrim(e.params[3]).split(" "); text = getMsg(MSG_WHOIS_CHANNELS, [nick, arraySpeak(ary)]); break; case 312: text = getMsg(MSG_WHOIS_SERVER, [nick, e.params[3], e.params[4]]); break; case 317: text = getMsg(MSG_WHOIS_IDLE, [nick, formatDateOffset(Number(e.params[3])), new Date(Number(e.params[4]) * 1000)]); break; case 318: text = getMsg(MSG_WHOIS_END, nick); if (user) user.updateHeader(); break; } if (user && "messages" in user) user.displayHere (text, e.code); else e.server.parent.display(text, e.code);} |
var ary = stringTrim(e.params[3]).split(" "); | var ary = stringTrim(e.decodeParam(3)).split(" "); | function my_whoisreply (e){ var text = "egads!"; var nick = e.params[2]; var user; if (nick in e.server.users) user = e.server.users[nick]; switch (Number(e.code)) { case 311: text = getMsg(MSG_WHOIS_NAME, [nick, e.params[3], e.params[4], toUnicode(e.params[6], this)]); break; case 319: var ary = stringTrim(e.params[3]).split(" "); text = getMsg(MSG_WHOIS_CHANNELS, [nick, arraySpeak(ary)]); break; case 312: text = getMsg(MSG_WHOIS_SERVER, [nick, e.params[3], e.params[4]]); break; case 317: text = getMsg(MSG_WHOIS_IDLE, [nick, formatDateOffset(Number(e.params[3])), new Date(Number(e.params[4]) * 1000)]); break; case 318: text = getMsg(MSG_WHOIS_END, nick); if (user) user.updateHeader(); break; } if (user && "messages" in user) user.displayHere (text, e.code); else e.server.parent.display(text, e.code);} |
this.display(text, e.code); | if (e.user) e.user.display(text, e.code); else this.display(text, e.code); | function my_whoisreply (e){ var text = "egads!"; var nick = e.params[2]; var user; if (e.user) { user = e.user; nick = user.unicodeName; } switch (Number(e.code)) { case 311: text = getMsg(MSG_WHOIS_NAME, [nick, e.params[3], e.params[4], e.decodeParam(6)]); break; case 319: var ary = stringTrim(e.decodeParam(3)).split(" "); text = getMsg(MSG_WHOIS_CHANNELS, [nick, arraySpeak(ary)]); break; case 312: text = getMsg(MSG_WHOIS_SERVER, [nick, e.params[3], e.params[4]]); break; case 317: text = getMsg(MSG_WHOIS_IDLE, [nick, formatDateOffset(Number(e.params[3])), new Date(Number(e.params[4]) * 1000)]); break; case 318: text = getMsg(MSG_WHOIS_END, nick); if (user) user.updateHeader(); break; default: text = toUnicode(e.params.splice(2, e.params.length).join(" "), this); } this.display(text, e.code);} |
[e.params[2], e.params[3], e.params[4], e.meat]); | [nick, e.params[3], e.params[4], e.meat]); | function my_whoisreply (e){ var text = "egads!"; switch (Number(e.code)) { case 311: text = getMsg("my_whoisreplyMsg", [e.params[2], e.params[3], e.params[4], e.meat]); break; case 319: var ary = stringTrim(e.meat).split(" "); text = getMsg("my_whoisreplyMsg2",[e.params[2], arraySpeak(ary)]); break; case 312: text = getMsg("my_whoisreplyMsg3", [e.params[2], e.params[3], e.meat]); break; case 317: text = getMsg("my_whoisreplyMsg4", [e.params[2], formatDateOffset(Number(e.params[3])), new Date(Number(e.params[4]) * 1000)]); break; case 318: text = getMsg("my_whoisreplyMsg5", e.params[2]); break; } e.server.parent.display(text, e.code); } |
text = getMsg("my_whoisreplyMsg2",[e.params[2], arraySpeak(ary)]); | text = getMsg("my_whoisreplyMsg2",[nick, arraySpeak(ary)]); | function my_whoisreply (e){ var text = "egads!"; switch (Number(e.code)) { case 311: text = getMsg("my_whoisreplyMsg", [e.params[2], e.params[3], e.params[4], e.meat]); break; case 319: var ary = stringTrim(e.meat).split(" "); text = getMsg("my_whoisreplyMsg2",[e.params[2], arraySpeak(ary)]); break; case 312: text = getMsg("my_whoisreplyMsg3", [e.params[2], e.params[3], e.meat]); break; case 317: text = getMsg("my_whoisreplyMsg4", [e.params[2], formatDateOffset(Number(e.params[3])), new Date(Number(e.params[4]) * 1000)]); break; case 318: text = getMsg("my_whoisreplyMsg5", e.params[2]); break; } e.server.parent.display(text, e.code); } |
[e.params[2], e.params[3], e.meat]); | [nick, e.params[3], e.meat]); | function my_whoisreply (e){ var text = "egads!"; switch (Number(e.code)) { case 311: text = getMsg("my_whoisreplyMsg", [e.params[2], e.params[3], e.params[4], e.meat]); break; case 319: var ary = stringTrim(e.meat).split(" "); text = getMsg("my_whoisreplyMsg2",[e.params[2], arraySpeak(ary)]); break; case 312: text = getMsg("my_whoisreplyMsg3", [e.params[2], e.params[3], e.meat]); break; case 317: text = getMsg("my_whoisreplyMsg4", [e.params[2], formatDateOffset(Number(e.params[3])), new Date(Number(e.params[4]) * 1000)]); break; case 318: text = getMsg("my_whoisreplyMsg5", e.params[2]); break; } e.server.parent.display(text, e.code); } |
[e.params[2], formatDateOffset(Number(e.params[3])), | [nick, formatDateOffset(Number(e.params[3])), | function my_whoisreply (e){ var text = "egads!"; switch (Number(e.code)) { case 311: text = getMsg("my_whoisreplyMsg", [e.params[2], e.params[3], e.params[4], e.meat]); break; case 319: var ary = stringTrim(e.meat).split(" "); text = getMsg("my_whoisreplyMsg2",[e.params[2], arraySpeak(ary)]); break; case 312: text = getMsg("my_whoisreplyMsg3", [e.params[2], e.params[3], e.meat]); break; case 317: text = getMsg("my_whoisreplyMsg4", [e.params[2], formatDateOffset(Number(e.params[3])), new Date(Number(e.params[4]) * 1000)]); break; case 318: text = getMsg("my_whoisreplyMsg5", e.params[2]); break; } e.server.parent.display(text, e.code); } |
text = getMsg("my_whoisreplyMsg5", e.params[2]); | text = getMsg("my_whoisreplyMsg5", nick); | function my_whoisreply (e){ var text = "egads!"; switch (Number(e.code)) { case 311: text = getMsg("my_whoisreplyMsg", [e.params[2], e.params[3], e.params[4], e.meat]); break; case 319: var ary = stringTrim(e.meat).split(" "); text = getMsg("my_whoisreplyMsg2",[e.params[2], arraySpeak(ary)]); break; case 312: text = getMsg("my_whoisreplyMsg3", [e.params[2], e.params[3], e.meat]); break; case 317: text = getMsg("my_whoisreplyMsg4", [e.params[2], formatDateOffset(Number(e.params[3])), new Date(Number(e.params[4]) * 1000)]); break; case 318: text = getMsg("my_whoisreplyMsg5", e.params[2]); break; } e.server.parent.display(text, e.code); } |
e.server.parent.display(text, e.code); | if (nick in e.server.users && "messages" in e.server.users[nick]) { var user = e.server.users[nick]; updateTitle(user); user.display (text, e.code); } else { e.server.parent.display(text, e.code); } | function my_whoisreply (e){ var text = "egads!"; switch (Number(e.code)) { case 311: text = getMsg("my_whoisreplyMsg", [e.params[2], e.params[3], e.params[4], e.meat]); break; case 319: var ary = stringTrim(e.meat).split(" "); text = getMsg("my_whoisreplyMsg2",[e.params[2], arraySpeak(ary)]); break; case 312: text = getMsg("my_whoisreplyMsg3", [e.params[2], e.params[3], e.meat]); break; case 317: text = getMsg("my_whoisreplyMsg4", [e.params[2], formatDateOffset(Number(e.params[3])), new Date(Number(e.params[4]) * 1000)]); break; case 318: text = getMsg("my_whoisreplyMsg5", e.params[2]); break; } e.server.parent.display(text, e.code); } |
var commonDialogService = Components.classes["@mozilla.org/appshell/commonDialogs;1"].getService(); commonDialogService = commonDialogService.QueryInterface(Components.interfaces.nsICommonDialogs); commonDialogService.Prompt(window, title, message, oldValue, newValue) | var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(); promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService); promptService.Prompt(window, title, message, "", 0, oldValue, newValue) | function myPrompt(message, oldValue, title) { /* * Can't simply call javascript's "prompt" because it puts up a checkbox (see bug 41390) * so we are using a local rewrite of prompt here. */// if bug 41390 gets fixed, use the following line and delete rest of routine// prompt(message, oldValue, title); /* use this if bug 41390 gets fixed */ var newValue = { }; if (!title) { title = " "; } var commonDialogService = Components.classes["@mozilla.org/appshell/commonDialogs;1"].getService(); commonDialogService = commonDialogService.QueryInterface(Components.interfaces.nsICommonDialogs); commonDialogService.Prompt(window, title, message, oldValue, newValue) return newValue.value;} |
Components.classes["component: | Components.classes["@mozilla.org/appshell/commonDialogs;1"].getService(); | function myPrompt(message, oldValue, title) { /* * Can't simply call javascript's "prompt" because it puts up a checkbox (see bug 41390) * so we are using a local rewrite of prompt here. */// if bug 41390 gets fixed, use the following line and delete rest of routine// prompt(message, oldValue, title); /* use this if bug 41390 gets fixed */ var newValue = { }; if (!title) { title = " "; } var commonDialogService = Components.classes["component://netscape/appshell/commonDialogs"].getService(); commonDialogService = commonDialogService.QueryInterface(Components.interfaces.nsICommonDialogs); commonDialogService.Prompt(window, title, message, oldValue, newValue) return newValue.value;} |
if (mstone != savedmstone) | if (mstone != savedmstone) { | function needHomepageOverride(prefb) { var savedmstone = null; try { savedmstone = prefb.getCharPref("browser.startup.homepage_override.mstone"); } catch (e) {} var mstone = Components.classes["@mozilla.org/network/protocol;1?name=http"] .getService(nsIHttpProtocolHandler).misc; if (mstone != savedmstone) prefb.setCharPref("browser.startup.homepage_override.mstone", mstone); // Return true if the pref didn't exist (i.e. new profile) return !savedmstone;} |
return !savedmstone; | return 0; | function needHomepageOverride(prefb) { var savedmstone = null; try { savedmstone = prefb.getCharPref("browser.startup.homepage_override.mstone"); } catch (e) {} var mstone = Components.classes["@mozilla.org/network/protocol;1?name=http"] .getService(nsIHttpProtocolHandler).misc; if (mstone != savedmstone) prefb.setCharPref("browser.startup.homepage_override.mstone", mstone); // Return true if the pref didn't exist (i.e. new profile) return !savedmstone;} |
function net_conenct(pass) | function net_conenct() | function net_conenct(pass){ this.connectAttempt = 0; this.nextHost = 0; var ev = new CEvent ("network", "do-connect", this, "onDoConnect"); ev.password = pass; this.eventPump.addEvent (ev);} |
ev.password = pass; | function net_conenct(pass){ this.connectAttempt = 0; this.nextHost = 0; var ev = new CEvent ("network", "do-connect", this, "onDoConnect"); ev.password = pass; this.eventPump.addEvent (ev);} |
|
this.connectAttempt = 0; this.nextHost = 0; | function net_conenct(pass){ var ev = new CEvent ("network", "do-connect", this, "onDoConnect"); ev.password = pass; this.eventPump.addEvent (ev);} |
|
this.INITIAL_DESC, e.pass); | this.INITIAL_DESC); | function net_connect (e){ this.primServ = e.server; this.primServ.login (this.INITIAL_NICK, this.INITIAL_NAME, this.INITIAL_DESC, e.pass); return true;} |
return (this.primServ && this.primServ.connection.isConnected); | return ("primServ" in this && this.primServ.connection.isConnected); | function net_connected (e){ return (this.primServ && this.primServ.connection.isConnected); } |
if (client.SLOPPY_NETWORKS && client.currentObject != client && client.currentObject != this && o.network == this && o.server.isConnected) | if (client.SLOPPY_NETWORKS && client.currentObject != this && o.network == this && o.server && o.server.isConnected) | function net_display (message, msgtype, sourceObj, destObj){ var o = getObjectDetails(client.currentObject); if (client.SLOPPY_NETWORKS && client.currentObject != client && client.currentObject != this && o.network == this && o.server.isConnected) { client.currentObject.display (message, msgtype, sourceObj, destObj); } else { this.displayHere (message, msgtype, sourceObj, destObj); }} |
if ((this.primServ) && (this.primServ.connection.isConnected)) | if ("primServ" in this && this.primServ.connection.isConnected) | function net_doconnect(e){ var c; if ((this.primServ) && (this.primServ.connection.isConnected)) return true; this.connecting = true; /* connection is considered "made" when server * sends a 001 message (see server.on001 */ var ev; if (this.connectAttempt++ >= this.MAX_CONNECT_ATTEMPTS) { ev = new CEvent ("network", "error", this, "onError"); ev.server = this; ev.debug = "Connection attempts exhausted, giving up."; ev.errorCode = JSIRC_ERR_EXHAUSTED; this.eventPump.addEvent (ev); return false; } try { c = new CBSConnection(); } catch (ex) { ev = new CEvent ("network", "error", this, "onError"); ev.server = this; ev.debug = "Couldn't create socket :" + ex; ev.errorCode = JSIRC_ERR_NO_SOCKET; ev.exception = ex; this.eventPump.addEvent (ev); return false; } host = this.nextHost++; if (host >= this.serverList.length) { this.nextHost = 1; host = 0; } ev = new CEvent ("network", "startconnect", this, "onStartConnect"); ev.debug = "Connecting to " + this.serverList[host].name + ":" + this.serverList[host].port + ", attempt " + this.connectAttempt + " of " + this.MAX_CONNECT_ATTEMPTS + "..."; ev.host = this.serverList[host].name; ev.port = this.serverList[host].port; ev.connectAttempt = this.connectAttempt; this.eventPump.addEvent (ev); var connected = false; if (c.connect (this.serverList[host].name, this.serverList[host].port, (void 0), true, null)) { var ex; ev = new CEvent ("network", "connect", this, "onConnect"); try { ev.server = this.primServ = new CIRCServer (this, c); this.eventPump.addEvent (ev); connected = true; } catch (ex) { dd ("Caught following exception creating new CIRCServer in " + "CIRCNetwork::onDoConnect().\n" + dumpObjectTree(ex)); } } if (!connected) { /* connect failed, try again */ ev = new CEvent ("network", "do-connect", this, "onDoConnect"); this.eventPump.addEvent (ev); } return true;} |
this.connecting = true; | function net_doconnect(e){ var c; if ((this.primServ) && (this.primServ.connection.isConnected)) return true; this.connecting = true; /* connection is considered "made" when server * sends a 001 message (see server.on001 */ var ev; if (this.connectAttempt++ >= this.MAX_CONNECT_ATTEMPTS) { ev = new CEvent ("network", "error", this, "onError"); ev.server = this; ev.debug = "Connection attempts exhausted, giving up."; ev.errorCode = JSIRC_ERR_EXHAUSTED; this.eventPump.addEvent (ev); return false; } try { c = new CBSConnection(); } catch (ex) { ev = new CEvent ("network", "error", this, "onError"); ev.server = this; ev.debug = "Couldn't create socket :" + ex; ev.errorCode = JSIRC_ERR_NO_SOCKET; ev.exception = ex; this.eventPump.addEvent (ev); return false; } host = this.nextHost++; if (host >= this.serverList.length) { this.nextHost = 1; host = 0; } ev = new CEvent ("network", "startconnect", this, "onStartConnect"); ev.debug = "Connecting to " + this.serverList[host].name + ":" + this.serverList[host].port + ", attempt " + this.connectAttempt + " of " + this.MAX_CONNECT_ATTEMPTS + "..."; ev.host = this.serverList[host].name; ev.port = this.serverList[host].port; ev.connectAttempt = this.connectAttempt; this.eventPump.addEvent (ev); var connected = false; if (c.connect (this.serverList[host].name, this.serverList[host].port, (void 0), true, null)) { var ex; ev = new CEvent ("network", "connect", this, "onConnect"); try { ev.server = this.primServ = new CIRCServer (this, c); this.eventPump.addEvent (ev); connected = true; } catch (ex) { dd ("Caught following exception creating new CIRCServer in " + "CIRCNetwork::onDoConnect().\n" + dumpObjectTree(ex)); } } if (!connected) { /* connect failed, try again */ ev = new CEvent ("network", "do-connect", this, "onDoConnect"); this.eventPump.addEvent (ev); } return true;} |
|
host = this.nextHost++; | var host = this.nextHost++; | function net_doconnect(e){ var c; if ((this.primServ) && (this.primServ.connection.isConnected)) return true; this.connecting = true; /* connection is considered "made" when server * sends a 001 message (see server.on001 */ var ev; if (this.connectAttempt++ >= this.MAX_CONNECT_ATTEMPTS) { ev = new CEvent ("network", "error", this, "onError"); ev.server = this; ev.debug = "Connection attempts exhausted, giving up."; ev.errorCode = JSIRC_ERR_EXHAUSTED; this.eventPump.addEvent (ev); return false; } try { c = new CBSConnection(); } catch (ex) { ev = new CEvent ("network", "error", this, "onError"); ev.server = this; ev.debug = "Couldn't create socket :" + ex; ev.errorCode = JSIRC_ERR_NO_SOCKET; ev.exception = ex; this.eventPump.addEvent (ev); return false; } host = this.nextHost++; if (host >= this.serverList.length) { this.nextHost = 1; host = 0; } ev = new CEvent ("network", "startconnect", this, "onStartConnect"); ev.debug = "Connecting to " + this.serverList[host].name + ":" + this.serverList[host].port + ", attempt " + this.connectAttempt + " of " + this.MAX_CONNECT_ATTEMPTS + "..."; ev.host = this.serverList[host].name; ev.port = this.serverList[host].port; ev.connectAttempt = this.connectAttempt; this.eventPump.addEvent (ev); var connected = false; if (c.connect (this.serverList[host].name, this.serverList[host].port, (void 0), true, null)) { var ex; ev = new CEvent ("network", "connect", this, "onConnect"); try { ev.server = this.primServ = new CIRCServer (this, c); this.eventPump.addEvent (ev); connected = true; } catch (ex) { dd ("Caught following exception creating new CIRCServer in " + "CIRCNetwork::onDoConnect().\n" + dumpObjectTree(ex)); } } if (!connected) { /* connect failed, try again */ ev = new CEvent ("network", "do-connect", this, "onDoConnect"); this.eventPump.addEvent (ev); } return true;} |
ev.server = this.primServ = new CIRCServer (this, c); | var password = ("password" in this.serverList[host]) ? this.serverList[host].password : ""; ev.server = this.primServ = new CIRCServer (this, c, password); | function net_doconnect(e){ var c; if ((this.primServ) && (this.primServ.connection.isConnected)) return true; this.connecting = true; /* connection is considered "made" when server * sends a 001 message (see server.on001 */ var ev; if (this.connectAttempt++ >= this.MAX_CONNECT_ATTEMPTS) { ev = new CEvent ("network", "error", this, "onError"); ev.server = this; ev.debug = "Connection attempts exhausted, giving up."; ev.errorCode = JSIRC_ERR_EXHAUSTED; this.eventPump.addEvent (ev); return false; } try { c = new CBSConnection(); } catch (ex) { ev = new CEvent ("network", "error", this, "onError"); ev.server = this; ev.debug = "Couldn't create socket :" + ex; ev.errorCode = JSIRC_ERR_NO_SOCKET; ev.exception = ex; this.eventPump.addEvent (ev); return false; } host = this.nextHost++; if (host >= this.serverList.length) { this.nextHost = 1; host = 0; } ev = new CEvent ("network", "startconnect", this, "onStartConnect"); ev.debug = "Connecting to " + this.serverList[host].name + ":" + this.serverList[host].port + ", attempt " + this.connectAttempt + " of " + this.MAX_CONNECT_ATTEMPTS + "..."; ev.host = this.serverList[host].name; ev.port = this.serverList[host].port; ev.connectAttempt = this.connectAttempt; this.eventPump.addEvent (ev); var connected = false; if (c.connect (this.serverList[host].name, this.serverList[host].port, (void 0), true, null)) { var ex; ev = new CEvent ("network", "connect", this, "onConnect"); try { ev.server = this.primServ = new CIRCServer (this, c); this.eventPump.addEvent (ev); connected = true; } catch (ex) { dd ("Caught following exception creating new CIRCServer in " + "CIRCNetwork::onDoConnect().\n" + dumpObjectTree(ex)); } } if (!connected) { /* connect failed, try again */ ev = new CEvent ("network", "do-connect", this, "onDoConnect"); this.eventPump.addEvent (ev); } return true;} |
var attempt = (typeof e.attempt == "undefined") ? 1 : e.attempt + 1; var host = (typeof e.lastHost == "undefined") ? 0 : e.lastHost + 1; | this.connecting = true; | function net_doconnect(e){ var c; if ((this.primServ) && (this.primServ.connection.isConnected)) return true; var attempt = (typeof e.attempt == "undefined") ? 1 : e.attempt + 1; var host = (typeof e.lastHost == "undefined") ? 0 : e.lastHost + 1; var ev; if (attempt > this.MAX_CONNECT_ATTEMPTS) return false; try { c = new CBSConnection(); } catch (ex) { dd ("cant make socket."); ev = new CEvent ("network", "error", this, "onError"); ev.meat = "Unable to create socket: " + ex; this.eventPump.addEvent (ev); return false; } if (host >= this.serverList.length) host = 0; if (c.connect (this.serverList[host].name, this.serverList[host].port, (void 0), true)) { ev = new CEvent ("network", "connect", this, "onConnect"); ev.server = this.primServ = new CIRCServer (this, c); this.eventPump.addEvent (ev); } else { /* connect failed, try again */ ev = new CEvent ("network", "do-connect", this, "onDoConnect"); ev.lastHost = host; ev.attempt = attempt; this.eventPump.addEvent (ev); } return true;} |
if (attempt > this.MAX_CONNECT_ATTEMPTS) return false; | if (this.connectAttempt++ >= this.MAX_CONNECT_ATTEMPTS) { ev = new CEvent ("network", "info", this, "onInfo"); ev.msg = "Connection attempts exhausted, giving up."; this.eventPump.addEvent (ev); return false; } | function net_doconnect(e){ var c; if ((this.primServ) && (this.primServ.connection.isConnected)) return true; var attempt = (typeof e.attempt == "undefined") ? 1 : e.attempt + 1; var host = (typeof e.lastHost == "undefined") ? 0 : e.lastHost + 1; var ev; if (attempt > this.MAX_CONNECT_ATTEMPTS) return false; try { c = new CBSConnection(); } catch (ex) { dd ("cant make socket."); ev = new CEvent ("network", "error", this, "onError"); ev.meat = "Unable to create socket: " + ex; this.eventPump.addEvent (ev); return false; } if (host >= this.serverList.length) host = 0; if (c.connect (this.serverList[host].name, this.serverList[host].port, (void 0), true)) { ev = new CEvent ("network", "connect", this, "onConnect"); ev.server = this.primServ = new CIRCServer (this, c); this.eventPump.addEvent (ev); } else { /* connect failed, try again */ ev = new CEvent ("network", "do-connect", this, "onDoConnect"); ev.lastHost = host; ev.attempt = attempt; this.eventPump.addEvent (ev); } return true;} |
ev.server = this.primServ = new CIRCServer (this, c); | try { ev.server = this.primServ = new CIRCServer (this, c); this.eventPump.addEvent (ev); connected = true; } catch (ex) { dd ("Caught following exception creating new CIRCServer in " + "CIRCNetwork::onDoConnect().\n" + dumpObjectTree(ex)); } } if (!connected) { ev = new CEvent ("network", "info", this, "onInfo"); ev.msg = "Couldn't connect to " + this.serverList[host].name + ":" + this.serverList[host].port + ", trying next server in list..."; | function net_doconnect(e){ var c; if ((this.primServ) && (this.primServ.connection.isConnected)) return true; var attempt = (typeof e.attempt == "undefined") ? 1 : e.attempt + 1; var host = (typeof e.lastHost == "undefined") ? 0 : e.lastHost + 1; var ev; if (attempt > this.MAX_CONNECT_ATTEMPTS) return false; try { c = new CBSConnection(); } catch (ex) { dd ("cant make socket."); ev = new CEvent ("network", "error", this, "onError"); ev.meat = "Unable to create socket: " + ex; this.eventPump.addEvent (ev); return false; } if (host >= this.serverList.length) host = 0; if (c.connect (this.serverList[host].name, this.serverList[host].port, (void 0), true)) { ev = new CEvent ("network", "connect", this, "onConnect"); ev.server = this.primServ = new CIRCServer (this, c); this.eventPump.addEvent (ev); } else { /* connect failed, try again */ ev = new CEvent ("network", "do-connect", this, "onDoConnect"); ev.lastHost = host; ev.attempt = attempt; this.eventPump.addEvent (ev); } return true;} |
} else { | function net_doconnect(e){ var c; if ((this.primServ) && (this.primServ.connection.isConnected)) return true; var attempt = (typeof e.attempt == "undefined") ? 1 : e.attempt + 1; var host = (typeof e.lastHost == "undefined") ? 0 : e.lastHost + 1; var ev; if (attempt > this.MAX_CONNECT_ATTEMPTS) return false; try { c = new CBSConnection(); } catch (ex) { dd ("cant make socket."); ev = new CEvent ("network", "error", this, "onError"); ev.meat = "Unable to create socket: " + ex; this.eventPump.addEvent (ev); return false; } if (host >= this.serverList.length) host = 0; if (c.connect (this.serverList[host].name, this.serverList[host].port, (void 0), true)) { ev = new CEvent ("network", "connect", this, "onConnect"); ev.server = this.primServ = new CIRCServer (this, c); this.eventPump.addEvent (ev); } else { /* connect failed, try again */ ev = new CEvent ("network", "do-connect", this, "onDoConnect"); ev.lastHost = host; ev.attempt = attempt; this.eventPump.addEvent (ev); } return true;} |
|
ev.lastHost = host; ev.attempt = attempt; | function net_doconnect(e){ var c; if ((this.primServ) && (this.primServ.connection.isConnected)) return true; var attempt = (typeof e.attempt == "undefined") ? 1 : e.attempt + 1; var host = (typeof e.lastHost == "undefined") ? 0 : e.lastHost + 1; var ev; if (attempt > this.MAX_CONNECT_ATTEMPTS) return false; try { c = new CBSConnection(); } catch (ex) { dd ("cant make socket."); ev = new CEvent ("network", "error", this, "onError"); ev.meat = "Unable to create socket: " + ex; this.eventPump.addEvent (ev); return false; } if (host >= this.serverList.length) host = 0; if (c.connect (this.serverList[host].name, this.serverList[host].port, (void 0), true)) { ev = new CEvent ("network", "connect", this, "onConnect"); ev.server = this.primServ = new CIRCServer (this, c); this.eventPump.addEvent (ev); } else { /* connect failed, try again */ ev = new CEvent ("network", "do-connect", this, "onDoConnect"); ev.lastHost = host; ev.attempt = attempt; this.eventPump.addEvent (ev); } return true;} |
|
if (this.serverList.length == 1 && this.serverList[0].name == this.name && this.serverList[0].port != 6667) { return "irc: this.serverList[0].port + "/"; } | function net_geturl (){ return "irc://" + escape(this.name) + "/";} |
|
this.primServ.logout(fromUnicode(reason, this)); | this.primServ.logout(reason); | function net_quit (reason){ if (this.isConnected()) this.primServ.logout(fromUnicode(reason, this));} |
c.jsDate = c; | c.jsDate = aJSDate; | function NewCalDateTime(aJSDate) { var c = new CalDateTime(); if (aJSDate) c.jsDate = c; return c;} |
SetCardValues(gEditCard.card, document); | if (!CheckAndSetCardValues(gEditCard.card, document, true)) return false; | function NewCardOKButton(){ if (gOkCallback) { SetCardValues(gEditCard.card, document); var addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(Components.interfaces.nsIAddressBook); gOkCallback(addressbook.abCardToEscapedVCard(gEditCard.card)); return true; // close the window } var popup = document.getElementById('abPopup'); if ( popup ) { var uri = popup.getAttribute('value'); // FIX ME - hack to avoid crashing if no ab selected because of blank option bug from template // should be able to just remove this if we are not seeing blank lines in the ab popup if ( !uri ) return false; // don't close window // ----- if (gEditCard.card) { SetCardValues(gEditCard.card, document); var directory = GetDirectoryFromURI(uri); // replace gEditCard.card with the card we added // so that save listeners can get / set attributes on // the card that got created. var addedCard = directory.addCard(gEditCard.card); gEditCard.card = addedCard; NotifySaveListeners(); } } return true; // close the window} |
SetCardValues(gEditCard.card, document); var directory = GetDirectoryFromURI(uri); | if (!CheckAndSetCardValues(gEditCard.card, document, true)) return false; | function NewCardOKButton(){ if (gOkCallback) { SetCardValues(gEditCard.card, document); var addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(Components.interfaces.nsIAddressBook); gOkCallback(addressbook.abCardToEscapedVCard(gEditCard.card)); return true; // close the window } var popup = document.getElementById('abPopup'); if ( popup ) { var uri = popup.getAttribute('value'); // FIX ME - hack to avoid crashing if no ab selected because of blank option bug from template // should be able to just remove this if we are not seeing blank lines in the ab popup if ( !uri ) return false; // don't close window // ----- if (gEditCard.card) { SetCardValues(gEditCard.card, document); var directory = GetDirectoryFromURI(uri); // replace gEditCard.card with the card we added // so that save listeners can get / set attributes on // the card that got created. var addedCard = directory.addCard(gEditCard.card); gEditCard.card = addedCard; NotifySaveListeners(); } } return true; // close the window} |
var addedCard = directory.addCard(gEditCard.card); gEditCard.card = addedCard; | gEditCard.card = GetDirectoryFromURI(uri).addCard(gEditCard.card); | function NewCardOKButton(){ if (gOkCallback) { SetCardValues(gEditCard.card, document); var addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(Components.interfaces.nsIAddressBook); gOkCallback(addressbook.abCardToEscapedVCard(gEditCard.card)); return true; // close the window } var popup = document.getElementById('abPopup'); if ( popup ) { var uri = popup.getAttribute('value'); // FIX ME - hack to avoid crashing if no ab selected because of blank option bug from template // should be able to just remove this if we are not seeing blank lines in the ab popup if ( !uri ) return false; // don't close window // ----- if (gEditCard.card) { SetCardValues(gEditCard.card, document); var directory = GetDirectoryFromURI(uri); // replace gEditCard.card with the card we added // so that save listeners can get / set attributes on // the card that got created. var addedCard = directory.addCard(gEditCard.card); gEditCard.card = addedCard; NotifySaveListeners(); } } return true; // close the window} |
if ("arguments" in window && window.arguments[0]) window.arguments[0].allowRemoteContent = gEditCard.card.allowRemoteContent; | function NewCardOKButton(){ if (gOkCallback) { if (!CheckAndSetCardValues(gEditCard.card, document, true)) return false; // don't close window var addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(Components.interfaces.nsIAddressBook); gOkCallback(addressbook.abCardToEscapedVCard(gEditCard.card)); return true; // close the window } var popup = document.getElementById('abPopup'); if ( popup ) { var uri = popup.getAttribute('value'); // FIX ME - hack to avoid crashing if no ab selected because of blank option bug from template // should be able to just remove this if we are not seeing blank lines in the ab popup if ( !uri ) return false; // don't close window // ----- if (gEditCard.card) { if (!CheckAndSetCardValues(gEditCard.card, document, true)) return false; // don't close window // replace gEditCard.card with the card we added // so that save listeners can get / set attributes on // the card that got created. gEditCard.card = GetDirectoryFromURI(uri).addCard(gEditCard.card); NotifySaveListeners(); } } return true; // close the window} |
|
var uri = popup.value; | var uri = popup.getAttribute('data'); | function NewCardOKButton(){ var popup = document.getElementById('abPopup'); if ( popup ) { var uri = popup.value; // FIX ME - hack to avoid crashing if no ab selected because of blank option bug from template // should be able to just remove this if we are not seeing blank lines in the ab popup if ( !uri ) return false; // don't close window // ----- if ( editCard.card ) { SetCardValues(editCard.card, document); editCard.card.addCardToDatabase(uri); } } return true; // close the window} |
var name = commonDialogsService.Prompt(window, newTitle, promptStr,"",result); | var name = promptService.Prompt(window, newTitle, promptStr, "", 0, "",result); | function NewCategory(){ var promptStr = bundle.GetStringFromName("NewCategoryPrompt"); var newTitle = bundle.GetStringFromName("NewCategoryTitle"); var result = {value:0}; var name = commonDialogsService.Prompt(window, newTitle, promptStr,"",result); if ((!result.value) || result.value == "") return(false); var newName = RDF.GetLiteral(result.value); if (!newName) return(false); var categoryRes = RDF.GetResource("NC:SearchCategoryRoot"); if (!categoryRes) return(false); RDFC.Init(catDS, categoryRes); var randomID = Math.random(); var categoryID = "NC:SearchCategory?category=urn:search:category:" + randomID.toString(); var currentCatRes = RDF.GetResource(categoryID); if (!currentCatRes) return(false); var titleRes = RDF.GetResource("http://home.netscape.com/NC-rdf#title"); if (!titleRes) return(false); // set the category's name catDS.Assert(currentCatRes, titleRes, newName, true); // and insert the category RDFC.AppendElement(currentCatRes); RDFCUtils.MakeSeq(catDS, currentCatRes); // try and select the new category var categoryList = document.getElementById( "categoryList" ); var select_list = categoryList.getElementsByAttribute("id", categoryID); if (select_list && select_list.length > 0) { categoryList.selectedItem = select_list[0]; chooseCategory(categoryList.selectedItem); } return(true);} |
var name = prompt(promptStr, ""); if ((!name) || (name == "")) return(false); | var newTitle = bundle.GetStringFromName("NewCategoryTitle"); var result = {value:0}; var name = commonDialogsService.Prompt(window, newTitle, promptStr,"",result); if ((!result.value) || result.value == "") return(false); | function NewCategory(){ var promptStr = bundle.GetStringFromName("NewCategoryPrompt"); var name = prompt(promptStr, ""); if ((!name) || (name == "")) return(false); var newName = RDF.GetLiteral(name); if (!newName) return(false); var categoryRes = RDF.GetResource("NC:SearchCategoryRoot"); if (!categoryRes) return(false); RDFC.Init(catDS, categoryRes); var randomID = Math.random(); var categoryID = "NC:SearchCategory?category=urn:search:category:" + randomID.toString(); var currentCatRes = RDF.GetResource(categoryID); if (!currentCatRes) return(false); var titleRes = RDF.GetResource("http://home.netscape.com/NC-rdf#title"); if (!titleRes) return(false); // set the category's name catDS.Assert(currentCatRes, titleRes, newName, true); // and insert the category RDFC.AppendElement(currentCatRes); RDFCUtils.MakeSeq(catDS, currentCatRes); // try and select the new category var categoryList = document.getElementById( "categoryList" ); var select_list = categoryList.getElementsByAttribute("id", categoryID); if (select_list && select_list.length > 0) { categoryList.selectedItem = select_list[0]; chooseCategory(categoryList.selectedItem); } return(true);} |
var newName = RDF.GetLiteral(name); | var newName = RDF.GetLiteral(result.value); | function NewCategory(){ var promptStr = bundle.GetStringFromName("NewCategoryPrompt"); var name = prompt(promptStr, ""); if ((!name) || (name == "")) return(false); var newName = RDF.GetLiteral(name); if (!newName) return(false); var categoryRes = RDF.GetResource("NC:SearchCategoryRoot"); if (!categoryRes) return(false); RDFC.Init(catDS, categoryRes); var randomID = Math.random(); var categoryID = "NC:SearchCategory?category=urn:search:category:" + randomID.toString(); var currentCatRes = RDF.GetResource(categoryID); if (!currentCatRes) return(false); var titleRes = RDF.GetResource("http://home.netscape.com/NC-rdf#title"); if (!titleRes) return(false); // set the category's name catDS.Assert(currentCatRes, titleRes, newName, true); // and insert the category RDFC.AppendElement(currentCatRes); RDFCUtils.MakeSeq(catDS, currentCatRes); // try and select the new category var categoryList = document.getElementById( "categoryList" ); var select_list = categoryList.getElementsByAttribute("id", categoryID); if (select_list && select_list.length > 0) { categoryList.selectedItem = select_list[0]; chooseCategory(categoryList.selectedItem); } return(true);} |
t.utcTime = aPRTime; | t.isUtc = true; t.nativeTime = aPRTime; | function newDateTime(aPRTime) { var t = Components.classes[kCalDateTimeContractID] .createInstance(kCalDateTimeIID); t.utcTime = aPRTime; return t;} |
function NewEditorWindow() | function NewEditorWindow(aPageURL) | function NewEditorWindow(){ // Open editor window with blank page // Kludge to leverage openDialog non-modal! window.openDialog( "chrome://editor/content", "_blank", "chrome,all,dialog=no", "about:blank");} |
var endDate = new Date(startDate); | endDate = new Date(startDate); | function newEvent(startDate, endDate, allDay){ // create a new event to be edited and added var calendarEvent = createEvent(); if (!startDate) { startDate = gCalendarWindow.currentView.getNewEventDate(); } calendarEvent.startDate.jsDate = startDate; if (!endDate) { var MinutesToAddOn = getIntPref(gCalendarWindow.calendarPreferences.calendarPref, "event.defaultlength", gCalendarBundle.getString("defaultEventLength" ) ); var endDate = new Date(startDate); endDate.setMinutes(endDate.getMinutes() + MinutesToAddOn); } calendarEvent.endDate.jsDate = endDate if (allDay) calendarEvent.isAllDay = true; var server = getSelectedCalendarPathOrNull(); editNewEvent( calendarEvent, server );} |
server = selectedCalendarItem.calendarObject.path; | server = selectedCalendarItem.calendarPath; | function newEvent( startDate, endDate ){ // create a new event to be edited and added var calendarEvent = createEvent(); calendarEvent.start.setTime( startDate ); if( !endDate ) { var MinutesToAddOn = getIntPref(gCalendarWindow.calendarPreferences.calendarPref, "event.defaultlength", 60 ); var endDateTime = startDate.getTime() + ( 1000 * 60 * MinutesToAddOn ); calendarEvent.end.setTime( endDateTime ); } else { calendarEvent.end.setTime( endDate.getTime() ); } //get the selected calendar var selectedCalendarItem = document.getElementById( "list-calendars-listbox" ).selectedItem; var server = null; if( selectedCalendarItem ) { server = selectedCalendarItem.calendarObject.path; } editNewEvent( calendarEvent, server );} |
var startDate = gNewDateVariable; | startDate = gNewDateVariable; | function newEventCommand( event ){ if( gNewDateVariable != null ) { var startDate = gNewDateVariable; } else var startDate = gCalendarWindow.currentView.getNewEventDate(); var Minutes = Math.ceil( startDate.getMinutes() / 5 ) * 5 ; startDate = new Date( startDate.getFullYear(), startDate.getMonth(), startDate.getDate(), startDate.getHours(), Minutes, 0); newEvent( startDate );} |
var startDate = gCalendarWindow.currentView.getNewEventDate(); | startDate = gCalendarWindow.currentView.getNewEventDate(); | function newEventCommand( event ){ if( gNewDateVariable != null ) { var startDate = gNewDateVariable; } else var startDate = gCalendarWindow.currentView.getNewEventDate(); var Minutes = Math.ceil( startDate.getMinutes() / 5 ) * 5 ; startDate = new Date( startDate.getFullYear(), startDate.getMonth(), startDate.getDate(), startDate.getHours(), Minutes, 0); newEvent( startDate );} |
gBookmarksTree.treeBoxObject.selection.selectEventsSuppressed = true; gBookmarksTree.treeBoxObject.selection.clearSelection(); | function newFolder(){ gBookmarksTree.focus(); // we should use goDoCommand, but the current way of inserting // resources do not insert in folders. //goDoCommand("cmd_bm_newfolder"); gBookmarksTree.treeBoxObject.selection.selectEventsSuppressed = true; gBookmarksTree.treeBoxObject.selection.clearSelection(); var target = BookmarksUtils.getTargetFromFolder(gSelectedFolder); var folder = BookmarksCommand.createNewFolder(target); gBookmarksTree.selectResource(folder); gBookmarksTree.treeBoxObject.selection.selectEventsSuppressed = false;} |
|
gBookmarksTree.selectResource(folder); gBookmarksTree.treeBoxObject.selection.selectEventsSuppressed = false; | if (!BMSVC.isBookmarkedResource(folder)) return; selectFolder(folder); | function newFolder(){ gBookmarksTree.focus(); // we should use goDoCommand, but the current way of inserting // resources do not insert in folders. //goDoCommand("cmd_bm_newfolder"); gBookmarksTree.treeBoxObject.selection.selectEventsSuppressed = true; gBookmarksTree.treeBoxObject.selection.clearSelection(); var target = BookmarksUtils.getTargetFromFolder(gSelectedFolder); var folder = BookmarksCommand.createNewFolder(target); gBookmarksTree.selectResource(folder); gBookmarksTree.treeBoxObject.selection.selectEventsSuppressed = false;} |
var folderArray = Components.classes["component: var nameArray = Components.classes["component: | var folderArray = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray); var nameArray = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray); | function NewFolder(name,uri){ //dump("uri,name = " + uri + "," + name + "\n"); if (uri && (uri != "") && name && (name != "")) { var selectedFolderResource = RDF.GetResource(uri); //dump("selectedFolder = " + uri + "\n"); var compositeDataSource = GetCompositeDataSource("NewFolder"); var folderArray = Components.classes["component://netscape/supports-array"].createInstance(Components.interfaces.nsISupportsArray); var nameArray = Components.classes["component://netscape/supports-array"].createInstance(Components.interfaces.nsISupportsArray); folderArray.AppendElement(selectedFolderResource); var nameLiteral = RDF.GetLiteral(name); nameArray.AppendElement(nameLiteral); DoRDFCommand(compositeDataSource, "http://home.netscape.com/NC-rdf#NewFolder", folderArray, nameArray); } else { dump("no name or nothing selected\n"); }} |
a.setAttribute ("class", className); | if (className) a.setAttribute ("class", className); | function newInlineText (data, className, tagName){ if (typeof tagName == "undefined") tagName = "html:span"; var a = document.createElementNS ("http://www.w3.org/1999/xhtml", tagName); a.setAttribute ("class", className); switch (typeof data) { case "string": a.appendChild (document.createTextNode (data)); break; case "object": for (var p in data) if (p != "data") a.setAttribute (p, data[p]); else a.appendChild (document.createTextNode (data[p])); break; case "undefined": break; default: dd ("** INVALID TYPE ('" + typeof data + "') passed to " + "newInlineText."); break; } return a; } |
function newObject(progID, iface) | function newObject(contractID, iface) | function newObject(progID, iface){ if (!jsenv.HAS_XPCOM) return null; var obj = Components.classes[progID].createInstance(); var rv; switch (typeof iface) { case "string": rv = obj.QueryInterface(Components.interfaces[iface]); break; case "object": rv = obj.QueryInterface[iface]; break; default: rv = null; break; } return rv; } |
var obj = Components.classes[progID].createInstance(); | var obj = Components.classes[contractID].createInstance(); | function newObject(progID, iface){ if (!jsenv.HAS_XPCOM) return null; var obj = Components.classes[progID].createInstance(); var rv; switch (typeof iface) { case "string": rv = obj.QueryInterface(Components.interfaces[iface]); break; case "object": rv = obj.QueryInterface[iface]; break; default: rv = null; break; } return rv; } |
"New " + gTypeStrs[type] + " value", "Enter the preference name", result, null, dummy)) { | gConfigBundle.getFormattedString("new_title", [gTypeStrs[type]]), gConfigBundle.getString("new_prompt"), result, null, dummy)) { | function NewPref(type){ var result = { value: "" }; var dummy = { value: 0 }; // XXX get these from a string bundle if (gPromptService.prompt(window, "New " + gTypeStrs[type] + " value", "Enter the preference name", result, null, dummy)) { var pref; if (result.value in gPrefHash) pref = gPrefHash[result.value]; else pref = { prefCol: result.value, lockCol: PREF_IS_DEFAULT_VALUE, typeCol: type, valueCol: "" }; if (ModifyPref(pref)) setTimeout(gotoPref, 0, result.value); }} |
else calendarToDo.due.setTime( dueDate ); | function newToDo ( startDate, dueDate ) { var calendarToDo = createToDo(); // created todo has no start or due date unless user wants one if (! startDate ) calendarToDo.start.clear(); if (! dueDate ) calendarToDo.due.clear(); var server = getSelectedCalendarPathOrNull(); editNewToDo(calendarToDo, server);} |
|
MisspelledWord = spellChecker.GetNextMisspelledWord(); | gMisspelledWord = spellChecker.GetNextMisspelledWord(); | function NextWord(){ MisspelledWord = spellChecker.GetNextMisspelledWord(); SetWidgetsForMisspelledWord();} |
dialog.wordInput.value = misspelledWord; | dialog.misspelledWord.setAttribute("value",misspelledWord); | function NextWord(){ misspelledWord = spellChecker.GetNextMisspelledWord(); dialog.wordInput.value = misspelledWord; if (misspelledWord == "") { dump("FINISHED SPELL CHECKING\n"); FillSuggestedList("(no suggestions)"); } else { FillSuggestedList(); }} |
FillSuggestedList("(no suggestions)"); | FillSuggestedList(GetString("NoSuggestedWords")); | function NextWord(){ misspelledWord = spellChecker.GetNextMisspelledWord(); dialog.wordInput.value = misspelledWord; if (misspelledWord == "") { dump("FINISHED SPELL CHECKING\n"); FillSuggestedList("(no suggestions)"); } else { FillSuggestedList(); }} |
dialog.replaceWordInput.value = misspelledWord; | function NextWord(){ misspelledWord = spellChecker.GetNextMisspelledWord(); dialog.wordInput.value = misspelledWord; if (misspelledWord == "") { dump("FINISHED SPELL CHECKING\n"); FillSuggestedList("(no suggestions)"); } else { FillSuggestedList(); }} |
|
switch (nodeType) { case Node.ELEMENT_NODE: return "Element"; case Node.ATTRIBUTE_NODE: return "Attribute"; case Node.TEXT_NODE: return "Text"; case Node.CDATA_SECTION_NODE: return "CDATA Section"; case Node.ENTITY_REFERENCE_NODE: return "Entity Reference"; case Node.ENTITY_NODE: return "Entity"; case Node.PROCESSING_INSTRUCTION_NODE: return "Processing Instruction"; case Node.COMMENT_NODE: return "Comment"; case Node.DOCUMENT_NODE: return "Document"; case Node.DOCUMENT_TYPE_NODE: return "Document Type"; case Node.DOCUMENT_FRAGMENT_NODE: return "Document Fragment"; case Node.NOTATION_NODE: return "Notation"; | if (!gStringBundle) { var strBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"]. getService(Components.interfaces.nsIStringBundleService); gStringBundle = strBundleService.createBundle("chrome: | function nodeTypeToText (nodeType){ switch (nodeType) { case Node.ELEMENT_NODE: return "Element"; case Node.ATTRIBUTE_NODE: return "Attribute"; case Node.TEXT_NODE: return "Text"; case Node.CDATA_SECTION_NODE: return "CDATA Section"; case Node.ENTITY_REFERENCE_NODE: return "Entity Reference"; case Node.ENTITY_NODE: return "Entity"; case Node.PROCESSING_INSTRUCTION_NODE: return "Processing Instruction"; case Node.COMMENT_NODE: return "Comment"; case Node.DOCUMENT_NODE: return "Document"; case Node.DOCUMENT_TYPE_NODE: return "Document Type"; case Node.DOCUMENT_FRAGMENT_NODE: return "Document Fragment"; case Node.NOTATION_NODE: return "Notation"; } return nodeType;} |
if (gStringBundle) { const nsIDOMNode = Components.interfaces.nsIDOMNode; if (nodeType >= nsIDOMNode.ELEMENT_NODE && nodeType <= nsIDOMNode.NOTATION_NODE) { return gStringBundle.GetStringFromName(nodeType); } } | function nodeTypeToText (nodeType){ switch (nodeType) { case Node.ELEMENT_NODE: return "Element"; case Node.ATTRIBUTE_NODE: return "Attribute"; case Node.TEXT_NODE: return "Text"; case Node.CDATA_SECTION_NODE: return "CDATA Section"; case Node.ENTITY_REFERENCE_NODE: return "Entity Reference"; case Node.ENTITY_NODE: return "Entity"; case Node.PROCESSING_INSTRUCTION_NODE: return "Processing Instruction"; case Node.COMMENT_NODE: return "Comment"; case Node.DOCUMENT_NODE: return "Document"; case Node.DOCUMENT_TYPE_NODE: return "Document Type"; case Node.DOCUMENT_FRAGMENT_NODE: return "Document Fragment"; case Node.NOTATION_NODE: return "Notation"; } return nodeType;} |
|
#ifndef MOZ_PLACES | #ifndef MOZ_PLACES_BOOKMARKS | function nonBrowserWindowDelayedStartup(){ // loads the services#ifndef MOZ_PLACES initServices(); initBMService();#else var menu = document.getElementById("bookmarksMenuPopup"); menu._init(); window.controllers.appendController(PlacesController);#endif // init global pref service gPrefService = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); // Set up Sanitize Item gSanitizeListener = new SanitizeListener();} |
#else var menu = document.getElementById("bookmarksMenuPopup"); menu._init(); window.controllers.appendController(PlacesController); | function nonBrowserWindowDelayedStartup(){ // loads the services#ifndef MOZ_PLACES initServices(); initBMService();#endif // init global pref service gPrefService = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); // Set up Sanitize Item gSanitizeListener = new SanitizeListener();} |
|
#else var menu = document.getElementById("bookmarksMenuPopup"); menu._init(); window.controllers.appendController(PlacesController); | function nonBrowserWindowDelayedStartup(){ // loads the services#ifndef MOZ_PLACES_BOOKMARKS initServices(); initBMService();#else var menu = document.getElementById("bookmarksMenuPopup"); menu._init(); window.controllers.appendController(PlacesController);#endif // init global pref service gPrefService = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); // Set up Sanitize Item gSanitizeListener = new SanitizeListener();} |
|
jQuery.grep(this,function(a){ return a != t; }), arguments ); | jQuery.grep(this,function(a){ return a != t; }) ); | not: function(t) { return this.pushStack( typeof t == "string" ? jQuery.filter(t,this,false).r : jQuery.grep(this,function(a){ return a != t; }), arguments ); }, |
if (client.currentObject != source) | if ("currentObject" in client && client.currentObject != source) | function notifyActivity (source){ if (typeof source != "object") source = client.viewsArray[source].source; var tb = getTabForObject (source, true); var vk = Number(tb.getAttribute("viewKey")); if (client.currentObject != source) { if (tb.getAttribute ("state") == "normal") { tb.setAttribute ("state", "activity"); if (!client.activityList[vk]) { client.activityList[vk] = "+"; updateTitle(); } } else if (tb.getAttribute("state") == "activity") /* if act light is already lit, blink it real quick */ { tb.setAttribute ("state", "normal"); setTimeout ("notifyActivity(" + vk + ");", 200); } } } |
if (!client.activityList[vk]) | if (!(vk in client.activityList)) | function notifyActivity (source){ if (typeof source != "object") source = client.viewsArray[source].source; var tb = getTabForObject (source, true); var vk = Number(tb.getAttribute("viewKey")); if (client.currentObject != source) { if (tb.getAttribute ("state") == "normal") { tb.setAttribute ("state", "activity"); if (!client.activityList[vk]) { client.activityList[vk] = "+"; updateTitle(); } } else if (tb.getAttribute("state") == "activity") /* if act light is already lit, blink it real quick */ { tb.setAttribute ("state", "normal"); setTimeout ("notifyActivity(" + vk + ");", 200); } } } |
var tb = getTBForObject (source, true); var vk = Number(tb.getAttribute("viewKey")); | function notifyAttention (source){ if (typeof source != "object") source = client.viewsArray[source].source; var tb = getTBForObject (source, true); var vk = Number(tb.getAttribute("viewKey")); if (client.currentObject != source) { tb.setAttribute ("state", "attention"); client.activityList[vk] = "!"; updateTitle(); } if (client.FLASH_WINDOW) window.GetAttention(); } |
|
var tb = getTBForObject (source, true); var vk = Number(tb.getAttribute("viewKey")); | function notifyAttention (source){ if (typeof source != "object") source = client.viewsArray[source].source; var tb = getTBForObject (source, true); var vk = Number(tb.getAttribute("viewKey")); if (client.currentObject != source) { tb.setAttribute ("state", "attention"); client.activityList[vk] = "!"; updateTitle(); } if (client.FLASH_WINDOW) window.GetAttention(); } |
|
CompFields2Recipients(msgCompose.compFields); if (document.getElementById("msgRecipient#1").value == "") { dump("set focus on the recipient\n"); document.getElementById("msgRecipient#1").focus(); } else { dump("set focus on the body\n"); contentWindow.focus(); } SetComposeWindowTitle(13); | documentLoaded = true; | NotifyDocumentCreated: function() { CompFields2Recipients(msgCompose.compFields); if (document.getElementById("msgRecipient#1").value == "") { dump("set focus on the recipient\n"); document.getElementById("msgRecipient#1").focus(); } else { dump("set focus on the body\n"); contentWindow.focus(); } SetComposeWindowTitle(13); } |
content.focus(); | window.content.focus(); | NotifyDocumentCreated: function() { // Call EditorSetDefaultPrefs first so it gets the default author before initing toolbars EditorSetDefaultPrefs(); EditorInitToolbars(); // udpate menu items now that we have an editor to play with //dump("Updating 'create' commands\n"); content.focus(); window.updateCommands("create"); }, |
window._content.focus(); | gContentWindow = window._content; gContentWindow.focus(); | NotifyDocumentCreated: function() { // Call EditorSetDefaultPrefsAndDoctype first so it gets the default author before initing toolbars EditorSetDefaultPrefsAndDoctype(); EditorInitToolbars(); BuildRecentMenu(true); // Build the recent files menu and save to prefs window._content.focus(); // udpate menu items now that we have an editor to play with // Note: This must be AFTER window._content.focus(); window.updateCommands("create"); if (!("InsertCharWindow" in window)) window.InsertCharWindow = null; }, |
window.content.focus(); | window._content.focus(); | NotifyDocumentCreated: function() { // Call EditorSetDefaultPrefs first so it gets the default author before initing toolbars EditorSetDefaultPrefs(); EditorInitToolbars(); // udpate menu items now that we have an editor to play with dump("Updating 'create' commands\n"); window.content.focus(); window.updateCommands("create"); }, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.