rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
client.currentObject.display ("Network ``" + e.network.name + "'' is not connected.", "ERROR");
client.currentObject.display (getMsg("cli_inamesMsg2", e.network.name), "ERROR");
function cli_inames (e){ var chan; if (!e.network) { client.currentObject.display ("/names cannot be used from this " + "view.", "ERROR"); return false; } if (e.inputData) { if (!e.network.isConnected()) { client.currentObject.display ("Network ``" + e.network.name + "'' is not connected.", "ERROR"); return false; } chan = e.inputData; } else { if (client.currentObject.TYPE != "IRCChannel") { client.currentObject.display ("You must supply a channel name to " + "use /names from this view.", "ERROR"); return false; } chan = e.channel.name; } client.currentObject.pendingNamesReply = true; e.server.sendData ("NAMES " + chan + "\n"); return true; }
client.currentObject.display ("You must supply a channel name to " + "use /names from this view.", "ERROR");
client.currentObject.display (getMsg("cli_inamesMsg3"),"ERROR");
function cli_inames (e){ var chan; if (!e.network) { client.currentObject.display ("/names cannot be used from this " + "view.", "ERROR"); return false; } if (e.inputData) { if (!e.network.isConnected()) { client.currentObject.display ("Network ``" + e.network.name + "'' is not connected.", "ERROR"); return false; } chan = e.inputData; } else { if (client.currentObject.TYPE != "IRCChannel") { client.currentObject.display ("You must supply a channel name to " + "use /names from this view.", "ERROR"); return false; } chan = e.channel.name; } client.currentObject.pendingNamesReply = true; e.server.sendData ("NAMES " + chan + "\n"); return true; }
client.currentObject.display ("Unknown network ``" + e.inputData + "''",
client.currentObject.display (getMsg("cli_inetworkMsg",e.inputData),
function cli_inetwork (e){ if (!e.inputData) return false; var net = client.networks[e.inputData]; if (net) { client.lastNetwork = net; setCurrentObject (net); } else { client.currentObject.display ("Unknown network ``" + e.inputData + "''", "ERROR"); return false; } return true; }
client.currentObject.display ("/notify cannot be used from this view.", "ERROR");
client.currentObject.display (getMsg("cli_inotifyMsg"), "ERROR");
function cli_inotify (e){ if (!e.network) { client.currentObject.display ("/notify cannot be used from this view.", "ERROR"); return false; } var net = e.network; if (!e.inputData) { if (net.notifyList && net.notifyList.length > 0) { /* delete the lists and force a ISON check, this will * print the current online/offline status when the server * responds */ delete net.onList; delete net.offList; onNotifyTimeout(); } else client.currentObject.display ("Your notify list is empty", "INFO"); } else { var adds = new Array(); var subs = new Array(); if (!net.notifyList) net.notifyList = new Array(); var ary = e.inputData.toLowerCase().split(/\s+/); for (var i in ary) { var idx = arrayIndexOf (net.notifyList, ary[i]); if (idx == -1) { net.notifyList.push (ary[i]); adds.push(ary[i]); } else { arrayRemoveAt (net.notifyList, idx); subs.push(ary[i]); } } if (adds.length > 0) client.currentObject.display (arraySpeak(adds, "has", "have") + " been added to your notify list."); if (subs.length > 0) client.currentObject.display (arraySpeak(subs, "has", "have") + " been removed from your notify list."); delete net.onList; delete net.offList; onNotifyTimeout(); } return true; }
client.currentObject.display ("Your notify list is empty", "INFO");
client.currentObject.display (getMsg("cli_inotifyMsg2"), "INFO");
function cli_inotify (e){ if (!e.network) { client.currentObject.display ("/notify cannot be used from this view.", "ERROR"); return false; } var net = e.network; if (!e.inputData) { if (net.notifyList && net.notifyList.length > 0) { /* delete the lists and force a ISON check, this will * print the current online/offline status when the server * responds */ delete net.onList; delete net.offList; onNotifyTimeout(); } else client.currentObject.display ("Your notify list is empty", "INFO"); } else { var adds = new Array(); var subs = new Array(); if (!net.notifyList) net.notifyList = new Array(); var ary = e.inputData.toLowerCase().split(/\s+/); for (var i in ary) { var idx = arrayIndexOf (net.notifyList, ary[i]); if (idx == -1) { net.notifyList.push (ary[i]); adds.push(ary[i]); } else { arrayRemoveAt (net.notifyList, idx); subs.push(ary[i]); } } if (adds.length > 0) client.currentObject.display (arraySpeak(adds, "has", "have") + " been added to your notify list."); if (subs.length > 0) client.currentObject.display (arraySpeak(subs, "has", "have") + " been removed from your notify list."); delete net.onList; delete net.offList; onNotifyTimeout(); } return true; }
client.currentObject.display (arraySpeak(adds, "has", "have") + " been added to your notify list.");
{ msgname = (adds.length == 1) ? "cli_inotifyMsg3a" : "cli_inotifyMsg3b"; client.currentObject.display (getMsg(msgname, arraySpeak(adds))); }
function cli_inotify (e){ if (!e.network) { client.currentObject.display ("/notify cannot be used from this view.", "ERROR"); return false; } var net = e.network; if (!e.inputData) { if (net.notifyList && net.notifyList.length > 0) { /* delete the lists and force a ISON check, this will * print the current online/offline status when the server * responds */ delete net.onList; delete net.offList; onNotifyTimeout(); } else client.currentObject.display ("Your notify list is empty", "INFO"); } else { var adds = new Array(); var subs = new Array(); if (!net.notifyList) net.notifyList = new Array(); var ary = e.inputData.toLowerCase().split(/\s+/); for (var i in ary) { var idx = arrayIndexOf (net.notifyList, ary[i]); if (idx == -1) { net.notifyList.push (ary[i]); adds.push(ary[i]); } else { arrayRemoveAt (net.notifyList, idx); subs.push(ary[i]); } } if (adds.length > 0) client.currentObject.display (arraySpeak(adds, "has", "have") + " been added to your notify list."); if (subs.length > 0) client.currentObject.display (arraySpeak(subs, "has", "have") + " been removed from your notify list."); delete net.onList; delete net.offList; onNotifyTimeout(); } return true; }
client.currentObject.display (arraySpeak(subs, "has", "have") + " been removed from your notify list.");
{ msgname = (subs.length == 1) ? "cli_inotifyMsg4a" : "cli_inotifyMsg4b"; client.currentObject.display (getMsg(msgname, arraySpeak(subs))); }
function cli_inotify (e){ if (!e.network) { client.currentObject.display ("/notify cannot be used from this view.", "ERROR"); return false; } var net = e.network; if (!e.inputData) { if (net.notifyList && net.notifyList.length > 0) { /* delete the lists and force a ISON check, this will * print the current online/offline status when the server * responds */ delete net.onList; delete net.offList; onNotifyTimeout(); } else client.currentObject.display ("Your notify list is empty", "INFO"); } else { var adds = new Array(); var subs = new Array(); if (!net.notifyList) net.notifyList = new Array(); var ary = e.inputData.toLowerCase().split(/\s+/); for (var i in ary) { var idx = arrayIndexOf (net.notifyList, ary[i]); if (idx == -1) { net.notifyList.push (ary[i]); adds.push(ary[i]); } else { arrayRemoveAt (net.notifyList, idx); subs.push(ary[i]); } } if (adds.length > 0) client.currentObject.display (arraySpeak(adds, "has", "have") + " been added to your notify list."); if (subs.length > 0) client.currentObject.display (arraySpeak(subs, "has", "have") + " been removed from your notify list."); delete net.onList; delete net.offList; onNotifyTimeout(); } return true; }
client.currentObject.display ("You must be connected to a network " + "to use op.", "ERROR");
client.currentObject.display (getMsg("cli_iopMsg"), "ERROR");
function cli_iop (e) { if (!e.channel) { client.currentObject.display ("You must be connected to a network " + "to use op.", "ERROR"); return false; } if (!e.inputData) { /* Since no param is passed, check for selection */ var nicksAry = e.channel.getSelectedUsers(); /* If a valid array of user objects, then call the mapObjFunc */ if (nicksAry) { /* See test3-utils.js: this simply applies the setOp function to every item in nicksAry with the parameter of "true" each time */ mapObjFunc(nicksAry, "setOp", true); return true; } else { /* If no input and no selection, return false to display the usage */ return false; } } /* We do have inputData, so use that, rather than any other option */ var cuser = e.channel.getUser(e.inputData); if (!cuser) { client.currentObject.display ("User ``" + e.inputData + "'' not found.", "ERROR"); return false; } cuser.setOp(true); return true; }
client.currentObject.display ("User ``" + e.inputData + "'' not found.", "ERROR");
client.currentObject.display (getMsg("cli_iopMsg2",e.inputData),"ERROR");
function cli_iop (e) { if (!e.channel) { client.currentObject.display ("You must be connected to a network " + "to use op.", "ERROR"); return false; } if (!e.inputData) { /* Since no param is passed, check for selection */ var nicksAry = e.channel.getSelectedUsers(); /* If a valid array of user objects, then call the mapObjFunc */ if (nicksAry) { /* See test3-utils.js: this simply applies the setOp function to every item in nicksAry with the parameter of "true" each time */ mapObjFunc(nicksAry, "setOp", true); return true; } else { /* If no input and no selection, return false to display the usage */ return false; } } /* We do have inputData, so use that, rather than any other option */ var cuser = e.channel.getUser(e.inputData); if (!cuser) { client.currentObject.display ("User ``" + e.inputData + "'' not found.", "ERROR"); return false; } cuser.setOp(true); return true; }
client.currentObject.display ("Leave can only be used from channels.", "ERROR");
client.currentObject.display (getMsg("cli_ipartMsg"), "ERROR");
function cli_ipart (e){ if (!e.channel) { client.currentObject.display ("Leave can only be used from channels.", "ERROR"); return false; } e.channel.part(); return true; }
tab.say (ary[2]);
tab.say (fromUnicode(ary[2]));
function cli_iquery (e){ if (!e.server.users) { client.currentObject.display (getMsg("cli_imsgMsg"), "ERROR"); return false; } var ary = e.inputData.match (/(\S+)\s*(.*)?/); if (ary == null) { client.currentObject.display (getMsg("cli_imsgMsg2"), "ERROR"); return false; } var tab = openQueryTab (e.server, ary[1]); setCurrentObject (tab); if (ary[2]) { var msg = filterOutput(ary[2], "PRIVMSG", "ME!"); tab.display (msg, "PRIVMSG", "ME!", tab); tab.say (ary[2]); } e.user = tab; return true;}
e.server.sendData (e.inputData + "\n");
e.server.sendData (fromUnicode(e.inputData) + "\n");
function cli_iquote (e){ if (!e.network || !e.network.isConnected()) { client.currentObject.display (getMsg("cli_iquoteMsg"), "ERROR"); return false; } e.server.sendData (e.inputData + "\n"); return true; }
client.currentObject.display ("You must be connected to a network " + "to use quote.", "ERROR");
client.currentObject.display (getMsg("cli_iquoteMsg"), "ERROR");
function cli_iquote (e){ if (!e.network || !e.network.isConnected()) { client.currentObject.display ("You must be connected to a network " + "to use quote.", "ERROR"); return false; } e.server.sendData (e.inputData + "\n"); return true; }
client.currentObject.display ("``" + e.command + "'' cannot be used from this view.", "WARNING");
client.currentObject.display (getMsg("onInputSimpleCommandMsg", e.command),"WARNING");
function cli_iscommand (e){ var o = getObjectDetails(client.currentObject); if (o.server) { o.server.sendData (e.command + " " + e.inputData + "\n"); return true; } else { client.currentObject.display ("``" + e.command + "'' cannot be used from this view.", "WARNING"); return false; }}
client.currentObject.display ("Already connected to " + ary[1],
client.currentObject.display (getMsg("cli_iserverMsg",ary[1]),
function cli_iserver (e){ if (!e.inputData) return false; var ary = e.inputData.match(/^([^\s\:]+)[\s\:]?(\d+)? ?(\S+)?/); var pass = (ary[2]) ? ary[2] : ""; if (ary == null) return false; if (!ary[2]) ary[2] = 6667; var net = null; for (var n in client.networks) if (n == ary[1]) if (client.networks[n].isConnected()) { client.currentObject.display ("Already connected to " + ary[1], "ERROR"); return false; } else { net = client.networks[n]; break; } if (!net) client.networks[ary[1]] = new CIRCNetwork (ary[1], [{name: ary[1], port: ary[2]}], client.eventPump); else net.serverList = [{name: ary[1], port: ary[2]}]; client.onInputAttach ({inputData: ary[1] + " " + pass}); return true;}
if ( client.stalkingVictims.length == 0 ) { client.currentObject.display( "No stalking victims.", "STALK" ); } else { client.currentObject.display( "Currently stalking [" + client.stalkingVictims.join(", ") + "]", "STALK");
if (client.stalkingVictims.length == 0) { client.currentObject.display(getMsg("cli_istalkMsg"), "STALK"); } else { client.currentObject.display (getMsg("cli_istalkMsg2", client.stalkingVictims.join(", ")), "STALK");
function cli_istalk (e){ if (!e.inputData) { if ( client.stalkingVictims.length == 0 ) { client.currentObject.display( "No stalking victims.", "STALK" ); } else { client.currentObject.display( "Currently stalking [" + client.stalkingVictims.join(", ") + "]", "STALK"); } return true; } client.stalkingVictims[client.stalkingVictims.length] = e.inputData; client.currentObject.display( "Now stalking " + e.inputData, "STALK"); return true;}
client.currentObject.display( "Now stalking " + e.inputData, "STALK" );
client.currentObject.display(getMsg("cli_istalkMsg3",e.inputData), "STALK");
function cli_istalk (e){ if (!e.inputData) { if ( client.stalkingVictims.length == 0 ) { client.currentObject.display( "No stalking victims.", "STALK" ); } else { client.currentObject.display( "Currently stalking [" + client.stalkingVictims.join(", ") + "]", "STALK"); } return true; } client.stalkingVictims[client.stalkingVictims.length] = e.inputData; client.currentObject.display( "Now stalking " + e.inputData, "STALK"); return true;}
if (!e.channel.setTopic(e.inputData))
if (!e.channel.setTopic(fromUnicode(e.inputData)))
function cli_itopic (e){ if (!e.channel) { client.currentObject.display (getMsg("cli_itopicMsg"), "ERROR"); return false; } if (!e.inputData) { e.server.sendData ("TOPIC " + e.channel.name + "\n"); } else { if (!e.channel.setTopic(e.inputData)) client.currentObject.display (getMsg("cli_itopicMsg2"), "ERROR"); } return true; }
if (!e.channel.setTopic(fromUnicode(e.inputData)))
if (!e.channel.setTopic(fromUnicode(e.inputData, e.channel.charset)))
function cli_itopic (e){ if (!e.channel) { client.currentObject.display (getMsg("cli_itopicMsg"), "ERROR"); return false; } if (!e.inputData) { e.server.sendData ("TOPIC " + e.channel.name + "\n"); } else { if (!e.channel.setTopic(fromUnicode(e.inputData))) client.currentObject.display (getMsg("cli_itopicMsg2"), "ERROR"); } return true; }
client.currentObject.display ("Topic can only be used from channels.", "ERROR");
client.currentObject.display (getMsg("cli_itopicMsg"), "ERROR");
function cli_itopic (e){ if (!e.channel) { client.currentObject.display ("Topic can only be used from channels.", "ERROR"); return false; } if (!e.inputData) { e.server.sendData ("TOPIC " + e.channel.name + "\n"); } else { if (!e.channel.setTopic(e.inputData)) client.currentObject.display ("Could not set topic.", "ERROR"); } return true; }
client.currentObject.display ("Could not set topic.", "ERROR");
client.currentObject.display (getMsg("cli_itopicMsg2"), "ERROR");
function cli_itopic (e){ if (!e.channel) { client.currentObject.display ("Topic can only be used from channels.", "ERROR"); return false; } if (!e.inputData) { e.server.sendData ("TOPIC " + e.channel.name + "\n"); } else { if (!e.channel.setTopic(e.inputData)) client.currentObject.display ("Could not set topic.", "ERROR"); } return true; }
for ( i in client.stalkingVictims ) { if ( client.stalkingVictims[i].match( "^" + e.inputData +"$", "i" ) ) { client.stalkingVictims.splice(i,1); client.currentObject.display( "No longer stalking " + e.inputData, "UNSTALK" );
for (i in client.stalkingVictims) { if (client.stalkingVictims[i].match("^" + e.inputData +"$", "i")) { client.stalkingVictims.splice(i, 1); client.currentObject.display(getMsg("cli_iunstalkMsg", e.inputData), "UNSTALK");
function cli_iunstalk ( e ){ if ( !e.inputData ) return false; for ( i in client.stalkingVictims ) { if ( client.stalkingVictims[i].match( "^" + e.inputData +"$", "i" ) ) { client.stalkingVictims.splice(i,1); client.currentObject.display( "No longer stalking " + e.inputData, "UNSTALK" ); return true; } } client.currentObject.display( "Not stalking " + e.inputData, "UNSTALK" ); return true;}
client.currentObject.display( "Not stalking " + e.inputData, "UNSTALK" );
client.currentObject.display(getMsg("cli_iunstalkMsg2", e.inputData), "UNSTALK");
function cli_iunstalk ( e ){ if ( !e.inputData ) return false; for ( i in client.stalkingVictims ) { if ( client.stalkingVictims[i].match( "^" + e.inputData +"$", "i" ) ) { client.stalkingVictims.splice(i,1); client.currentObject.display( "No longer stalking " + e.inputData, "UNSTALK" ); return true; } } client.currentObject.display( "Not stalking " + e.inputData, "UNSTALK" ); return true;}
client.currentObject.display ("You must be on a channel " + "to use voice.", "ERROR");
client.currentObject.display (getMsg("cli_ivoiceMsg"), "ERROR");
function cli_ivoice (e) { if (!e.channel) { client.currentObject.display ("You must be on a channel " + "to use voice.", "ERROR"); return false; } if (!e.inputData) { var nicksAry = e.channel.getSelectedUsers(); if (nicksAry) { mapObjFunc(nicksAry, "setVoice", true); return true; } else { return false; } } var cuser = e.channel.getUser(e.inputData); if (!cuser) { client.currentObject.display ("User ``" + e.inputData + "'' not found.", "ERROR"); return false; } cuser.setVoice(true); return true;}
client.currentObject.display ("User ``" + e.inputData + "'' not found.",
client.currentObject.display (getMsg("cli_ivoiceMsg2",e.inputData),
function cli_ivoice (e) { if (!e.channel) { client.currentObject.display ("You must be on a channel " + "to use voice.", "ERROR"); return false; } if (!e.inputData) { var nicksAry = e.channel.getSelectedUsers(); if (nicksAry) { mapObjFunc(nicksAry, "setVoice", true); return true; } else { return false; } } var cuser = e.channel.getUser(e.inputData); if (!cuser) { client.currentObject.display ("User ``" + e.inputData + "'' not found.", "ERROR"); return false; } cuser.setVoice(true); return true;}
client.currentObject.display ("**WARNING** Zoom is busted at this time :(", "WARNING");
client.currentObject.display (getMsg("cli_izoomMsg"), "WARNING");
function cli_izoom (e){ client.currentObject.display ("**WARNING** Zoom is busted at this time :(", "WARNING"); if (!e.inputData) return false; if (!e.channel) { client.currentObject.display ("Zoom can only be used from channels.", "ERROR"); return false; } var cuser = e.channel.getUser(e.inputData); if (!cuser) { client.currentObject.display ("User ``" + e.inputData + "'' not found.", "ERROR"); return false; } setCurrentObject(cuser); return true; }
client.currentObject.display ("Zoom can only be used from channels.", "ERROR");
client.currentObject.display (getMsg("cli_izoomMsg2"), "ERROR");
function cli_izoom (e){ client.currentObject.display ("**WARNING** Zoom is busted at this time :(", "WARNING"); if (!e.inputData) return false; if (!e.channel) { client.currentObject.display ("Zoom can only be used from channels.", "ERROR"); return false; } var cuser = e.channel.getUser(e.inputData); if (!cuser) { client.currentObject.display ("User ``" + e.inputData + "'' not found.", "ERROR"); return false; } setCurrentObject(cuser); return true; }
client.currentObject.display ("User ``" + e.inputData + "'' not found.",
client.currentObject.display (getMsg("cli_izoomMsg3",e.inputData),
function cli_izoom (e){ client.currentObject.display ("**WARNING** Zoom is busted at this time :(", "WARNING"); if (!e.inputData) return false; if (!e.channel) { client.currentObject.display ("Zoom can only be used from channels.", "ERROR"); return false; } var cuser = e.channel.getUser(e.inputData); if (!cuser) { client.currentObject.display ("User ``" + e.inputData + "'' not found.", "ERROR"); return false; } setCurrentObject(cuser); return true; }
var msg = "Error loading subscript: " + ex;
var msg = getMsg("cli_loadMsg",ex);
function cli_load(url, obj){ if (!client._loader) { const LOADER_CTRID = "@mozilla.org/moz/jssubscript-loader;1"; const mozIJSSubScriptLoader = Components.interfaces.mozIJSSubScriptLoader; var cls; if ((cls = Components.classes[LOADER_CTRID])) client._loader = cls.createInstance (mozIJSSubScriptLoader); } try { client._loader.loadSubScript (url, obj); } catch (ex) { var msg = "Error loading subscript: " + ex; if (ex.fileName) msg += " file:" + ex.fileName; if (ex.lineNumber) msg += " line:" + ex.lineNumber; client.currentObject.display (msg, "ERROR"); }}
msg += " file:" + ex.fileName;
msg += getMsg("cli_loadMsg2",ex.fileName);
function cli_load(url, obj){ if (!client._loader) { const LOADER_CTRID = "@mozilla.org/moz/jssubscript-loader;1"; const mozIJSSubScriptLoader = Components.interfaces.mozIJSSubScriptLoader; var cls; if ((cls = Components.classes[LOADER_CTRID])) client._loader = cls.createInstance (mozIJSSubScriptLoader); } try { client._loader.loadSubScript (url, obj); } catch (ex) { var msg = "Error loading subscript: " + ex; if (ex.fileName) msg += " file:" + ex.fileName; if (ex.lineNumber) msg += " line:" + ex.lineNumber; client.currentObject.display (msg, "ERROR"); }}
msg += " line:" + ex.lineNumber;
msg += getMsg("cli_loadMsg3",ex.lineNumber);
function cli_load(url, obj){ if (!client._loader) { const LOADER_CTRID = "@mozilla.org/moz/jssubscript-loader;1"; const mozIJSSubScriptLoader = Components.interfaces.mozIJSSubScriptLoader; var cls; if ((cls = Components.classes[LOADER_CTRID])) client._loader = cls.createInstance (mozIJSSubScriptLoader); } try { client._loader.loadSubScript (url, obj); } catch (ex) { var msg = "Error loading subscript: " + ex; if (ex.fileName) msg += " file:" + ex.fileName; if (ex.lineNumber) msg += " line:" + ex.lineNumber; client.currentObject.display (msg, "ERROR"); }}
client.currentObject.display ("Quit can only be used in the context " + "of a network, perhaps you meant /exit?", "ERROR");
client.currentObject.display (getMsg("cli_quitMsg"), "ERROR");
function cli_quit (e){ if (!e.server) { client.currentObject.display ("Quit can only be used in the context " + "of a network, perhaps you meant /exit?", "ERROR"); return false; } if (!e.server.connection.isConnected) { client.currentObject.display ("Not connected", "ERROR"); return false; } e.server.logout (e.inputData); return true; }
client.currentObject.display ("Not connected", "ERROR");
client.currentObject.display (getMsg("cli_quitMsg2"), "ERROR");
function cli_quit (e){ if (!e.server) { client.currentObject.display ("Quit can only be used in the context " + "of a network, perhaps you meant /exit?", "ERROR"); return false; } if (!e.server.connection.isConnected) { client.currentObject.display ("Not connected", "ERROR"); return false; } e.server.logout (e.inputData); return true; }
msg = filterOutput(msg, "PRIVMSG", client.currentObject); display(msg, "PRIVMSG", "ME!", client.currentObject); client.currentObject.say(msg);
client.currentObject.dispatch("say " + msg);
function cli_say(msg){ if ("say" in client.currentObject) { msg = filterOutput(msg, "PRIVMSG", client.currentObject); display(msg, "PRIVMSG", "ME!", client.currentObject); client.currentObject.say(msg); return; } switch (client.currentObject.TYPE) { case "IRCClient": dispatch("eval", {expression: msg}); break; default: if (msg != "") display(MSG_ERR_NO_DEFAULT, MT_ERROR); break; }}
client.currentObject.say (msg);
client.currentObject.say (fromUnicode(msg));
function cli_say(msg){ switch (client.currentObject.TYPE) { case "IRCChannel": case "IRCUser": case "IRCChanUser": msg = filterOutput (msg, "PRIVMSG"); client.currentObject.display (msg, "PRIVMSG", "ME!", client.currentObject); client.currentObject.say (msg); break; case "IRCClient": client.onInputEval ({inputData: msg}); break; default: if (msg != "") client.currentObject.display (getMsg("cli_sayMsg", client.currentObject.TYPE), "ERROR"); break; }}
case "IRCChannel": case "IRCUser": case "IRCChanUser": msg = filterOutput (msg, "PRIVMSG"); display(msg, "PRIVMSG", "ME!", client.currentObject); client.currentObject.say(msg); break;
function cli_say(msg){ switch (client.currentObject.TYPE) { case "IRCChannel": case "IRCUser": case "IRCChanUser": msg = filterOutput (msg, "PRIVMSG"); display(msg, "PRIVMSG", "ME!", client.currentObject); client.currentObject.say(msg); break; case "IRCClient": dispatch("eval", {expression: msg}); break; default: if (msg != "") { display(getMsg(MSG_ERR_NO_DEFAULT, client.currentObject.TYPE), MT_ERROR); } break; }}
client.currentObject.say (fromUnicode(msg));
if (client.currentObject.TYPE == "IRCChannel") { var charset = client.currentObject.charset; client.currentObject.say (fromUnicode(msg, charset)); } else { client.currentObject.say (fromUnicode(msg)); }
function cli_say(msg){ switch (client.currentObject.TYPE) { case "IRCChannel": case "IRCUser": case "IRCChanUser": msg = filterOutput (msg, "PRIVMSG"); client.currentObject.display (msg, "PRIVMSG", "ME!", client.currentObject); client.currentObject.say (fromUnicode(msg)); break; case "IRCClient": client.onInputEval ({inputData: msg}); break; default: if (msg != "") client.currentObject.display (getMsg("cli_sayMsg", client.currentObject.TYPE), "ERROR"); break; }}
("No default action for objects of type ``" + client.currentObject.TYPE + "''", "ERROR");
(getMsg("cli_sayMsg", client.currentObject.TYPE), "ERROR");
function cli_say(msg){ switch (client.currentObject.TYPE) { case "IRCChannel": case "IRCUser": case "IRCChanUser": msg = filterOutput (msg, "PRIVMSG"); client.currentObject.display (msg, "PRIVMSG", "ME!", client.currentObject); client.currentObject.say (msg); break; case "IRCClient": client.onInputEval ({inputData: msg}); break; default: if (msg != "") client.currentObject.display ("No default action for objects of type ``" + client.currentObject.TYPE + "''", "ERROR"); break; }}
client.currentObject.display ("You must be connected to a network " + "to use whois", "ERROR");
client.currentObject.display (getMsg("cli_whoisMsg"), "ERROR");
function cli_whois (e) { if (!e.network || !e.network.isConnected()) { client.currentObject.display ("You must be connected to a network " + "to use whois", "ERROR"); return false; } if (!e.inputData) { var nicksAry = e.channel.getSelectedUsers(); if (nicksAry) { mapObjFunc(nicksAry, "whois", null); return true; } else { return false; } } // Otherwise, there is no guarantee that the username // is currently a user var nick = e.inputData.match( /\S+/ ); e.server.whois (nick); return true;}
if (aEvent.target.getAttribute("anonid") != "button")
if (aEvent.button != 0 || aEvent.target.getAttribute("anonid") != "button")
function ClickAndHoldMouseDown(aEvent){ if (aEvent.target.getAttribute("anonid") != "button") return; var button = aEvent.target.parentNode.parentNode; if (!button.disabled) gClickAndHoldTimer = setTimeout(ClickAndHoldMouseDownCallback, 500, button);}
var button = aEvent.target.parentNode.parentNode;
var button = aEvent.target._menubuttonParent;
function ClickAndHoldMouseDown(aEvent){ if (aEvent.target.getAttribute("anonid") != "button") return; var button = aEvent.target.parentNode.parentNode; if (!button.disabled) gClickAndHoldTimer = setTimeout(ClickAndHoldMouseDownCallback, 500, button);}
top.OpenBookmarkURL(target, document.getElementById('bookmarksTree').database);
OpenBookmarkURL(target, document.getElementById('bookmarksTree').database);
function clicked(event, target) { if (target.getAttribute('container') == 'true') { if (target.getAttribute('open') == 'true') { target.removeAttribute('open'); } else { target.setAttribute('open','true'); } return(true); } else { if (event.clickCount == 2 && event.button == 1) { top.OpenBookmarkURL(target, document.getElementById('bookmarksTree').database); return(true); } } return(false);}
var targetclass = event.target.getAttribute('class');
var t = event.originalTarget;
function ClickOnOtherPanels(event){ debug("ClickOnOtherPanels(...)"); var targetclass = event.target.getAttribute('class'); var treeitem = null; var force_open = true; if (targetclass == 'tree-cell-twisty') { // The twisty is nested three below the treeitem: // <treeitem> // <treerow> // <treecell> // <titledbutton class="tree-cell-twisty"> <!-- anonymous --> treeitem = event.target.parentNode.parentNode.parentNode; force_open = false; } else { if (event.target.localName != "treecell" && event.target.localName != "treeitem") return; treeitem = event.target; while (treeitem && treeitem.nodeName != 'treeitem') { treeitem = treeitem.parentNode; } } // Remove the selection in the "current" panels list var current_panels = document.getElementById('current-panels'); current_panels.clearItemSelection(); enable_buttons_for_current_panels(); if (treeitem.getAttribute('container') == 'true') { if (treeitem.getAttribute('open') == 'true') { if (force_open) { debug("close the container"); treeitem.removeAttribute('open'); } } else { if (force_open) { debug("open the container"); treeitem.setAttribute('open','true'); } link = treeitem.getAttribute('link'); loaded_link = treeitem.getAttribute('loaded_link'); if (link != '' && !loaded_link) { debug("Has remote datasource: "+link); add_datasource_to_other_panels(link); treeitem.setAttribute('loaded_link', 'true'); } else { setTimeout('fixup_children("'+ treeitem.getAttribute('id') +'")', 100); } } }}
if (targetclass == 'tree-cell-twisty') {
if (t.getAttribute('twisty') == 'true') {
function ClickOnOtherPanels(event){ debug("ClickOnOtherPanels(...)"); var targetclass = event.target.getAttribute('class'); var treeitem = null; var force_open = true; if (targetclass == 'tree-cell-twisty') { // The twisty is nested three below the treeitem: // <treeitem> // <treerow> // <treecell> // <titledbutton class="tree-cell-twisty"> <!-- anonymous --> treeitem = event.target.parentNode.parentNode.parentNode; force_open = false; } else { if (event.target.localName != "treecell" && event.target.localName != "treeitem") return; treeitem = event.target; while (treeitem && treeitem.nodeName != 'treeitem') { treeitem = treeitem.parentNode; } } // Remove the selection in the "current" panels list var current_panels = document.getElementById('current-panels'); current_panels.clearItemSelection(); enable_buttons_for_current_panels(); if (treeitem.getAttribute('container') == 'true') { if (treeitem.getAttribute('open') == 'true') { if (force_open) { debug("close the container"); treeitem.removeAttribute('open'); } } else { if (force_open) { debug("open the container"); treeitem.setAttribute('open','true'); } link = treeitem.getAttribute('link'); loaded_link = treeitem.getAttribute('loaded_link'); if (link != '' && !loaded_link) { debug("Has remote datasource: "+link); add_datasource_to_other_panels(link); treeitem.setAttribute('loaded_link', 'true'); } else { setTimeout('fixup_children("'+ treeitem.getAttribute('id') +'")', 100); } } }}
treeitem = event.target.parentNode.parentNode.parentNode;
treeitem = t.parentNode.parentNode.parentNode;
function ClickOnOtherPanels(event){ debug("ClickOnOtherPanels(...)"); var targetclass = event.target.getAttribute('class'); var treeitem = null; var force_open = true; if (targetclass == 'tree-cell-twisty') { // The twisty is nested three below the treeitem: // <treeitem> // <treerow> // <treecell> // <titledbutton class="tree-cell-twisty"> <!-- anonymous --> treeitem = event.target.parentNode.parentNode.parentNode; force_open = false; } else { if (event.target.localName != "treecell" && event.target.localName != "treeitem") return; treeitem = event.target; while (treeitem && treeitem.nodeName != 'treeitem') { treeitem = treeitem.parentNode; } } // Remove the selection in the "current" panels list var current_panels = document.getElementById('current-panels'); current_panels.clearItemSelection(); enable_buttons_for_current_panels(); if (treeitem.getAttribute('container') == 'true') { if (treeitem.getAttribute('open') == 'true') { if (force_open) { debug("close the container"); treeitem.removeAttribute('open'); } } else { if (force_open) { debug("open the container"); treeitem.setAttribute('open','true'); } link = treeitem.getAttribute('link'); loaded_link = treeitem.getAttribute('loaded_link'); if (link != '' && !loaded_link) { debug("Has remote datasource: "+link); add_datasource_to_other_panels(link); treeitem.setAttribute('loaded_link', 'true'); } else { setTimeout('fixup_children("'+ treeitem.getAttribute('id') +'")', 100); } } }}
if (event.target.localName != "treecell" && event.target.localName != "treeitem")
if (t.localName != "treecell" && t.localName != "treeitem")
function ClickOnOtherPanels(event){ debug("ClickOnOtherPanels(...)"); var targetclass = event.target.getAttribute('class'); var treeitem = null; var force_open = true; if (targetclass == 'tree-cell-twisty') { // The twisty is nested three below the treeitem: // <treeitem> // <treerow> // <treecell> // <titledbutton class="tree-cell-twisty"> <!-- anonymous --> treeitem = event.target.parentNode.parentNode.parentNode; force_open = false; } else { if (event.target.localName != "treecell" && event.target.localName != "treeitem") return; treeitem = event.target; while (treeitem && treeitem.nodeName != 'treeitem') { treeitem = treeitem.parentNode; } } // Remove the selection in the "current" panels list var current_panels = document.getElementById('current-panels'); current_panels.clearItemSelection(); enable_buttons_for_current_panels(); if (treeitem.getAttribute('container') == 'true') { if (treeitem.getAttribute('open') == 'true') { if (force_open) { debug("close the container"); treeitem.removeAttribute('open'); } } else { if (force_open) { debug("open the container"); treeitem.setAttribute('open','true'); } link = treeitem.getAttribute('link'); loaded_link = treeitem.getAttribute('loaded_link'); if (link != '' && !loaded_link) { debug("Has remote datasource: "+link); add_datasource_to_other_panels(link); treeitem.setAttribute('loaded_link', 'true'); } else { setTimeout('fixup_children("'+ treeitem.getAttribute('id') +'")', 100); } } }}
treeitem = event.target;
treeitem = t;
function ClickOnOtherPanels(event){ debug("ClickOnOtherPanels(...)"); var targetclass = event.target.getAttribute('class'); var treeitem = null; var force_open = true; if (targetclass == 'tree-cell-twisty') { // The twisty is nested three below the treeitem: // <treeitem> // <treerow> // <treecell> // <titledbutton class="tree-cell-twisty"> <!-- anonymous --> treeitem = event.target.parentNode.parentNode.parentNode; force_open = false; } else { if (event.target.localName != "treecell" && event.target.localName != "treeitem") return; treeitem = event.target; while (treeitem && treeitem.nodeName != 'treeitem') { treeitem = treeitem.parentNode; } } // Remove the selection in the "current" panels list var current_panels = document.getElementById('current-panels'); current_panels.clearItemSelection(); enable_buttons_for_current_panels(); if (treeitem.getAttribute('container') == 'true') { if (treeitem.getAttribute('open') == 'true') { if (force_open) { debug("close the container"); treeitem.removeAttribute('open'); } } else { if (force_open) { debug("open the container"); treeitem.setAttribute('open','true'); } link = treeitem.getAttribute('link'); loaded_link = treeitem.getAttribute('loaded_link'); if (link != '' && !loaded_link) { debug("Has remote datasource: "+link); add_datasource_to_other_panels(link); treeitem.setAttribute('loaded_link', 'true'); } else { setTimeout('fixup_children("'+ treeitem.getAttribute('id') +'")', 100); } } }}
if (this.mIsOrganizer) { a.isOrganizer = true; }
clone: function() { var a = new calAttendee(); var allProps = ["id", "commonName", "rsvp", "role", "participationStatus", "userType"]; for (var i in allProps) a[allProps[i]] = this[allProps[i]]; // clone properties! return a; },
robj = new Object();
var robj = new Object();
function Clone (obj){ robj = new Object(); for (var p in obj) robj[p] = obj[p]; return robj; }
RDFC.AppendElement(curr);
if (RDFCU.IsContainer(BMDS, curr)) BookmarksUtils.cloneFolder(curr, newFolder); else RDFC.AppendElement(curr);
cloneFolder: function (aFolder, aParent, aRelativeItem) { var BMDS = this.RDF.GetDataSource("rdf:bookmarks"); var nameArc = this.RDF.GetResource(NC_NS + "Name"); var rName = BMDS.GetTarget(aFolder, nameArc, true); rName = rName.QueryInterface(Components.interfaces.nsIRDFLiteral); var newFolder = this.createFolderWithID(rName.Value, aRelativeItem, aParent); // Now need to append kiddies. try { const kRDFCContractID = "@mozilla.org/rdf/container;1"; const kRDFCIID = Components.interfaces.nsIRDFContainer; var RDFC = Components.classes[kRDFCContractID].getService(kRDFCIID); RDFC.Init(BMDS, aFolder); var elts = RDFC.GetElements(); RDFC.Init(BMDS, newFolder); while (elts.hasMoreElements()) { var curr = elts.getNext().QueryInterface(Components.interfaces.nsIRDFResource); RDFC.AppendElement(curr); } } catch (e) { } return newFolder; },
m.mRecurrenceInfo = this.mRecurrenceInfo.clone();
m.mCreationDate = this.mCreationDate.clone();
cloneItemBaseInto: function (m) { m.mImmutable = false; m.mGeneration = this.mGeneration; m.mLastModifiedTime = this.mLastModifiedTime.clone(); m.mParent = this.mParent; m.mId = this.mId; m.mTitle = this.mTitle; m.mPriority = this.mPriority; m.mPrivacy = this.mPrivacy; m.mStatus = this.mStatus; m.mHasAlarm = this.mHasAlarm; m.mRecurrenceInfo = this.mRecurrenceInfo.clone(); if (this.mCreationDate) m.mCreationDate = this.mCreationDate.clone(); if (this.mAlarmTime) m.mAlarmTime = this.mAlarmTime.clone(); m.mAttachments = this.mAttachments; return m; },
if (this.mCreationDate) m.mCreationDate = this.mCreationDate.clone();
if (this.mRecurrenceInfo) { m.mRecurrenceInfo = this.mRecurrenceInfo.clone(); dump ("old recurType: " + this.mRecurrenceInfo.recurType + " new type: " + m.mRecurrenceInfo.recurType + "\n"); }
cloneItemBaseInto: function (m) { m.mImmutable = false; m.mGeneration = this.mGeneration; m.mLastModifiedTime = this.mLastModifiedTime.clone(); m.mParent = this.mParent; m.mId = this.mId; m.mTitle = this.mTitle; m.mPriority = this.mPriority; m.mPrivacy = this.mPrivacy; m.mStatus = this.mStatus; m.mHasAlarm = this.mHasAlarm; m.mRecurrenceInfo = this.mRecurrenceInfo.clone(); if (this.mCreationDate) m.mCreationDate = this.mCreationDate.clone(); if (this.mAlarmTime) m.mAlarmTime = this.mAlarmTime.clone(); m.mAttachments = this.mAttachments; return m; },
var e = this.mProperties.enumerator; while (e.hasMoreElements()) { var prop = e.getNext().QueryInterface(Components.interfaces.nsIProperty); m.mProperties.setProperty (prop.name, prop.value); }
cloneItemBaseInto: function (m) { m.mImmutable = false; m.mGeneration = this.mGeneration; m.mLastModifiedTime = this.mLastModifiedTime.clone(); m.mParent = this.mParent; m.mId = this.mId; m.mTitle = this.mTitle; m.mPriority = this.mPriority; m.mPrivacy = this.mPrivacy; m.mStatus = this.mStatus; m.mHasAlarm = this.mHasAlarm; m.mRecurrenceInfo = this.mRecurrenceInfo.clone(); if (this.mCreationDate) m.mCreationDate = this.mCreationDate.clone(); if (this.mAlarmTime) m.mAlarmTime = this.mAlarmTime.clone(); m.mAttachments = this.mAttachments; return m; },
m.mDirty = this.mDirty;
cloneItemBaseInto: function (m) { m.mImmutable = false; m.mGeneration = this.mGeneration; m.mLastModifiedTime = this.mLastModifiedTime.clone(); m.mParent = this.mParent; m.mId = this.mId; m.mTitle = this.mTitle; m.mPriority = this.mPriority; m.mPrivacy = this.mPrivacy; m.mStatus = this.mStatus; m.mHasAlarm = this.mHasAlarm; m.mCreationDate = this.mCreationDate.clone(); m.mStampTime = this.mStampTime.clone(); if (this.mRecurrenceInfo) { m.mRecurrenceInfo = this.mRecurrenceInfo.clone(); dump ("old recurType: " + this.mRecurrenceInfo.recurType + " new type: " + m.mRecurrenceInfo.recurType + "\n"); } if (this.mAlarmTime) m.mAlarmTime = this.mAlarmTime.clone(); m.mAttendees = []; for (var i = 0; i < this.mAttendees.length; i++) m.mAttendees[i] = this.mAttendees[i].clone(); // these need fixing m.mAttachments = this.mAttachments; m.mProperties = Components.classes["@mozilla.org/hash-property-bag;1"]. createInstance(Components.interfaces.nsIWritablePropertyBag); var e = this.mProperties.enumerator; while (e.hasMoreElements()) { var prop = e.getNext().QueryInterface(Components.interfaces.nsIProperty); m.mProperties.setProperty (prop.name, prop.value); } return m; },
this.updateStampTime();
cloneItemBaseInto: function (m, aNewParent) { this.updateStampTime(); this.ensureNotDirty(); m.mImmutable = false; m.mIsProxy = this.mIsProxy; m.mParentItem = aNewParent || this.mParentItem; m.mCalendar = this.mCalendar; if (this.mRecurrenceInfo) { m.mRecurrenceInfo = this.mRecurrenceInfo.clone(); m.mRecurrenceInfo.item = m; } m.mAttendees = []; for (var i = 0; i < this.mAttendees.length; i++) m.mAttendees[i] = this.mAttendees[i].clone(); m.mProperties = Components.classes["@mozilla.org/hash-property-bag;1"]. createInstance(Components.interfaces.nsIWritablePropertyBag); var e = this.mProperties.enumerator; while (e.hasMoreElements()) { var prop = e.getNext().QueryInterface(Components.interfaces.nsIProperty); var val = prop.value; if (prop.value instanceof Components.interfaces.calIDateTime) val = prop.value.clone(); m.mProperties.setProperty (prop.name, val); } m.mDirty = false; // these need fixing m.mAttachments = this.mAttachments; return m; },
dump("Closing spell checker dialog\n");
function Close(){ // Shutdown the spell check and close the dialog spellChecker.UninitSpellChecker(); window.close();}
spellChecker.UninitSpellChecker();
function Close(){ // Shutdown the spell check and close the dialog spellChecker.UninitSpellChecker(); SaveWindowLocation(); window.close();}
gAlertListener.observe(null, "alertfinished", gAlertCookie);
gAlertListener.observe(null, "alertfinished", "");
function closeAlert(){ if (gAlertListener) gAlertListener.observe(null, "alertfinished", gAlertCookie); window.close(); }
window.outerHeight = gCurrentHeight; window.moveTo((screen.availWidth - gWidth), screen.availHeight - gCurrentHeight);
window.screenY += gSlideIncrement; window.outerHeight -= gSlideIncrement;
function closeAlert(){ if (gCurrentHeight) { gCurrentHeight -= gSlideIncrement; window.outerHeight = gCurrentHeight; window.moveTo((screen.availWidth - gWidth), screen.availHeight - gCurrentHeight); setTimeout(closeAlert, gSlideTime); } else { if (gAlertListener) gAlertListener.onAlertFinished(gAlertCookie); window.close(); }}
var windowMediator = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'].
var windowMediator = Components.classes['@mozilla.org/appshell/window-mediator;1'].
closeAll: function(aAskToSave) { var windowMediator = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator']. getService(Components.interfaces.nsIWindowMediator); var enumerator = windowMediator.getEnumerator(null); while (enumerator.hasMoreElements()) { var domWindow = enumerator.getNext(); if (aAskToSave && ("tryToClose" in domWindow)) { if (!domWindow.tryToClose()) return false; } domWindow.close(); }; return true; }
},
}
closeBranches: function ( aComponentName ) { var panelChildren = document.getElementById( "panelChildren" ); var panelTree = document.getElementById( "prefsTree" ); for( var i = 0; i < panelChildren.childNodes.length; i++ ) { var currentItem = panelChildren.childNodes[i]; if( currentItem.id != aComponentName && currentItem.id != "appearance" ) currentItem.removeAttribute( "open" ); } var openItem = document.getElementById( aComponentName ); panelTree.selectItem( openItem ); },
window.close();
function closeDialog(){ removeToolboxListeners(); unwrapToolbarItems(); persistCurrentSets(); notifyParentComplete();}
document.documentElement.destroy();
var basewin = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIWebNavigation) .QueryInterface(Components.interfaces.nsIDocShellTreeItem) .treeOwner .QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIBaseWindow); basewin.destroy();
function CloseWindow(){ // Check to make sure document is saved. "true" means allow "Don't Save" button, // so user can choose to close without saving if (CheckAndSaveDocument("cmd_close", true)) { if (window.InsertCharWindow) SwitchInsertCharToAnotherEditorOrClose(); //window.editorShell.CloseWindowWithoutSaving(); try { document.documentElement.destroy(); } catch (e) {} }}
if (!("disablePlugin" in e.plugin.scope))
if (!e.plugin.enabled) { display(getMsg(MSG_IS_DISABLED, e.plugin.id)); return; } if (e.plugin.API > 0) { if (!e.plugin.disable()) { display(getMsg(MSG_CANT_DISABLE, e.plugin.id)); return; } } else if (!("disablePlugin" in e.plugin.scope))
function cmdAblePlugin(e){ if (e.command.name == "disable-plugin") { if (!("disablePlugin" in e.plugin.scope)) { display(getMsg(MSG_CANT_DISABLE, e.plugin.id)); return; } e.plugin.enabled = false; e.plugin.scope.disablePlugin(); } else { if (!("enablePlugin" in e.plugin.scope)) { display(getMsg(MSG_CANT_ENABLE, e.plugin.id)); return; } e.plugin.enabled = true; e.plugin.scope.enablePlugin(); }}
e.plugin.scope.disablePlugin();
e.plugin.prefs["enabled"] = false;
function cmdAblePlugin(e){ if (e.command.name == "disable-plugin") { if (!("disablePlugin" in e.plugin.scope)) { display(getMsg(MSG_CANT_DISABLE, e.plugin.id)); return; } e.plugin.enabled = false; e.plugin.scope.disablePlugin(); } else { if (!("enablePlugin" in e.plugin.scope)) { display(getMsg(MSG_CANT_ENABLE, e.plugin.id)); return; } e.plugin.enabled = true; e.plugin.scope.enablePlugin(); }}
if (!("enablePlugin" in e.plugin.scope))
if (e.plugin.enabled)
function cmdAblePlugin(e){ if (e.command.name == "disable-plugin") { if (!("disablePlugin" in e.plugin.scope)) { display(getMsg(MSG_CANT_DISABLE, e.plugin.id)); return; } e.plugin.enabled = false; e.plugin.scope.disablePlugin(); } else { if (!("enablePlugin" in e.plugin.scope)) { display(getMsg(MSG_CANT_ENABLE, e.plugin.id)); return; } e.plugin.enabled = true; e.plugin.scope.enablePlugin(); }}
display(getMsg(MSG_CANT_ENABLE, e.plugin.id));
display(getMsg(MSG_IS_ENABLED, e.plugin.id));
function cmdAblePlugin(e){ if (e.command.name == "disable-plugin") { if (!("disablePlugin" in e.plugin.scope)) { display(getMsg(MSG_CANT_DISABLE, e.plugin.id)); return; } e.plugin.enabled = false; e.plugin.scope.disablePlugin(); } else { if (!("enablePlugin" in e.plugin.scope)) { display(getMsg(MSG_CANT_ENABLE, e.plugin.id)); return; } e.plugin.enabled = true; e.plugin.scope.enablePlugin(); }}
e.plugin.scope.enablePlugin();
e.plugin.prefs["enabled"] = true;
function cmdAblePlugin(e){ if (e.command.name == "disable-plugin") { if (!("disablePlugin" in e.plugin.scope)) { display(getMsg(MSG_CANT_DISABLE, e.plugin.id)); return; } e.plugin.enabled = false; e.plugin.scope.disablePlugin(); } else { if (!("enablePlugin" in e.plugin.scope)) { display(getMsg(MSG_CANT_ENABLE, e.plugin.id)); return; } e.plugin.enabled = true; e.plugin.scope.enablePlugin(); }}
function sendToAllNetworks(reason)
function sendToAllNetworks(command, reason)
function cmdAway(e){ function sendToAllNetworks(reason) { for (var n in client.networks) { if (client.networks[n].primServ && (client.networks[n].state == NET_ONLINE)) { client.networks[n].dispatch("away", { reason: reason }); } } }; if (e.reason) { /* going away */ if (e.server) { if (e.network.state == NET_ONLINE) { if (e.network.prefs["awayNick"]) e.server.sendData("NICK " + e.network.prefs["awayNick"] + "\n"); e.server.sendData("AWAY :" + fromUnicode(e.reason, e.network) + "\n"); } e.network.prefs["away"] = e.reason; } else { // Client view, do command for all networks. sendToAllNetworks(e.reason); display(getMsg(MSG_AWAY_ON, e.reason)); } } else { /* returning */ if (e.server) { if (e.network.state == NET_ONLINE) { if (e.network.prefs["awayNick"]) e.server.sendData("NICK " + e.network.prefs["nickname"] + "\n"); e.server.sendData("AWAY\n"); } e.network.prefs["away"] = ""; } else { // Client view, do command for all networks. sendToAllNetworks(null); display(MSG_AWAY_OFF); } }}
client.networks[n].dispatch("away", { reason: reason });
client.networks[n].dispatch(command, { reason: reason });
function cmdAway(e){ function sendToAllNetworks(reason) { for (var n in client.networks) { if (client.networks[n].primServ && (client.networks[n].state == NET_ONLINE)) { client.networks[n].dispatch("away", { reason: reason }); } } }; if (e.reason) { /* going away */ if (e.server) { if (e.network.state == NET_ONLINE) { if (e.network.prefs["awayNick"]) e.server.sendData("NICK " + e.network.prefs["awayNick"] + "\n"); e.server.sendData("AWAY :" + fromUnicode(e.reason, e.network) + "\n"); } e.network.prefs["away"] = e.reason; } else { // Client view, do command for all networks. sendToAllNetworks(e.reason); display(getMsg(MSG_AWAY_ON, e.reason)); } } else { /* returning */ if (e.server) { if (e.network.state == NET_ONLINE) { if (e.network.prefs["awayNick"]) e.server.sendData("NICK " + e.network.prefs["nickname"] + "\n"); e.server.sendData("AWAY\n"); } e.network.prefs["away"] = ""; } else { // Client view, do command for all networks. sendToAllNetworks(null); display(MSG_AWAY_OFF); } }}
if (e.reason)
if ((e.command.name == "away") || (e.command.name == "custom-away"))
function cmdAway(e){ function sendToAllNetworks(reason) { for (var n in client.networks) { if (client.networks[n].primServ && (client.networks[n].state == NET_ONLINE)) { client.networks[n].dispatch("away", { reason: reason }); } } }; if (e.reason) { /* going away */ if (e.server) { if (e.network.state == NET_ONLINE) { if (e.network.prefs["awayNick"]) e.server.sendData("NICK " + e.network.prefs["awayNick"] + "\n"); e.server.sendData("AWAY :" + fromUnicode(e.reason, e.network) + "\n"); } e.network.prefs["away"] = e.reason; } else { // Client view, do command for all networks. sendToAllNetworks(e.reason); display(getMsg(MSG_AWAY_ON, e.reason)); } } else { /* returning */ if (e.server) { if (e.network.state == NET_ONLINE) { if (e.network.prefs["awayNick"]) e.server.sendData("NICK " + e.network.prefs["nickname"] + "\n"); e.server.sendData("AWAY\n"); } e.network.prefs["away"] = ""; } else { // Client view, do command for all networks. sendToAllNetworks(null); display(MSG_AWAY_OFF); } }}
sendToAllNetworks(e.reason);
sendToAllNetworks("away", e.reason);
function cmdAway(e){ function sendToAllNetworks(reason) { for (var n in client.networks) { if (client.networks[n].primServ && (client.networks[n].state == NET_ONLINE)) { client.networks[n].dispatch("away", { reason: reason }); } } }; if (e.reason) { /* going away */ if (e.server) { if (e.network.state == NET_ONLINE) { if (e.network.prefs["awayNick"]) e.server.sendData("NICK " + e.network.prefs["awayNick"] + "\n"); e.server.sendData("AWAY :" + fromUnicode(e.reason, e.network) + "\n"); } e.network.prefs["away"] = e.reason; } else { // Client view, do command for all networks. sendToAllNetworks(e.reason); display(getMsg(MSG_AWAY_ON, e.reason)); } } else { /* returning */ if (e.server) { if (e.network.state == NET_ONLINE) { if (e.network.prefs["awayNick"]) e.server.sendData("NICK " + e.network.prefs["nickname"] + "\n"); e.server.sendData("AWAY\n"); } e.network.prefs["away"] = ""; } else { // Client view, do command for all networks. sendToAllNetworks(null); display(MSG_AWAY_OFF); } }}
sendToAllNetworks(null);
sendToAllNetworks("back");
function cmdAway(e){ function sendToAllNetworks(reason) { for (var n in client.networks) { if (client.networks[n].primServ && (client.networks[n].state == NET_ONLINE)) { client.networks[n].dispatch("away", { reason: reason }); } } }; if (e.reason) { /* going away */ if (e.server) { if (e.network.state == NET_ONLINE) { if (e.network.prefs["awayNick"]) e.server.sendData("NICK " + e.network.prefs["awayNick"] + "\n"); e.server.sendData("AWAY :" + fromUnicode(e.reason, e.network) + "\n"); } e.network.prefs["away"] = e.reason; } else { // Client view, do command for all networks. sendToAllNetworks(e.reason); display(getMsg(MSG_AWAY_ON, e.reason)); } } else { /* returning */ if (e.server) { if (e.network.state == NET_ONLINE) { if (e.network.prefs["awayNick"]) e.server.sendData("NICK " + e.network.prefs["nickname"] + "\n"); e.server.sendData("AWAY\n"); } e.network.prefs["away"] = ""; } else { // Client view, do command for all networks. sendToAllNetworks(null); display(MSG_AWAY_OFF); } }}
if (e.deleteWhenDone) e.network.deleteWhenDone = true;
function cmdCancel(e){ var network = e.network; if ((network.state == NET_ONLINE) && network.isRunningList()) { // We're running a /list, terminate the output so we return to sanity display(MSG_CANCELLING_LIST); network.abortList(); } else if ((network.state == NET_CONNECTING) || (network.state == NET_WAITING)) { // We're trying to connect to a network, and want to cancel. Do so: display(getMsg(MSG_CANCELLING, network.unicodeName)); network.cancel(); } else { display(MSG_NOTHING_TO_CANCEL, MT_ERROR); }}
{ dd ("found one");
function cmdClearScript (e){ var i; if ("scriptRecList" in e) { for (i = 0; i < e.scriptRecList.length; ++i) cmdClearScript ({scriptRec: e.scriptRecList[i]}); return true; } /* walk backwards so as not to disturb the indicies */ for (i = console.breakpoints.childData.length - 1; i >= 0; --i) { var bpr = console.breakpoints.childData[i]; if (bpr.hasScriptRecord(e.scriptRec)) { dd ("found one"); clearBreakpointByNumber (i); } } return true;}
}
function cmdClearScript (e){ var i; if ("scriptRecList" in e) { for (i = 0; i < e.scriptRecList.length; ++i) cmdClearScript ({scriptRec: e.scriptRecList[i]}); return true; } /* walk backwards so as not to disturb the indicies */ for (i = console.breakpoints.childData.length - 1; i >= 0; --i) { var bpr = console.breakpoints.childData[i]; if (bpr.hasScriptRecord(e.scriptRec)) { dd ("found one"); clearBreakpointByNumber (i); } } return true;}
if (!names.length) { display (getMsg(MSN_NO_CMDMATCH, e.pattern), MT_ERROR); return true; }
function cmdCommands (e){ display (getMsg(MSN_TIP1_HELP, console.prefs["sessionView.requireSlash"] ? "/" : "")); display (MSG_TIP2_HELP); var names = console.commandManager.listNames(e.pattern, CMD_CONSOLE); names = names.join(MSG_COMMASP); if (e.pattern) display (getMsg(MSN_CMDMATCH, [e.pattern, "[" + names + "]"])); else display (getMsg(MSN_CMDMATCH_ALL, "[" + names + "]")); return true;}
display (MSG_TIP1_HELP);
display (getMsg(MSN_TIP1_HELP, console.prefs["sessionView.requireSlash"] ? "/" : ""));
function cmdCommands (e){ display (MSG_TIP1_HELP); display (MSG_TIP2_HELP); var names = console.commandManager.listNames(e.pattern, CMD_CONSOLE); names = names.join(MSG_COMMASP); if (e.pattern) display (getMsg(MSN_CMDMATCH, [e.pattern, "[" + names + "]"])); else display (getMsg(MSN_CMDMATCH_ALL, "[" + names + "]")); return true;}
e.server.ctcpTo (e.target, e.code, e.params);
var obj = e.server.addTarget(e.target); obj.ctcp(e.code, e.params);
function cmdCTCP(e){ e.server.ctcpTo (e.target, e.code, e.params);}
this.mPropsBoxObject.beginUpdateBatch();
cmdDeleteSelectedProperty: function() { this.mPropsBoxObject.beginUpdateBatch(); var style = this.getSelectedRule().style; var propname = this.getSelectedProp(); style.removeProperty(propname); this.mPropsBoxObject.endUpdateBatch(); },
this.mPropsBoxObject.endUpdateBatch();
this.mPropsBoxObject.invalidate();
cmdDeleteSelectedProperty: function() { this.mPropsBoxObject.beginUpdateBatch(); var style = this.getSelectedRule().style; var propname = this.getSelectedProp(); style.removeProperty(propname); this.mPropsBoxObject.endUpdateBatch(); },
this.mPropsBoxObject.invalidate();
this.mPropsBoxObject.endUpdateBatch();
cmdDeleteSelectedProperty: function() { var style = this.getSelectedRule().style; var propname = this.getSelectedProp(); style.removeProperty(propname); this.mPropsBoxObject.invalidate(); },
e.view.part();
{ e.view.dispatch("part", { deleteWhenDone: true }); return; }
function cmdDeleteView(e){ if (!e.view) e.view = e.sourceObject; if (e.view.TYPE == "IRCChannel" && e.view.active) e.view.part(); if (e.view.TYPE == "IRCDCCChat" && e.view.active) e.view.disconnect(); if (client.viewsArray.length < 2) { display(MSG_ERR_LAST_VIEW, MT_ERROR); return; } var tb = getTabForObject(e.view); if (tb) { var i = deleteTab (tb); if (i != -1) { if (e.view.logFile) { e.view.logFile.close(); e.view.logFile = null; } delete e.view.messageCount; delete e.view.messages; client.deck.removeChild(e.view.frame); delete e.view.frame; var oldView = client.currentObject; if (client.currentObject == e.view) { if (i >= client.viewsArray.length) i = client.viewsArray.length - 1; oldView = client.viewsArray[i].source } client.currentObject = null; oldView.dispatch("set-current-view", { view: oldView }); } }}
if (e.view.TYPE == "IRCNetwork" && (e.view.state == NET_CONNECTING || e.view.state == NET_WAITING)) { e.view.dispatch("cancel", { deleteWhenDone: true }); return; }
function cmdDeleteView(e){ if (!e.view) e.view = e.sourceObject; if (e.view.TYPE == "IRCChannel" && e.view.active) e.view.part(); if (e.view.TYPE == "IRCDCCChat" && e.view.active) e.view.disconnect(); if (client.viewsArray.length < 2) { display(MSG_ERR_LAST_VIEW, MT_ERROR); return; } var tb = getTabForObject(e.view); if (tb) { var i = deleteTab (tb); if (i != -1) { if (e.view.logFile) { e.view.logFile.close(); e.view.logFile = null; } delete e.view.messageCount; delete e.view.messages; client.deck.removeChild(e.view.frame); delete e.view.frame; var oldView = client.currentObject; if (client.currentObject == e.view) { if (i >= client.viewsArray.length) i = client.viewsArray.length - 1; oldView = client.viewsArray[i].source } client.currentObject = null; oldView.dispatch("set-current-view", { view: oldView }); } }}
if (e.view.logFile) { e.view.logFile.close(); e.view.logFile = null; }
function cmdDeleteView(e){ if (!e.view) e.view = e.sourceObject; if (e.view.TYPE == "IRCChannel" && e.view.active) e.view.part(); if (client.viewsArray.length < 2) { display(MSG_ERR_LAST_VIEW, MT_ERROR); return; } var tb = getTabForObject(e.view); if (tb) { var i = deleteTab (tb); if (i != -1) { delete e.view.messageCount; delete e.view.messages; client.deck.removeChild(e.view.frame); delete e.view.frame; var oldView = client.currentObject; if (client.currentObject == e.view) { if (i >= client.viewsArray.length) i = client.viewsArray.length - 1; oldView = client.viewsArray[i].source } client.currentObject = null; setCurrentObject(oldView); } }}
client.munger.entries[".mailto"].enabled = false;
function cmdEcho(e){ display(e.message);}
return;
return false;
function cmdEval (e){ var urlFile; var functionName; var rv; if (!("currentEvalObject" in console)) { display (MSG_ERR_NO_EVAL_OBJECT, MT_ERROR); return; } display(getMsg(MSN_EVAL_IN, [leftPadString(console.evalCount, 3, "0"), e.expression]), MT_FEVAL_IN); if (console.currentEvalObject instanceof jsdIStackFrame) { rv = evalInTargetScope (e.expression); if (typeof rv != "undefined") { if (rv != null) { var l = $.length; $[l] = rv; display (getMsg(MSN_FMT_TMP_ASSIGN, [l, formatValue (rv)]), MT_FEVAL_OUT); } else dd ("evalInTargetScope returned null"); } } else { var parent = console.currentEvalObject.__parent__; if (!parent) parent = console.currentEvalObject; if ("location" in parent) urlFile = getFileFromPath(parent.location.href); else urlFile = MSG_VAL_UNKNOWN; try { rv = console.doEval.apply(console.currentEvalObject, [e.expression, parent]); display (String(rv), MT_FEVAL_OUT); } catch (ex) { display (formatException(ex), MT_ERROR); } } dispatch ("hook-eval-done"); return true;}
var parent = console.currentEvalObject.__parent__;
var parent; var jsdValue = console.jsds.wrapValue (console.currentEvalObject); if (jsdValue.jsParent) parent = jsdValue.jsParent.getWrappedValue();
function cmdEval (e){ var urlFile; var functionName; var rv; if (!("currentEvalObject" in console)) { display (MSG_ERR_NO_EVAL_OBJECT, MT_ERROR); return; } display(getMsg(MSN_EVAL_IN, [leftPadString(console.evalCount, 3, "0"), e.expression]), MT_FEVAL_IN); if (console.currentEvalObject instanceof jsdIStackFrame) { rv = evalInTargetScope (e.expression); if (typeof rv != "undefined") { if (rv != null) { var l = $.length; $[l] = rv; display (getMsg(MSN_FMT_TMP_ASSIGN, [l, formatValue (rv)]), MT_FEVAL_OUT); } else dd ("evalInTargetScope returned null"); } } else { var parent = console.currentEvalObject.__parent__; if (!parent) parent = console.currentEvalObject; if ("location" in parent) urlFile = getFileFromPath(parent.location.href); else urlFile = MSG_VAL_UNKNOWN; try { rv = console.doEval.apply(console.currentEvalObject, [e.expression, parent]); display (String(rv), MT_FEVAL_OUT); } catch (ex) { display (formatException(ex), MT_ERROR); } } dispatch ("hook-eval-done"); return true;}
findInPage(getFindData(e));
if (!e.rest) { findInPage(getFindData(e)); return; } const FINDSVC_ID = "@mozilla.org/find/find_service;1"; var findService = getService(FINDSVC_ID, "nsIFindService"); var oldWrap = findService.wrapFind; findService.wrapFind = true; findService.searchString = e.rest; findAgainInPage(getFindData(e)); findService.wrapFind = oldWrap;
function cmdFind(e){ findInPage(getFindData(e));}
{ cmdFindURL ({url: e.breakpointRec.fileName, rangeStart: e.breakpointRec.line, rangeEnd: e.breakpointRec.line}); return true;
{ return dispatch ("find-url", {url: e.breakpointRec.fileName, rangeStart: e.breakpointRec.line, rangeEnd: e.breakpointRec.line});
function cmdFindBp (e){ cmdFindURL ({url: e.breakpointRec.fileName, rangeStart: e.breakpointRec.line, rangeEnd: e.breakpointRec.line}); return true;}
return cmdFindURL ({url: url, rangeStart: line - 1, rangeEnd: line - 1});
return dispatch ("find-url", {url: url, rangeStart: line - 1, rangeEnd: line - 1});
function cmdFindCreatorOrCtor (e){ var objVal = e.jsdValue.objectValue; if (!objVal) { display (MSG_NOT_AN_OBJECT, MT_ERROR); return false; } var name = e.command.name; var url; var line; if (name == "find-creator") { url = objVal.creatorURL; line = objVal.creatorLine; } else { url = objVal.constructorURL; line = objVal.constructorLine; } return cmdFindURL ({url: url, rangeStart: line - 1, rangeEnd: line - 1});}
displayFrame (jsdFrame, e.frameIndex, true);
if ("isInteractive" in e && e.isInteractive) displayFrame (jsdFrame, e.frameIndex, true);
function cmdFindFrame (e){ var jsdFrame = console.frames[e.frameIndex]; displayFrame (jsdFrame, e.frameIndex, true); if (jsdFrame.isNative) return true; var scriptWrapper = console.scriptWrappers[jsdFrame.script.tag] return dispatch ("find-script", { scriptWrapper: scriptWrapper, targetPc: jsdFrame.pc });}
if (console.prefs["prettyprint"] && e.scriptWrapper.sourceText)
if (console.prefs["prettyprint"] && jsdScript.isValid)
function cmdFindScript (e){ var jsdScript = e.scriptWrapper.jsdScript; var targetLine = 1; var rv, params; if (console.prefs["prettyprint"] && e.scriptWrapper.sourceText) { if (e.targetPc != null && jsdScript.isValid) targetLine = jsdScript.pcToLine(e.targetPc, PCMAP_PRETTYPRINT); console.currentDetails = e.scriptWrapper; params = { sourceText: e.scriptWrapper.sourceText, rangeStart: null, rangeEnd: null, targetLine: targetLine, details: e.scriptWrapper }; dispatch ("hook-display-sourcetext-soft", params); rv = jsdScript.fileName; } else { if (e.targetPc != null && jsdScript.isValid) targetLine = jsdScript.pcToLine(e.targetPc, PCMAP_SOURCETEXT); else targetLine = jsdScript.baseLineNumber; params = { sourceText: e.scriptWrapper.scriptInstance.sourceText, rangeStart: jsdScript.baseLineNumber, rangeEnd: jsdScript.baseLineNumber + jsdScript.lineExtent - 1, targetLine: targetLine, details: e.scriptWrapper }; rv = dispatch("find-sourcetext-soft", params); } return rv;}
if (e.targetPc != null && jsdScript.isValid)
if (e.targetPc != null)
function cmdFindScript (e){ var jsdScript = e.scriptWrapper.jsdScript; var targetLine = 1; var rv, params; if (console.prefs["prettyprint"] && e.scriptWrapper.sourceText) { if (e.targetPc != null && jsdScript.isValid) targetLine = jsdScript.pcToLine(e.targetPc, PCMAP_PRETTYPRINT); console.currentDetails = e.scriptWrapper; params = { sourceText: e.scriptWrapper.sourceText, rangeStart: null, rangeEnd: null, targetLine: targetLine, details: e.scriptWrapper }; dispatch ("hook-display-sourcetext-soft", params); rv = jsdScript.fileName; } else { if (e.targetPc != null && jsdScript.isValid) targetLine = jsdScript.pcToLine(e.targetPc, PCMAP_SOURCETEXT); else targetLine = jsdScript.baseLineNumber; params = { sourceText: e.scriptWrapper.scriptInstance.sourceText, rangeStart: jsdScript.baseLineNumber, rangeEnd: jsdScript.baseLineNumber + jsdScript.lineExtent - 1, targetLine: targetLine, details: e.scriptWrapper }; rv = dispatch("find-sourcetext-soft", params); } return rv;}
cmdFindURL({url: e.scriptRec.parentRecord.fileName, rangeStart: e.scriptRec.baseLineNumber, rangeEnd: e.scriptRec.baseLineNumber + e.scriptRec.lineExtent - 1 });
rv = dispatch("find-url", {url: e.scriptRec.parentRecord.fileName, rangeStart: e.scriptRec.baseLineNumber, rangeEnd: e.scriptRec.baseLineNumber + e.scriptRec.lineExtent - 1});
function cmdFindScript (e){ if (console.sourceView.prettyPrint) { delete console.highlightFile; delete console.highlightStart; delete console.highlightEnd; console.sourceView.displaySourceText(e.scriptRec.sourceText); } else { cmdFindURL({url: e.scriptRec.parentRecord.fileName, rangeStart: e.scriptRec.baseLineNumber, rangeEnd: e.scriptRec.baseLineNumber + e.scriptRec.lineExtent - 1 }); } console.sourceView.details = e.scriptRec; return true;}
return true;
return rv;
function cmdFindScript (e){ if (console.sourceView.prettyPrint) { delete console.highlightFile; delete console.highlightStart; delete console.highlightEnd; console.sourceView.displaySourceText(e.scriptRec.sourceText); } else { cmdFindURL({url: e.scriptRec.parentRecord.fileName, rangeStart: e.scriptRec.baseLineNumber, rangeEnd: e.scriptRec.baseLineNumber + e.scriptRec.lineExtent - 1 }); } console.sourceView.details = e.scriptRec; return true;}
return true;
return null;
function cmdFindURL (e){ if (!e.url) { console.sourceView.displaySourceText(null); return true; } var sourceText; if (e.url in console.scripts) sourceText = console.scripts[e.url].sourceText; else if (e.url in console.files) sourceText = console.files[e.url]; else sourceText = console.files[e.url] = new SourceText (null, e.url); console.sourceView.details = null; console.highlightFile = e.url; var line = 1; delete console.highlightStart; delete console.highlightEnd; if ("rangeStart" in e && e.rangeStart != null) { line = e.rangeStart; if (e.rangeEnd != null) { console.highlightStart = e.rangeStart - 1; console.highlightEnd = e.rangeEnd - 1; } } if ("lineNumber" in e && e.lineNumber != null) line = e.lineNumber; console.sourceView.displaySourceText(sourceText); console.sourceView.outliner.invalidate(); if ("command" in e && e.command.name == "find-url-soft") console.sourceView.softScrollTo (line); else console.sourceView.scrollTo (line - 2, -1); return true;}
return true;
return e.url;
function cmdFindURL (e){ if (!e.url) { console.sourceView.displaySourceText(null); return true; } var sourceText; if (e.url in console.scripts) sourceText = console.scripts[e.url].sourceText; else if (e.url in console.files) sourceText = console.files[e.url]; else sourceText = console.files[e.url] = new SourceText (null, e.url); console.sourceView.details = null; console.highlightFile = e.url; var line = 1; delete console.highlightStart; delete console.highlightEnd; if ("rangeStart" in e && e.rangeStart != null) { line = e.rangeStart; if (e.rangeEnd != null) { console.highlightStart = e.rangeStart - 1; console.highlightEnd = e.rangeEnd - 1; } } if ("lineNumber" in e && e.lineNumber != null) line = e.lineNumber; console.sourceView.displaySourceText(sourceText); console.sourceView.outliner.invalidate(); if ("command" in e && e.command.name == "find-url-soft") console.sourceView.softScrollTo (line); else console.sourceView.scrollTo (line - 2, -1); return true;}
return;
return false;
function cmdFrame (e){ if (e.frameIndex != null) { if (e.frameIndex < 0 || e.frameIndex >= console.frames.length) { display (getMsg(MSN_ERR_INVALID_PARAM, ["frameIndex", e.frameIndex]), MT_ERROR); return; } setCurrentFrameByIndex(e.frameIndex); } else { e.frameIndex = getCurrentFrameIndex(); } dispatch ("find-frame", { frameIndex: e.frameIndex }); return true;}
dispatch("focus-input");
function cmdGotoURL(e){ const IO_SVC = "@mozilla.org/network/io-service;1"; const EXT_PROTO_SVC = "@mozilla.org/uriloader/external-protocol-service;1"; if (e.url.search(/^ircs?:/i) == 0) { gotoIRCURL(e.url); return; } if (e.url.search(/^x-cz-command:/i) == 0) { var ary = e.url.match(/^x-cz-command:(.*)$/i); e.sourceObject.frame.contentWindow.location = "javascript:void(view.dispatch('" + decodeURI(ary[1]) + "'))"; return; } if (e.command.name == "goto-url-external") { const ioSvc = getService(IO_SVC, "nsIIOService"); const extProtoSvc = getService(EXT_PROTO_SVC, "nsIExternalProtocolService"); var uri = ioSvc.newURI(e.url, "UTF-8", null); extProtoSvc.loadUrl(uri); return; } if (e.command.name == "goto-url-newwin") { openTopWin(e.url); return; } var window = getWindowByType("navigator:browser"); if (!window) { openTopWin(e.url); return; } if (client.prefs["link.focus"]) window.focus(); if (e.command.name == "goto-url-newtab") { if (client.host == "Mozilla") { window.openNewTabWith(e.url, false, false); } else { window.openNewTabWith(e.url, null, null, null, null, false); } return; } var location = window.content.document.location; if (location.href.indexOf("chrome://chatzilla/content/") == 0) { // don't replace chatzilla running in a tab openTopWin(e.url); return; } location.href = e.url;}