rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
"", "modal=yes,chrome,resizeable=no,centerscreen", | "_blank", "modal,chrome,centerscreen,resizable=no,titlebar", | function changeScreenResolution() { var screenResolution = document.getElementById("screenResolution"); var userResolution = document.getElementById("userResolution"); if (screenResolution.value == "other") { // If the user selects "Other..." we bring up the calibrate screen dialog var rv = { newdpi : 0 }; calscreen = window.openDialog("chrome://communicator/content/pref/pref-calibrate-screen.xul", "", "modal=yes,chrome,resizeable=no,centerscreen", rv); if (rv.newdpi != -1) { // They have entered values, and we have a DPI value back var dpi = screenResolution.getAttribute( "dpi" ); userResolution.setAttribute("value", rv.newdpi); userResolution.setAttribute("label", dpi.replace(/\$val/, rv.newdpi)); userResolution.removeAttribute("hidden"); screenResolution.selectedItem = userResolution; } else { // They've cancelled. We can't leave "Other..." selected, so... var defaultResolution = document.getElementById("defaultResolution"); screenResolution.selectedItem = defaultResolution; userResolution.setAttribute("hidden", "true"); } } else if (!(screenResolution.value == userResolution.value)) { // User has selected one of the hard-coded resolutions userResolution.setAttribute("hidden", "true"); } } |
var order = aOrder == -1 ? -1 : 1; gConsole.sortOrder = order; document.persist("ConsoleBox", "sortOrder"); updateSortCommand(order); | updateSortCommand(gConsole.sortOrder = aOrder); | function changeSortOrder(aOrder){ var order = aOrder == -1 ? -1 : 1; // default to 1 gConsole.sortOrder = order; document.persist("ConsoleBox", "sortOrder"); updateSortCommand(order);} |
dialog.targetInput.value=dialog.commonInput.data; | dialog.targetInput.value=dialog.commonInput.value; | function changeTarget() { dialog.targetInput.value=dialog.commonInput.data;} |
var enable = dialog.hrefInput.value.trimString().length > 0; | var enable = insertNew ? (dialog.hrefInput.value.trimString().length > 0) : true; | function ChangeText(){ var enable = dialog.hrefInput.value.trimString().length > 0; SetElementEnabledById( "ok", enable); SetElementEnabledById("MakeRelativeUrl", enable);} |
SetElementEnabledById("MakeRelativeUrl", enable); | function ChangeText(){ var enable = dialog.hrefInput.value.trimString().length > 0; SetElementEnabledById( "ok", enable); SetElementEnabledById("MakeRelativeUrl", enable);} |
|
debug("changeTitleBar: "+title); | function changeTitleBar(componentType){ var title; // Sanity check input if ( componentType == "event" || componentType == "todo" ) { var args = window.arguments[0]; // Is this a NEW event/todo, or are we EDITing an existing event/todo? if("new" == args.mode) title = document.getElementById("data-" + componentType + "-title-new" ).getAttribute("value"); else title = document.getElementById("data-" + componentType + "-title-edit").getAttribute("value"); debug("changeTitleBar: "+title); document.title = title; } else { dump("changeTitleBar: ERROR! Tried to change titlebar to invalid value: "+componentType+"\n"); }} |
|
if (holderBox) | if (holderBox) { | function changeToolTipTextForEvent( event ){ var thisEvent = getCalendarEventFromEvent( event ); var toolTip = document.getElementById( "eventTreeTooltip" ); while( toolTip.hasChildNodes() ) { toolTip.removeChild( toolTip.firstChild ); } var holderBox = getPreviewForEvent( thisEvent ); if (holderBox) toolTip.appendChild( holderBox );} |
return true; } else { return false; } | function changeToolTipTextForEvent( event ){ var thisEvent = getCalendarEventFromEvent( event ); var toolTip = document.getElementById( "eventTreeTooltip" ); while( toolTip.hasChildNodes() ) { toolTip.removeChild( toolTip.firstChild ); } var holderBox = getPreviewForEvent( thisEvent ); if (holderBox) toolTip.appendChild( holderBox );} |
|
var thisEvent = event.currentTarget.event; | var thisEvent = getCalendarEventFromEvent( event ); | function changeToolTipTextForEvent( event ){ var thisEvent = event.currentTarget.event; var Html = document.getElementById( "savetip" ); while( Html.hasChildNodes() ) { Html.removeChild( Html.firstChild ); } var HolderBox = getPreviewText( event.currentTarget.event ); Html.appendChild( HolderBox );} |
var HolderBox = getPreviewText( event.currentTarget.event ); | if( !thisEvent ) return( false ); var HolderBox = getPreviewText( thisEvent ); | function changeToolTipTextForEvent( event ){ var thisEvent = event.currentTarget.event; var Html = document.getElementById( "savetip" ); while( Html.hasChildNodes() ) { Html.removeChild( Html.firstChild ); } var HolderBox = getPreviewText( event.currentTarget.event ); Html.appendChild( HolderBox );} |
if (toDoItem.title) { var TitleHtml = document.createElement( "description" ); var TitleText = document.createTextNode( "Title: "+toDoItem.title ); TitleHtml.appendChild( TitleText ); HolderBox.appendChild( TitleHtml ); } var DateHtml = document.createElement( "description" ); var startDate = new Date( toDoItem.start.getTime() ); var DateText = document.createTextNode( "Start Date: "+gCalendarWindow.dateFormater.getFormatedDate( startDate ) ); DateHtml.appendChild( DateText ); HolderBox.appendChild( DateHtml ); DateHtml = document.createElement( "description" ); var dueDate = new Date( toDoItem.due.getTime() ); DateText = document.createTextNode( "Due Date: "+gCalendarWindow.dateFormater.getFormatedDate( dueDate ) ); DateHtml.appendChild( DateText ); HolderBox.appendChild( DateHtml ); if (toDoItem.description) { var DescriptionHtml = document.createElement( "description" ); var DescriptionText = document.createTextNode( "Description: "+toDoItem.description ); DescriptionHtml.appendChild( DescriptionText ); HolderBox.appendChild( DescriptionHtml ); } | if (toDoItem.title) { var TitleHtml = document.createElement( "description" ); var TitleText = document.createTextNode( "Title: "+toDoItem.title ); TitleHtml.appendChild( TitleText ); HolderBox.appendChild( TitleHtml ); } | function changeToolTipTextForToDo( event ){ var toDoItem = getToDoFromEvent( event ); var Html = document.getElementById( "savetip" ); while( Html.hasChildNodes() ) { Html.removeChild( Html.firstChild ); } var HolderBox = document.createElement( "vbox" ); if( toDoItem ) { if (toDoItem.title) { var TitleHtml = document.createElement( "description" ); var TitleText = document.createTextNode( "Title: "+toDoItem.title ); TitleHtml.appendChild( TitleText ); HolderBox.appendChild( TitleHtml ); } var DateHtml = document.createElement( "description" ); var startDate = new Date( toDoItem.start.getTime() ); var DateText = document.createTextNode( "Start Date: "+gCalendarWindow.dateFormater.getFormatedDate( startDate ) ); DateHtml.appendChild( DateText ); HolderBox.appendChild( DateHtml ); DateHtml = document.createElement( "description" ); var dueDate = new Date( toDoItem.due.getTime() ); DateText = document.createTextNode( "Due Date: "+gCalendarWindow.dateFormater.getFormatedDate( dueDate ) ); DateHtml.appendChild( DateText ); HolderBox.appendChild( DateHtml ); if (toDoItem.description) { var DescriptionHtml = document.createElement( "description" ); var DescriptionText = document.createTextNode( "Description: "+toDoItem.description ); DescriptionHtml.appendChild( DescriptionText ); HolderBox.appendChild( DescriptionHtml ); } Html.appendChild( HolderBox ); } } |
Html.appendChild( HolderBox ); | var DateHtml = document.createElement( "description" ); var startDate = new Date( toDoItem.start.getTime() ); var DateText = document.createTextNode( "Start Date: "+gCalendarWindow.dateFormater.getFormatedDate( startDate ) ); DateHtml.appendChild( DateText ); HolderBox.appendChild( DateHtml ); DateHtml = document.createElement( "description" ); var dueDate = new Date( toDoItem.due.getTime() ); DateText = document.createTextNode( "Due Date: "+gCalendarWindow.dateFormater.getFormatedDate( dueDate ) ); DateHtml.appendChild( DateText ); HolderBox.appendChild( DateHtml ); if (toDoItem.description) { var DescriptionHtml = document.createElement( "description" ); var DescriptionText = document.createTextNode( "Description: "+toDoItem.description ); DescriptionHtml.appendChild( DescriptionText ); HolderBox.appendChild( DescriptionHtml ); } Html.appendChild( HolderBox ); | function changeToolTipTextForToDo( event ){ var toDoItem = getToDoFromEvent( event ); var Html = document.getElementById( "savetip" ); while( Html.hasChildNodes() ) { Html.removeChild( Html.firstChild ); } var HolderBox = document.createElement( "vbox" ); if( toDoItem ) { if (toDoItem.title) { var TitleHtml = document.createElement( "description" ); var TitleText = document.createTextNode( "Title: "+toDoItem.title ); TitleHtml.appendChild( TitleText ); HolderBox.appendChild( TitleHtml ); } var DateHtml = document.createElement( "description" ); var startDate = new Date( toDoItem.start.getTime() ); var DateText = document.createTextNode( "Start Date: "+gCalendarWindow.dateFormater.getFormatedDate( startDate ) ); DateHtml.appendChild( DateText ); HolderBox.appendChild( DateHtml ); DateHtml = document.createElement( "description" ); var dueDate = new Date( toDoItem.due.getTime() ); DateText = document.createTextNode( "Due Date: "+gCalendarWindow.dateFormater.getFormatedDate( dueDate ) ); DateHtml.appendChild( DateText ); HolderBox.appendChild( DateHtml ); if (toDoItem.description) { var DescriptionHtml = document.createElement( "description" ); var DescriptionText = document.createTextNode( "Description: "+toDoItem.description ); DescriptionHtml.appendChild( DescriptionText ); HolderBox.appendChild( DescriptionHtml ); } Html.appendChild( HolderBox ); } } |
if( holderBox ) | if( holderBox ) { | function changeToolTipTextForToDo( event ){ var toDoItem = getToDoFromEvent( event ); var toolTip = document.getElementById( "taskTreeTooltip" ); while( toolTip.hasChildNodes() ) { toolTip.removeChild( toolTip.firstChild ); } var holderBox = getPreviewForTask( toDoItem ); if( holderBox ) toolTip.appendChild( holderBox );} |
return true; } else { return false; } | function changeToolTipTextForToDo( event ){ var toDoItem = getToDoFromEvent( event ); var toolTip = document.getElementById( "taskTreeTooltip" ); while( toolTip.hasChildNodes() ) { toolTip.removeChild( toolTip.firstChild ); } var holderBox = getPreviewForTask( toDoItem ); if( holderBox ) toolTip.appendChild( holderBox );} |
|
var i; var ocspEntry; | function changeURL(){ var signersMenu = document.getElementById("signingCA"); var signersURL = document.getElementById("serviceURL"); var CA = signersMenu.getAttribute("value"); for (i=0; i < ocspResponders.Count(); i++) { ocspEntry = ocspResponders.GetElementAt(i).QueryInterface(nsIOCSPResponder); if (CA == ocspEntry.responseSigner) { signersURL.setAttribute("value", ocspEntry.serviceURL); break; } }} |
|
this.parent.parent.sendData ("MODE " + this.parent.name + " -l\n"); | { this.parent.parent.sendData ("MODE " + this.parent.encodedName + " -l\n"); } | function chanm_limit (n){ if (!this.parent.users[this.parent.parent.me.nick].isOp) return false; if ((typeof n == "undefined") || (n <= 0)) this.parent.parent.sendData ("MODE " + this.parent.name + " -l\n"); else this.parent.parent.sendData ("MODE " + this.parent.name + " +l " + Number(n) + "\n"); return true; } |
this.parent.parent.sendData ("MODE " + this.parent.name + " +l " + | { this.parent.parent.sendData ("MODE " + this.parent.encodedName + " +l " + | function chanm_limit (n){ if (!this.parent.users[this.parent.parent.me.nick].isOp) return false; if ((typeof n == "undefined") || (n <= 0)) this.parent.parent.sendData ("MODE " + this.parent.name + " -l\n"); else this.parent.parent.sendData ("MODE " + this.parent.name + " +l " + Number(n) + "\n"); return true; } |
} | function chanm_limit (n){ if (!this.parent.users[this.parent.parent.me.nick].isOp) return false; if ((typeof n == "undefined") || (n <= 0)) this.parent.parent.sendData ("MODE " + this.parent.name + " -l\n"); else this.parent.parent.sendData ("MODE " + this.parent.name + " +l " + Number(n) + "\n"); return true; } |
|
this.parent.parent.sendData ("MODE " + this.parent.name + " +k " + | this.parent.parent.sendData ("MODE " + this.parent.encodedName + " +k " + | function chanm_lock (k){ if (!this.parent.users[this.parent.parent.me.nick].isOp) return false; this.parent.parent.sendData ("MODE " + this.parent.name + " +k " + k + "\n"); return true; } |
this.parent.parent.sendData ("MODE " + this.parent.name + " " + | this.parent.parent.sendData ("MODE " + this.parent.encodedName + " " + | function chanm_mode (modestr){ if (!this.parent.users[this.parent.parent.me.nick].isOp) return false; this.parent.parent.sendData ("MODE " + this.parent.name + " " + modestr + "\n"); return true; } |
[net, mtype, c.name, mode, | [net, mtype, c.unicodeName, mode, | function channelStatus (c) { var cu; var net = c.parent.parent.name; if ((cu = c.users[c.parent.me.nick])) { var mtype; if (cu.isOp && cu.isVoice) mtype = getMsg("cli_istatusBoth"); else if (cu.isOp) mtype = getMsg("cli_istatusOperator"); else if (cu.isVoice) mtype = getMsg("cli_istatusVoiced"); else mtype = getMsg("cli_istatusMember"); var mode = c.mode.getModeStr(); if (!mode) mode = getMsg("cli_istatusNoMode"); client.currentObject.display (getMsg("cli_istatusChannelOn", [net, mtype, c.name, mode, "irc://" + escape(net) + "/" + escape(c.name) + "/"]), "STATUS"); client.currentObject.display (getMsg("cli_istatusChannelDetail", [net, c.name, c.getUsersLength(), c.opCount, c.voiceCount]), "STATUS"); if (c.topic) client.currentObject.display (getMsg("cli_istatusChannelTopic", [net, c.name, c.topic]), "STATUS"); else client.currentObject.display (getMsg("cli_istatusChannelNoTopic", [net, c.name]), "STATUS"); } else client.currentObject.display (getMsg("cli_istatusChannelOff", [net, c.name]), "STATUS"); } |
escape(c.name) + "/"]), | escape(c.encodedName) + "/"]), | function channelStatus (c) { var cu; var net = c.parent.parent.name; if ((cu = c.users[c.parent.me.nick])) { var mtype; if (cu.isOp && cu.isVoice) mtype = getMsg("cli_istatusBoth"); else if (cu.isOp) mtype = getMsg("cli_istatusOperator"); else if (cu.isVoice) mtype = getMsg("cli_istatusVoiced"); else mtype = getMsg("cli_istatusMember"); var mode = c.mode.getModeStr(); if (!mode) mode = getMsg("cli_istatusNoMode"); client.currentObject.display (getMsg("cli_istatusChannelOn", [net, mtype, c.name, mode, "irc://" + escape(net) + "/" + escape(c.name) + "/"]), "STATUS"); client.currentObject.display (getMsg("cli_istatusChannelDetail", [net, c.name, c.getUsersLength(), c.opCount, c.voiceCount]), "STATUS"); if (c.topic) client.currentObject.display (getMsg("cli_istatusChannelTopic", [net, c.name, c.topic]), "STATUS"); else client.currentObject.display (getMsg("cli_istatusChannelNoTopic", [net, c.name]), "STATUS"); } else client.currentObject.display (getMsg("cli_istatusChannelOff", [net, c.name]), "STATUS"); } |
[net, c.name, | [net, c.unicodeName, | function channelStatus (c) { var cu; var net = c.parent.parent.name; if ((cu = c.users[c.parent.me.nick])) { var mtype; if (cu.isOp && cu.isVoice) mtype = getMsg("cli_istatusBoth"); else if (cu.isOp) mtype = getMsg("cli_istatusOperator"); else if (cu.isVoice) mtype = getMsg("cli_istatusVoiced"); else mtype = getMsg("cli_istatusMember"); var mode = c.mode.getModeStr(); if (!mode) mode = getMsg("cli_istatusNoMode"); client.currentObject.display (getMsg("cli_istatusChannelOn", [net, mtype, c.name, mode, "irc://" + escape(net) + "/" + escape(c.name) + "/"]), "STATUS"); client.currentObject.display (getMsg("cli_istatusChannelDetail", [net, c.name, c.getUsersLength(), c.opCount, c.voiceCount]), "STATUS"); if (c.topic) client.currentObject.display (getMsg("cli_istatusChannelTopic", [net, c.name, c.topic]), "STATUS"); else client.currentObject.display (getMsg("cli_istatusChannelNoTopic", [net, c.name]), "STATUS"); } else client.currentObject.display (getMsg("cli_istatusChannelOff", [net, c.name]), "STATUS"); } |
[net, c.name, c.topic]), | [net, c.unicodeName, c.topic]), | function channelStatus (c) { var cu; var net = c.parent.parent.name; if ((cu = c.users[c.parent.me.nick])) { var mtype; if (cu.isOp && cu.isVoice) mtype = getMsg("cli_istatusBoth"); else if (cu.isOp) mtype = getMsg("cli_istatusOperator"); else if (cu.isVoice) mtype = getMsg("cli_istatusVoiced"); else mtype = getMsg("cli_istatusMember"); var mode = c.mode.getModeStr(); if (!mode) mode = getMsg("cli_istatusNoMode"); client.currentObject.display (getMsg("cli_istatusChannelOn", [net, mtype, c.name, mode, "irc://" + escape(net) + "/" + escape(c.name) + "/"]), "STATUS"); client.currentObject.display (getMsg("cli_istatusChannelDetail", [net, c.name, c.getUsersLength(), c.opCount, c.voiceCount]), "STATUS"); if (c.topic) client.currentObject.display (getMsg("cli_istatusChannelTopic", [net, c.name, c.topic]), "STATUS"); else client.currentObject.display (getMsg("cli_istatusChannelNoTopic", [net, c.name]), "STATUS"); } else client.currentObject.display (getMsg("cli_istatusChannelOff", [net, c.name]), "STATUS"); } |
[net, c.name]), "STATUS"); | [net, c.unicodeName]), "STATUS"); | function channelStatus (c) { var cu; var net = c.parent.parent.name; if ((cu = c.users[c.parent.me.nick])) { var mtype; if (cu.isOp && cu.isVoice) mtype = getMsg("cli_istatusBoth"); else if (cu.isOp) mtype = getMsg("cli_istatusOperator"); else if (cu.isVoice) mtype = getMsg("cli_istatusVoiced"); else mtype = getMsg("cli_istatusMember"); var mode = c.mode.getModeStr(); if (!mode) mode = getMsg("cli_istatusNoMode"); client.currentObject.display (getMsg("cli_istatusChannelOn", [net, mtype, c.name, mode, "irc://" + escape(net) + "/" + escape(c.name) + "/"]), "STATUS"); client.currentObject.display (getMsg("cli_istatusChannelDetail", [net, c.name, c.getUsersLength(), c.opCount, c.voiceCount]), "STATUS"); if (c.topic) client.currentObject.display (getMsg("cli_istatusChannelTopic", [net, c.name, c.topic]), "STATUS"); else client.currentObject.display (getMsg("cli_istatusChannelNoTopic", [net, c.name]), "STATUS"); } else client.currentObject.display (getMsg("cli_istatusChannelOff", [net, c.name]), "STATUS"); } |
rv = "Operator"; | rv = getMsg("channelStatusMsg"); | function channelStatus (c) { var rv = ""; var cu; if ((cu = c.users[c.parent.me.nick])) { if (cu.isOp) rv = "Operator"; if (cu.isVoice) rv = (rv) ? rv + " and voiced" : "Voiced"; if (rv) rv += " m"; else rv += "M"; rv += "ember of " + c.name + ", with " + c.getUsersLength() + " users total, " + c.opCount + " operators, " + c.voiceCount + " voiced."; if (c.topic) rv += "\n" + c.name + ": ``" + c.topic + "''."; } else rv = "No longer a member of " + c.name; client.currentObject.display(rv, "STATUS"); } |
rv = (rv) ? rv + " and voiced" : "Voiced"; | rv += (rv) ? getMsg("channelStatusMsg2a") : getMsg("channelStatusMsg2b"); | function channelStatus (c) { var rv = ""; var cu; if ((cu = c.users[c.parent.me.nick])) { if (cu.isOp) rv = "Operator"; if (cu.isVoice) rv = (rv) ? rv + " and voiced" : "Voiced"; if (rv) rv += " m"; else rv += "M"; rv += "ember of " + c.name + ", with " + c.getUsersLength() + " users total, " + c.opCount + " operators, " + c.voiceCount + " voiced."; if (c.topic) rv += "\n" + c.name + ": ``" + c.topic + "''."; } else rv = "No longer a member of " + c.name; client.currentObject.display(rv, "STATUS"); } |
rv += " m"; | rv += getMsg("channelStatusMsg3"); | function channelStatus (c) { var rv = ""; var cu; if ((cu = c.users[c.parent.me.nick])) { if (cu.isOp) rv = "Operator"; if (cu.isVoice) rv = (rv) ? rv + " and voiced" : "Voiced"; if (rv) rv += " m"; else rv += "M"; rv += "ember of " + c.name + ", with " + c.getUsersLength() + " users total, " + c.opCount + " operators, " + c.voiceCount + " voiced."; if (c.topic) rv += "\n" + c.name + ": ``" + c.topic + "''."; } else rv = "No longer a member of " + c.name; client.currentObject.display(rv, "STATUS"); } |
rv += "M"; rv += "ember of " + c.name + ", with " + c.getUsersLength() + " users total, " + c.opCount + " operators, " + c.voiceCount + " voiced."; | rv += getMsg("channelStatusMsg4"); rv += getMsg("channelStatusMsg5",[c.name, c.getUsersLength(), c.opCount, c.voiceCount]); | function channelStatus (c) { var rv = ""; var cu; if ((cu = c.users[c.parent.me.nick])) { if (cu.isOp) rv = "Operator"; if (cu.isVoice) rv = (rv) ? rv + " and voiced" : "Voiced"; if (rv) rv += " m"; else rv += "M"; rv += "ember of " + c.name + ", with " + c.getUsersLength() + " users total, " + c.opCount + " operators, " + c.voiceCount + " voiced."; if (c.topic) rv += "\n" + c.name + ": ``" + c.topic + "''."; } else rv = "No longer a member of " + c.name; client.currentObject.display(rv, "STATUS"); } |
rv = "No longer a member of " + c.name; | rv = getMsg("channelStatusMsg6", c.name); | function channelStatus (c) { var rv = ""; var cu; if ((cu = c.users[c.parent.me.nick])) { if (cu.isOp) rv = "Operator"; if (cu.isVoice) rv = (rv) ? rv + " and voiced" : "Voiced"; if (rv) rv += " m"; else rv += "M"; rv += "ember of " + c.name + ", with " + c.getUsersLength() + " users total, " + c.opCount + " operators, " + c.voiceCount + " voiced."; if (c.topic) rv += "\n" + c.name + ": ``" + c.topic + "''."; } else rv = "No longer a member of " + c.name; client.currentObject.display(rv, "STATUS"); } |
(promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1), | (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1) + (allowDontSave ? (promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_2) : 0), null, null, | function CheckAndSaveDocument(reasonToSave, allowDontSave){ var document = editorShell.editorDocument; if (!editorShell.documentModified) return true; // call window.focus, since we need to pop up a dialog // and therefore need to be visible (to prevent user confusion) window.focus(); var title = window.editorShell.editorDocument.title; if (!title) title = GetString("untitled"); var dialogTitle = window.editorShell.GetString("SaveDocument"); var dialogMsg = window.editorShell.GetString("SaveFilePrompt"); dialogMsg = (dialogMsg.replace(/%title%/,title)).replace(/%reason%/,reasonToSave); var result = {value:0}; promptService.confirmEx(window, dialogTitle, dialogMsg, (promptService.BUTTON_TITLE_SAVE * promptService.BUTTON_POS_0) + (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1), (allowDontSave ? window.editorShell.GetString("DontSave") : null), null, {value:0}, result); if (result.value == 0) { // Save var success = window.editorShell.saveDocument(false, false, window.gDefaultSaveMimeType); return success; } if (result.value == 2) // "Don't Save" return true; // Default or result.value == 1 (Cancel) return false;} |
contentsMIMEType = "text/html"; | contentsMIMEType = kHTMLMimeType; | function CheckAndSaveDocument(command, allowDontSave){ var document; try { // if we don't have an editor or an document, bail if (!gEditor) return true; document = gEditor.document; if (!document) return true; } catch (e) { return true; } if (!gEditor.documentModified && !gHTMLSourceChanged) return true; // call window.focus, since we need to pop up a dialog // and therefore need to be visible (to prevent user confusion) window.focus(); var scheme = GetScheme(GetDocumentUrl()); var doPublish = (scheme && scheme != "file"); var strID; switch (command) { case "cmd_close": strID = "BeforeClosing"; break; case "cmd_preview": strID = "BeforePreview"; break; case "cmd_editSendPage": strID = "SendPageReason"; break; case "cmd_validate": strID = "BeforeValidate"; break; } var reasonToSave = strID ? GetString(strID) : ""; var title = document.title; if (!title) title = GetString("untitled"); var dialogTitle = GetString(doPublish ? "PublishPage" : "SaveDocument"); var dialogMsg = GetString(doPublish ? "PublishPrompt" : "SaveFilePrompt"); dialogMsg = (dialogMsg.replace(/%title%/,title)).replace(/%reason%/,reasonToSave); var promptService = GetPromptService(); if (!promptService) return false; var result = {value:0}; var promptFlags = promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1; var button1Title = null; var button3Title = null; if (doPublish) { promptFlags += promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0; button1Title = GetString("Publish"); button3Title = GetString("DontPublish"); } else { promptFlags += promptService.BUTTON_TITLE_SAVE * promptService.BUTTON_POS_0; } // If allowing "Don't..." button, add that if (allowDontSave) promptFlags += doPublish ? (promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_2) : (promptService.BUTTON_TITLE_DONT_SAVE * promptService.BUTTON_POS_2); result = promptService.confirmEx(window, dialogTitle, dialogMsg, promptFlags, button1Title, null, button3Title, null, {value:0}); if (result == 0) { // Save, but first finish HTML source mode if (gHTMLSourceChanged) { try { FinishHTMLSource(); } catch (e) { return false;} } if (doPublish) { // We save the command the user wanted to do in a global // and return as if user canceled because publishing is asynchronous // This command will be fired when publishing finishes gCommandAfterPublishing = command; goDoCommand("cmd_publish"); return false; } // Save to local disk var contentsMIMEType; if (isHTMLEditor()) contentsMIMEType = "text/html"; else contentsMIMEType = "text/plain"; var success = SaveDocument(false, false, contentsMIMEType); return success; } if (result == 2) // "Don't Save" return true; // Default or result == 1 (Cancel) return false;} |
contentsMIMEType = "text/plain"; | contentsMIMEType = kTextMimeType; | function CheckAndSaveDocument(command, allowDontSave){ var document; try { // if we don't have an editor or an document, bail if (!gEditor) return true; document = gEditor.document; if (!document) return true; } catch (e) { return true; } if (!gEditor.documentModified && !gHTMLSourceChanged) return true; // call window.focus, since we need to pop up a dialog // and therefore need to be visible (to prevent user confusion) window.focus(); var scheme = GetScheme(GetDocumentUrl()); var doPublish = (scheme && scheme != "file"); var strID; switch (command) { case "cmd_close": strID = "BeforeClosing"; break; case "cmd_preview": strID = "BeforePreview"; break; case "cmd_editSendPage": strID = "SendPageReason"; break; case "cmd_validate": strID = "BeforeValidate"; break; } var reasonToSave = strID ? GetString(strID) : ""; var title = document.title; if (!title) title = GetString("untitled"); var dialogTitle = GetString(doPublish ? "PublishPage" : "SaveDocument"); var dialogMsg = GetString(doPublish ? "PublishPrompt" : "SaveFilePrompt"); dialogMsg = (dialogMsg.replace(/%title%/,title)).replace(/%reason%/,reasonToSave); var promptService = GetPromptService(); if (!promptService) return false; var result = {value:0}; var promptFlags = promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1; var button1Title = null; var button3Title = null; if (doPublish) { promptFlags += promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0; button1Title = GetString("Publish"); button3Title = GetString("DontPublish"); } else { promptFlags += promptService.BUTTON_TITLE_SAVE * promptService.BUTTON_POS_0; } // If allowing "Don't..." button, add that if (allowDontSave) promptFlags += doPublish ? (promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_2) : (promptService.BUTTON_TITLE_DONT_SAVE * promptService.BUTTON_POS_2); result = promptService.confirmEx(window, dialogTitle, dialogMsg, promptFlags, button1Title, null, button3Title, null, {value:0}); if (result == 0) { // Save, but first finish HTML source mode if (gHTMLSourceChanged) { try { FinishHTMLSource(); } catch (e) { return false;} } if (doPublish) { // We save the command the user wanted to do in a global // and return as if user canceled because publishing is asynchronous // This command will be fired when publishing finishes gCommandAfterPublishing = command; goDoCommand("cmd_publish"); return false; } // Save to local disk var contentsMIMEType; if (isHTMLEditor()) contentsMIMEType = "text/html"; else contentsMIMEType = "text/plain"; var success = SaveDocument(false, false, contentsMIMEType); return success; } if (result == 2) // "Don't Save" return true; // Default or result == 1 (Cancel) return false;} |
function CheckAttributeNameSimilarity(attName) | function CheckAttributeNameSimilarity(attName, attArray) | function CheckAttributeNameSimilarity(attName){ for(i = 0; i < elAttrs.length; i++) { if(attName == elAttrs[i]) return false; } return true;} |
for(i = 0; i < elAttrs.length; i++) | for(var i = 0; i < attArray.length; i++) | function CheckAttributeNameSimilarity(attName){ for(i = 0; i < elAttrs.length; i++) { if(attName == elAttrs[i]) return false; } return true;} |
if(attName == elAttrs[i]) | if(attName == attArray[i]) | function CheckAttributeNameSimilarity(attName){ for(i = 0; i < elAttrs.length; i++) { if(attName == elAttrs[i]) return false; } return true;} |
if(completed) { newTodo.completedDate = jsDateToDateTime(new Date()); newTodo.percentComplete = 100; } else { newTodo.completedDate = null; if (newTodo.percentComplete == 100) newTodo.percentComplete = 0; } | newTodo.isCompleted = completed; | function checkboxClick(thisTodo, completed){ var newTodo = thisTodo.clone().QueryInterface(Components.interfaces.calITodo); if(completed) { newTodo.completedDate = jsDateToDateTime(new Date()); newTodo.percentComplete = 100; } else { newTodo.completedDate = null; if (newTodo.percentComplete == 100) newTodo.percentComplete = 0; } doTransaction('modify', newTodo, newTodo.calendar, thisTodo, null);} |
var value = element.value; if (value && value.length > 0) { value = value.replace(/[^\.|^0-9]/g,""); if (!value) value = ""; element.value = value; } | element.value = element.value.replace(/[^.0-9]/g, ""); | function checkDouble(element){ var value = element.value; if (value && value.length > 0) { value = value.replace(/[^\.|^0-9]/g,""); if (!value) value = ""; element.value = value; }} |
var engineValue = engineList.value; | var engineValue = engineList.label; | function checkEngine(){ var engineList = document.getElementById("engineList"); var engineValue = engineList.value; if (!engineValue) engineList.selectedIndex = 6; } |
var selectedItem = engineListSelection.length ? engineListSelection[0] : null; | var selectedItem = engineListSelection.item(0); | function checkEngine(){ var engineList = document.getElementById("engineList"); var engineValue = engineList.label; //nothing is selected if (!engineValue) { try { var strDefaultSearchEngineName = parent.hPrefWindow.getPref("localizedstring", "browser.search.defaultenginename"); var engineListSelection = engineList.getElementsByAttribute( "label", strDefaultSearchEngineName ); var selectedItem = engineListSelection.length ? engineListSelection[0] : null; if (selectedItem) { //select a locale-dependent predefined search engine in absence of a user default engineList.selectedItem = selectedItem; } else { //select the first listed search engine engineList.selectedIndex = 1; } } catch(e) { //select the first listed search engine engineList.selectedIndex = 1; } }} |
var windowManager = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'].getService(); | var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(); | function checkFocusedWindow(){ var windowManager = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'].getService(); var windowManagerInterface = windowManager.QueryInterface(nsIWindowMediator); var sep = document.getElementById("sep-window-list"); // Using double parens to avoid warning while ((sep = sep.nextSibling)) { var url = sep.getAttribute('id'); var win = windowManagerInterface.getWindowForResource(url); if (win == window) { sep.setAttribute("checked", "true"); break; } }} |
while (sep = sep.nextSibling) { | while ((sep = sep.nextSibling)) { | function checkFocusedWindow(){ var windowManager = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'].getService(); var windowManagerInterface = windowManager.QueryInterface(Components.interfaces.nsIWindowMediator); var sep = document.getElementById("sep-window-list"); while (sep = sep.nextSibling) { var url = sep.getAttribute('id'); var win = windowManagerInterface.getWindowForResource(url); if (win == window) { sep.setAttribute("checked", "true"); break; } }} |
manger.focus(); | manager.focus(); | checkForAddonUpdates: function () { var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]. getService(Components.interfaces.nsIWindowMediator); var manager = wm.getMostRecentWindow("Extension:Manager-extensions"); if (!manager) { const features = "chrome,centerscreen,dialog,titlebar"; const URI_EXTENSIONS_WINDOW = "chrome://mozapps/content/extensions/extensions.xul?type=extensions"; openDialog(URI_EXTENSIONS_WINDOW, "", features, "updatecheck"); } else { manager.performUpdate(); manger.focus(); } }, |
try { Components.classes["@mozilla.org/winhooks;1"] .getService(Components.interfaces.nsIWindowsHooks) .checkSettings(window); } catch(e) { | const NS_WINHOOKS_CONTRACTID = "@mozilla.org/winhooks;1"; if (NS_WINHOOKS_CONTRACTID in Components.classes) { try { Components.classes[NS_WINHOOKS_CONTRACTID] .getService(Components.interfaces.nsIWindowsHooks) .checkSettings(window); } catch(e) { } | function checkForDefaultBrowser(){ try { Components.classes["@mozilla.org/winhooks;1"] .getService(Components.interfaces.nsIWindowsHooks) .checkSettings(window); } catch(e) { }} |
if ( "HTTPIndex" in _content && _content.HTTPIndex instanceof Components.interfaces.nsIHTTPIndex ) { _content.defaultCharacterset = getMarkupDocumentViewer().defaultCharacterSet; | if ( "HTTPIndex" in content && content.HTTPIndex instanceof Components.interfaces.nsIHTTPIndex ) { content.defaultCharacterset = getMarkupDocumentViewer().defaultCharacterSet; | function checkForDirectoryListing(){ if ( "HTTPIndex" in _content && _content.HTTPIndex instanceof Components.interfaces.nsIHTTPIndex ) { _content.defaultCharacterset = getMarkupDocumentViewer().defaultCharacterSet; }} |
var accountData = parent.currentAccountData; | var accountData = parent.gCurrentAccountData; | function checkForDomain(){ var accountData = parent.currentAccountData; if (!accountData) return; if (!accountData.domain) return; // save in global variable currentDomain = accountData.domain; var postEmailText = document.getElementById("postEmailText"); postEmailText.setAttribute("value", "@" + currentDomain);} |
var imgInfo = imgType == "object" ? img.data : img.src; setInfo ("image-url", imgInfo); var size = getSize(imgInfo); | var imgURL = imgType == "object" ? img.data : img.src; setInfo("image-url", imgURL); var size = getSize(imgURL); | function checkForImage(elem, htmllocalname){ var img; var imgType; // "img" = <img> // "object" = <object> // "input" = <input type=image> // "background" = css background (to be added later) var ismap = false; if (htmllocalname === "img") { img = elem; imgType = "img"; } else if (htmllocalname === "object" && elem.type.substring(0,6) == "image/" && elem.data) { img = elem; imgType = "object"; } else if (htmllocalname === "input" && elem.type.toUpperCase() == "IMAGE") { img = elem; imgType = "input"; } else if (htmllocalname === "area" || htmllocalname === "a") { // Clicked in image map? var map = elem; ismap = true; setAlt(map); while (map && map.nodeType == Node.ELEMENT_NODE && !isHTMLElement(map,"map") ) map = map.parentNode; if (map && map.nodeType == Node.ELEMENT_NODE) { img = getImageForMap(map); var imgLocalName = img && img.localName.toLowerCase(); if (imgLocalName == "img" || imgLocalName == "object") { imgType = imgLocalName; } } } if (img) { var imgInfo = imgType == "object" ? img.data : img.src; setInfo ("image-url", imgInfo); var size = getSize(imgInfo); if (size != -1) { var kbSize = size / 1024; kbSize = Math.round(kbSize*100)/100; setInfo("image-filesize", gMetadataBundle.getFormattedString("imageSize", [kbSize, size])); } else { setInfo("image-filesize", gMetadataBundle.getString("imageSizeUnknown")); } if ("width" in img && img.width != "") { setInfo("image-width", gMetadataBundle.getFormattedString("imageWidth", [ img.width ])); setInfo("image-height", gMetadataBundle.getFormattedString("imageHeight", [ img.height ])); } else { setInfo("image-width", ""); setInfo("image-height", ""); } if (imgType == "img") { setInfo("image-desc", getAbsoluteURL(img.longDesc, img)); } else { setInfo("image-desc", ""); } onImage = true; } if (!ismap) { if (imgType == "img" || imgType == "input") { setAlt(img); } else { hideNode("image-alt"); } }} |
setInfo("image-desc", getAbsoluteURL(img.longDesc, img)); | setInfo("image-desc", img.longDesc); | function checkForImage(elem, htmllocalname){ var img; var imgType; // "img" = <img> // "object" = <object> // "input" = <input type=image> // "background" = css background (to be added later) var ismap = false; if (htmllocalname === "img") { img = elem; imgType = "img"; } else if (htmllocalname === "object" && elem.type.substring(0,6) == "image/" && elem.data) { img = elem; imgType = "object"; } else if (htmllocalname === "input" && elem.type.toUpperCase() == "IMAGE") { img = elem; imgType = "input"; } else if (htmllocalname === "area" || htmllocalname === "a") { // Clicked in image map? var map = elem; ismap = true; setAlt(map); while (map && map.nodeType == Node.ELEMENT_NODE && !isHTMLElement(map,"map") ) map = map.parentNode; if (map && map.nodeType == Node.ELEMENT_NODE) { img = getImageForMap(map); var imgLocalName = img && img.localName.toLowerCase(); if (imgLocalName == "img" || imgLocalName == "object") { imgType = imgLocalName; } } } if (img) { var imgURL = imgType == "object" ? img.data : img.src; setInfo("image-url", imgURL); var size = getSize(imgURL); if (size != -1) { var kbSize = size / 1024; kbSize = Math.round(kbSize*100)/100; setInfo("image-filesize", gMetadataBundle.getFormattedString("imageSize", [kbSize, size])); } else { setInfo("image-filesize", gMetadataBundle.getString("imageSizeUnknown")); } if ("width" in img && img.width != "") { setInfo("image-width", gMetadataBundle.getFormattedString("imageWidth", [ img.width ])); setInfo("image-height", gMetadataBundle.getFormattedString("imageHeight", [ img.height ])); } else { setInfo("image-width", ""); setInfo("image-height", ""); } if (imgType == "img") { setInfo("image-desc", getAbsoluteURL(img.longDesc, img)); } else { setInfo("image-desc", ""); } onImage = true; } if (!ismap) { if (imgType == "img" || imgType == "input") { setAlt(img); } else { hideNode("image-alt"); } }} |
element.setAttribute("style","display: inline;" ); | if (this.imageURL) { element.setAttribute("style","display: inline;" ); element.setAttribute("disabled","false" ); } else { element.setAttribute("style","display: none;" ); element.setAttribute("disabled","true" ); } | checkForImageBlocker: function () { pref = Components.classes['component://netscape/preferences']; pref = pref.getService(); pref = pref.QueryInterface(Components.interfaces.nsIPref); try { if (pref.GetBoolPref("imageblocker.enabled")) { var element = document.getElementById("context-blockimage"); element.setAttribute("style","display: inline;" ); } } catch(e) { } }, |
setInfo("insdel-cite", getAbsoluteURL(elem.cite, elem)); | setInfo("insdel-cite", elem.cite); | function checkForInsDel(elem, htmllocalname){ if ((htmllocalname === "ins" || htmllocalname === "del") && (elem.cite || elem.dateTime)) { setInfo("insdel-cite", getAbsoluteURL(elem.cite, elem)); setInfo("insdel-date", elem.dateTime); onInsDel = true; } } |
dump(parent.wizardManager.WSM); | function checkForInvalidAccounts(){ var firstInvalidAccount = getFirstInvalidAccount(); if (firstInvalidAccount) { var pageData = GetPageData(); dump("We have an invalid account, " + firstInvalidAccount + ", let's use that!\n"); gCurrentAccount = firstInvalidAccount; // there's a possibility that the invalid account has ISP defaults // as well.. so first pre-fill accountData with ISP info, then // overwrite it with the account data var identity = firstInvalidAccount.identities.QueryElementAt(0, nsIMsgIdentity); dump("Invalid account: trying to get ISP data for " + identity.email + "\n"); var accountData = getIspDefaultsForEmail(identity.email); dump("Invalid account: Got " + accountData + "\n"); // account -> accountData -> pageData accountData = AccountToAccountData(firstInvalidAccount, accountData); AccountDataToPageData(accountData, pageData); gCurrentAccountData = accountData; dump(parent.wizardManager.WSM); }} |
|
currentAccount = firstInvalidAccount; | gCurrentAccount = firstInvalidAccount; | function checkForInvalidAccounts(){ am = Components.classes["component://netscape/messenger/account-manager"].getService(Components.interfaces.nsIMsgAccountManager); var invalidAccounts = getInvalidAccounts(am.accounts); var firstInvalidAccount; if (invalidAccounts.length > 0) firstInvalidAccount = invalidAccounts[0]; else return null; if (firstInvalidAccount) { var pageData = GetPageData(); dump("We have an invalid account, " + firstInvalidAccount + ", let's use that!\n"); currentAccount = firstInvalidAccount; var accountData = AccountToAccountData(firstInvalidAccount); AccountDataToPageData(accountData, pageData); dump(parent.wizardManager.WSM); }} |
var accountData = AccountToAccountData(firstInvalidAccount); | var identity = firstInvalidAccount.identities.QueryElementAt(0, nsIMsgIdentity); dump("Invalid account: trying to get ISP data for " + identity.email + "\n"); var accountData = getIspDefaultsForEmail(identity.email); dump("Invalid account: Got " + accountData + "\n"); | function checkForInvalidAccounts(){ am = Components.classes["component://netscape/messenger/account-manager"].getService(Components.interfaces.nsIMsgAccountManager); var invalidAccounts = getInvalidAccounts(am.accounts); var firstInvalidAccount; if (invalidAccounts.length > 0) firstInvalidAccount = invalidAccounts[0]; else return null; if (firstInvalidAccount) { var pageData = GetPageData(); dump("We have an invalid account, " + firstInvalidAccount + ", let's use that!\n"); currentAccount = firstInvalidAccount; var accountData = AccountToAccountData(firstInvalidAccount); AccountDataToPageData(accountData, pageData); dump(parent.wizardManager.WSM); }} |
gCurrentAccountData = accountData; | function checkForInvalidAccounts(){ am = Components.classes["component://netscape/messenger/account-manager"].getService(Components.interfaces.nsIMsgAccountManager); var invalidAccounts = getInvalidAccounts(am.accounts); var firstInvalidAccount; if (invalidAccounts.length > 0) firstInvalidAccount = invalidAccounts[0]; else return null; if (firstInvalidAccount) { var pageData = GetPageData(); dump("We have an invalid account, " + firstInvalidAccount + ", let's use that!\n"); currentAccount = firstInvalidAccount; var accountData = AccountToAccountData(firstInvalidAccount); AccountDataToPageData(accountData, pageData); dump(parent.wizardManager.WSM); }} |
|
var account = getFirstInvalidAccount(am.accounts); | var invalidAccounts = getInvalidAccounts(am.accounts); var firstInvalidAccount; if (invalidAccounts.length > 0) firstInvalidAccount = invalidAccounts[0]; else return null; | function checkForInvalidAccounts(){ am = Components.classes["component://netscape/messenger/account-manager"].getService(Components.interfaces.nsIMsgAccountManager); var account = getFirstInvalidAccount(am.accounts); if (account) { var pageData = GetPageData(); dump("We have an invalid account, " + account + ", let's use that!\n"); currentAccount = account; var accountData = AccountToAccountData(account); AccountDataToPageData(accountData, pageData); dump(parent.wizardManager.WSM); }} |
if (account) { | if (firstInvalidAccount) { | function checkForInvalidAccounts(){ am = Components.classes["component://netscape/messenger/account-manager"].getService(Components.interfaces.nsIMsgAccountManager); var account = getFirstInvalidAccount(am.accounts); if (account) { var pageData = GetPageData(); dump("We have an invalid account, " + account + ", let's use that!\n"); currentAccount = account; var accountData = AccountToAccountData(account); AccountDataToPageData(accountData, pageData); dump(parent.wizardManager.WSM); }} |
dump("We have an invalid account, " + account + ", let's use that!\n"); currentAccount = account; | dump("We have an invalid account, " + firstInvalidAccount + ", let's use that!\n"); currentAccount = firstInvalidAccount; | function checkForInvalidAccounts(){ am = Components.classes["component://netscape/messenger/account-manager"].getService(Components.interfaces.nsIMsgAccountManager); var account = getFirstInvalidAccount(am.accounts); if (account) { var pageData = GetPageData(); dump("We have an invalid account, " + account + ", let's use that!\n"); currentAccount = account; var accountData = AccountToAccountData(account); AccountDataToPageData(accountData, pageData); dump(parent.wizardManager.WSM); }} |
var accountData = AccountToAccountData(account); | var accountData = AccountToAccountData(firstInvalidAccount); | function checkForInvalidAccounts(){ am = Components.classes["component://netscape/messenger/account-manager"].getService(Components.interfaces.nsIMsgAccountManager); var account = getFirstInvalidAccount(am.accounts); if (account) { var pageData = GetPageData(); dump("We have an invalid account, " + account + ", let's use that!\n"); currentAccount = account; var accountData = AccountToAccountData(account); AccountDataToPageData(accountData, pageData); dump(parent.wizardManager.WSM); }} |
am = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager); var invalidAccounts = getInvalidAccounts(am.accounts); var firstInvalidAccount; if (invalidAccounts.length > 0) firstInvalidAccount = invalidAccounts[0]; else return null; | var firstInvalidAccount = getFirstInvalidAccount(); | function checkForInvalidAccounts(){ am = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager); var invalidAccounts = getInvalidAccounts(am.accounts); var firstInvalidAccount; if (invalidAccounts.length > 0) firstInvalidAccount = invalidAccounts[0]; else return null; if (firstInvalidAccount) { var pageData = GetPageData(); dump("We have an invalid account, " + firstInvalidAccount + ", let's use that!\n"); gCurrentAccount = firstInvalidAccount; // there's a possibility that the invalid account has ISP defaults // as well.. so first pre-fill accountData with ISP info, then // overwrite it with the account data var identity = firstInvalidAccount.identities.QueryElementAt(0, nsIMsgIdentity); dump("Invalid account: trying to get ISP data for " + identity.email + "\n"); var accountData = getIspDefaultsForEmail(identity.email); dump("Invalid account: Got " + accountData + "\n"); // account -> accountData -> pageData accountData = AccountToAccountData(firstInvalidAccount, accountData); AccountDataToPageData(accountData, pageData); gCurrentAccountData = accountData; dump(parent.wizardManager.WSM); }} |
target = elem.target; | var target = elem.target; | function checkForLink(elem, htmllocalname){ if ((htmllocalname === "a" && elem.href != "") || htmllocalname === "area") { setInfo("link-lang", convertLanguageCode(elem.getAttribute("hreflang"))); setInfo("link-url", elem.href); setInfo("link-type", elem.getAttribute("type")); setInfo("link-rel", elem.getAttribute("rel")); setInfo("link-rev", elem.getAttribute("rev")); target = elem.target; switch (target) { case "_top": setInfo("link-target", gMetadataBundle.getString("sameWindowText")); break; case "_parent": setInfo("link-target", gMetadataBundle.getString("parentFrameText")); break; case "_blank": setInfo("link-target", gMetadataBundle.getString("newWindowText")); break; case "": case "_self": if (elem.ownerDocument != elem.ownerDocument.defaultView._content.document) setInfo("link-target", gMetadataBundle.getString("sameFrameText")); else setInfo("link-target", gMetadataBundle.getString("sameWindowText")); break; default: setInfo("link-target", "\"" + target + "\""); } onLink = true; } else if (elem.getAttributeNS(XLinkNS,"href") != "") { setInfo("link-url", getAbsoluteURL(elem.getAttributeNS(XLinkNS,"href"),elem)); setInfo("link-lang", ""); setInfo("link-type", ""); setInfo("link-rel", ""); setInfo("link-rev", ""); switch (elem.getAttributeNS(XLinkNS,"show")) { case "embed": setInfo("link-target", gMetadataBundle.getString("embeddedText")); break; case "new": setInfo("link-target", gMetadataBundle.getString("newWindowText")); break; case "": case "replace": if (elem.ownerDocument != elem.ownerDocument.defaultView._content.document) setInfo("link-target", gMetadataBundle.getString("sameFrameText")); else setInfo("link-target", gMetadataBundle.getString("sameWindowText")); break; default: setInfo("link-target", ""); break; } onLink = true; }} |
if (elem.ownerDocument != elem.ownerDocument.defaultView._content.document) | if (elem.ownerDocument != elem.ownerDocument.defaultView.content.document) | function checkForLink(elem, htmllocalname){ if ((htmllocalname === "a" && elem.href != "") || htmllocalname === "area") { setInfo("link-lang", convertLanguageCode(elem.getAttribute("hreflang"))); setInfo("link-url", elem.href); setInfo("link-type", elem.getAttribute("type")); setInfo("link-rel", elem.getAttribute("rel")); setInfo("link-rev", elem.getAttribute("rev")); var target = elem.target; switch (target) { case "_top": setInfo("link-target", gMetadataBundle.getString("sameWindowText")); break; case "_parent": setInfo("link-target", gMetadataBundle.getString("parentFrameText")); break; case "_blank": setInfo("link-target", gMetadataBundle.getString("newWindowText")); break; case "": case "_self": if (elem.ownerDocument != elem.ownerDocument.defaultView._content.document) setInfo("link-target", gMetadataBundle.getString("sameFrameText")); else setInfo("link-target", gMetadataBundle.getString("sameWindowText")); break; default: setInfo("link-target", "\"" + target + "\""); } onLink = true; } else if (elem.getAttributeNS(XLinkNS,"href") != "") { setInfo("link-url", getAbsoluteURL(elem.getAttributeNS(XLinkNS,"href"),elem)); setInfo("link-lang", ""); setInfo("link-type", ""); setInfo("link-rel", ""); setInfo("link-rev", ""); switch (elem.getAttributeNS(XLinkNS,"show")) { case "embed": setInfo("link-target", gMetadataBundle.getString("embeddedText")); break; case "new": setInfo("link-target", gMetadataBundle.getString("newWindowText")); break; case "": case "replace": if (elem.ownerDocument != elem.ownerDocument.defaultView._content.document) setInfo("link-target", gMetadataBundle.getString("sameFrameText")); else setInfo("link-target", gMetadataBundle.getString("sameWindowText")); break; default: setInfo("link-target", ""); break; } onLink = true; }} |
else if (elem.getAttributeNS(XLinkNS,"href") != "") { setInfo("link-url", getAbsoluteURL(elem.getAttributeNS(XLinkNS,"href"),elem)); | else if (elem.getAttributeNS(XLinkNS, "href") != "") { var ioService = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); var url = elem.getAttributeNS(XLinkNS, "href"); try { var baseURI = ioService.newURI(elem.baseURI, elem.ownerDocument.characterSet, null); url = ioService.newURI(url, elem.ownerDocument.characterSet, baseURI).spec; } catch (e) {} setInfo("link-url", url); | function checkForLink(elem, htmllocalname){ if ((htmllocalname === "a" && elem.href != "") || htmllocalname === "area") { setInfo("link-lang", convertLanguageCode(elem.getAttribute("hreflang"))); setInfo("link-url", elem.href); setInfo("link-type", elem.getAttribute("type")); setInfo("link-rel", elem.getAttribute("rel")); setInfo("link-rev", elem.getAttribute("rev")); var target = elem.target; switch (target) { case "_top": setInfo("link-target", gMetadataBundle.getString("sameWindowText")); break; case "_parent": setInfo("link-target", gMetadataBundle.getString("parentFrameText")); break; case "_blank": setInfo("link-target", gMetadataBundle.getString("newWindowText")); break; case "": case "_self": if (elem.ownerDocument.defaultView) { if (elem.ownerDocument != elem.ownerDocument.defaultView.content.document) setInfo("link-target", gMetadataBundle.getString("sameFrameText")); else setInfo("link-target", gMetadataBundle.getString("sameWindowText")); } else { hideNode("link-target"); } break; default: setInfo("link-target", "\"" + target + "\""); } onLink = true; } else if (elem.getAttributeNS(XLinkNS,"href") != "") { setInfo("link-url", getAbsoluteURL(elem.getAttributeNS(XLinkNS,"href"),elem)); setInfo("link-lang", ""); setInfo("link-type", ""); setInfo("link-rel", ""); setInfo("link-rev", ""); switch (elem.getAttributeNS(XLinkNS,"show")) { case "embed": setInfo("link-target", gMetadataBundle.getString("embeddedText")); break; case "new": setInfo("link-target", gMetadataBundle.getString("newWindowText")); break; case "": case "replace": if (elem.ownerDocument != elem.ownerDocument.defaultView.content.document) setInfo("link-target", gMetadataBundle.getString("sameFrameText")); else setInfo("link-target", gMetadataBundle.getString("sameWindowText")); break; default: setInfo("link-target", ""); break; } onLink = true; }} |
if (node.getAttribute("disabled") == "true") return; | function checkForMiddleClick(node, event){ if (event.button == 1) { /* Execute the node's oncommand. * * XXX: we should use node.oncommand(event) once bug 246720 is fixed. */ var fn = new Function("event", node.getAttribute("oncommand")); fn.call(node, event); // If the middle-click was on part of a menu, close the menu. // (Menus close automatically with left-click but not with middle-click.) closeMenus(event.target); }} |
|
dsURI = dsURI.replace(/%PLUGIN_MIMETYPE%/g, aPluginRequestItem.mimetype); | dsURI = dsURI.replace(/%PLUGIN_MIMETYPE%/g, encodeURIComponent(aPluginRequestItem.mimetype)); | checkForPlugin: function (aPluginRequestItem){ var dsURI = this.dsURI; dsURI = dsURI.replace(/%PLUGIN_MIMETYPE%/g, aPluginRequestItem.mimetype); dsURI = dsURI.replace(/%APP_ID%/g, this.appID); dsURI = dsURI.replace(/%APP_VERSION%/g, this.buildID); dsURI = dsURI.replace(/%CLIENT_OS%/g, this.clientOS); dsURI = dsURI.replace(/%CHROME_LOCALE%/g, this.chromeLocale); var ds = this._rdfService.GetDataSource(dsURI); var rds = ds.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource) if (rds.loaded) this.onDatasourceLoaded(ds, aPluginRequestItem); else { var sink = ds.QueryInterface(Components.interfaces.nsIRDFXMLSink); sink.addXMLSinkObserver(new nsPluginXMLRDFDSObserver(this, aPluginRequestItem)); } }, |
setInfo("quote-cite", getAbsoluteURL(elem.cite, elem)); | setInfo("quote-cite", elem.cite); | function checkForQuote(elem, htmllocalname){ if ((htmllocalname === "q" || htmllocalname === "blockquote") && elem.cite) { setInfo("quote-cite", getAbsoluteURL(elem.cite, elem)); onQuote = true; } } |
var am = Components.classes["@mozilla.org/messenger/account-manager;1"] .getService(Components.interfaces.nsIMsgAccountManager); var msgSendlater = Components.classes["@mozilla.org/messengercompose/sendlater;1"] .getService(Components.interfaces.nsIMsgSendLater); var identitiesCount, allIdentities, currentIdentity, numMessages, msgFolder; | try { var am = Components.classes["@mozilla.org/messenger/account-manager;1"] .getService(Components.interfaces.nsIMsgAccountManager); var msgSendlater = Components.classes["@mozilla.org/messengercompose/sendlater;1"] .getService(Components.interfaces.nsIMsgSendLater); var identitiesCount, allIdentities, currentIdentity, numMessages, msgFolder; | function CheckForUnsentMessages(){ var am = Components.classes["@mozilla.org/messenger/account-manager;1"] .getService(Components.interfaces.nsIMsgAccountManager); var msgSendlater = Components.classes["@mozilla.org/messengercompose/sendlater;1"] .getService(Components.interfaces.nsIMsgSendLater); var identitiesCount, allIdentities, currentIdentity, numMessages, msgFolder; if(am) { allIdentities = am.allIdentities; identitiesCount = allIdentities.Count(); for (var i = 0; i < identitiesCount; i++) { currentIdentity = allIdentities.QueryElementAt(i, Components.interfaces.nsIMsgIdentity); msgFolder = msgSendlater.getUnsentMessagesFolder(currentIdentity); if(msgFolder) { // if true, descends into all subfolders numMessages = msgFolder.getTotalMessages(false); if(numMessages > 0) return true; } } } return false;} |
if(am) { allIdentities = am.allIdentities; identitiesCount = allIdentities.Count(); for (var i = 0; i < identitiesCount; i++) { currentIdentity = allIdentities.QueryElementAt(i, Components.interfaces.nsIMsgIdentity); msgFolder = msgSendlater.getUnsentMessagesFolder(currentIdentity); if(msgFolder) { numMessages = msgFolder.getTotalMessages(false); if(numMessages > 0) return true; } } | if(am) { allIdentities = am.allIdentities; identitiesCount = allIdentities.Count(); for (var i = 0; i < identitiesCount; i++) { currentIdentity = allIdentities.QueryElementAt(i, Components.interfaces.nsIMsgIdentity); msgFolder = msgSendlater.getUnsentMessagesFolder(currentIdentity); if(msgFolder) { numMessages = msgFolder.getTotalMessages(false); if(numMessages > 0) return true; } } } } catch(ex) { | function CheckForUnsentMessages(){ var am = Components.classes["@mozilla.org/messenger/account-manager;1"] .getService(Components.interfaces.nsIMsgAccountManager); var msgSendlater = Components.classes["@mozilla.org/messengercompose/sendlater;1"] .getService(Components.interfaces.nsIMsgSendLater); var identitiesCount, allIdentities, currentIdentity, numMessages, msgFolder; if(am) { allIdentities = am.allIdentities; identitiesCount = allIdentities.Count(); for (var i = 0; i < identitiesCount; i++) { currentIdentity = allIdentities.QueryElementAt(i, Components.interfaces.nsIMsgIdentity); msgFolder = msgSendlater.getUnsentMessagesFolder(currentIdentity); if(msgFolder) { // if true, descends into all subfolders numMessages = msgFolder.getTotalMessages(false); if(numMessages > 0) return true; } } } return false;} |
getService(Components.interfaces.nsIPref); | getService(Components.interfaces.nsIPrefBranch); | checkForUpdate: function() { debug("checkForUpdate"); if (this.shouldCheckForUpdate()) { try { // get update ds URI from prefs var prefs = Components.classes["@mozilla.org/preferences-service;1"]. getService(Components.interfaces.nsIPref); var updateDatasourceURI = prefs. getLocalizedUnicharPref(kUNDatasourceURIPref); var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"]. getService(Components.interfaces.nsIRDFService); var ds = rdf.GetDataSource(updateDatasourceURI); ds = ds.QueryInterface(Components.interfaces.nsIRDFXMLSink); ds.addXMLSinkObserver(nsUpdateDatasourceObserver); } catch (ex) { debug("Exception getting updates.rdf: " + ex); } } }, |
getLocalizedUnicharPref(kUNDatasourceURIPref); | getComplexValue(kUNDatasourceURIPref, Components.interfaces.nsIPrefLocalizedString).data; | checkForUpdate: function() { debug("checkForUpdate"); if (this.shouldCheckForUpdate()) { try { // get update ds URI from prefs var prefs = Components.classes["@mozilla.org/preferences-service;1"]. getService(Components.interfaces.nsIPref); var updateDatasourceURI = prefs. getLocalizedUnicharPref(kUNDatasourceURIPref); var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"]. getService(Components.interfaces.nsIRDFService); var ds = rdf.GetDataSource(updateDatasourceURI); ds = ds.QueryInterface(Components.interfaces.nsIRDFXMLSink); ds.addXMLSinkObserver(nsUpdateDatasourceObserver); } catch (ex) { debug("Exception getting updates.rdf: " + ex); } } }, |
prompter.checkForUpdates(); | prompter.checkForUpdates(window); | checkForUpdates: function () { var prompter = Components.classes["@mozilla.org/updates/update-prompt;1"] .createInstance(Components.interfaces.nsIUpdatePrompt); prompter.checkForUpdates(); }, |
prompter.checkForUpdates(); | prompter.checkForUpdates(window); | function checkForUpdates(){ var prompter = Components.classes["@mozilla.org/updates/update-prompt;1"] .createInstance(Components.interfaces.nsIUpdatePrompt); prompter.checkForUpdates(); } |
element = document.getElementById("walletSafeFill"); element.setAttribute("style","display: none;" ); element.setAttribute("disabled","true" ); element = document.getElementById("walletQuickFill"); element.setAttribute("style","display: none;" ); element.setAttribute("disabled","true" ); element = document.getElementById("walletCapture"); element.setAttribute("style","display: none;" ); element.setAttribute("disabled","true" ); element = document.getElementById("walletSeparator"); | element = document.getElementById("wallet"); | function CheckForWallet(){ // remove wallet functions (unless overruled by the "wallet.enabled" pref) try { if (!this.pref.GetBoolPref("wallet.enabled")) { var element; element = document.getElementById("walletSafeFill"); element.setAttribute("style","display: none;" ); element.setAttribute("disabled","true" ); element = document.getElementById("walletQuickFill"); element.setAttribute("style","display: none;" ); element.setAttribute("disabled","true" ); element = document.getElementById("walletCapture"); element.setAttribute("style","display: none;" ); element.setAttribute("disabled","true" ); element = document.getElementById("walletSeparator"); element.setAttribute("style","display: none;" ); element.setAttribute("disabled","true" ); element = document.getElementById("walleteditor"); element.setAttribute("style","display: none;" ); element.setAttribute("disabled","true" ); element = document.getElementById("walletSamples"); element.setAttribute("style","display: none;" ); element.setAttribute("disabled","true" ); } } catch(e) { dump("wallet.enabled pref is missing from all.js"); }} |
var ok=document.getElementById('ok-button'); | function checkPasswords(){ var pw1=document.getElementById('pw1').value; var pw2=document.getElementById('pw2').value; var ok=document.getElementById('ok-button'); var oldpwbox = document.getElementById("oldpw"); if (oldpwbox) { var initpw = oldpwbox.getAttribute("inited"); if (initpw == "empty" && pw1 == "") { // The token has already been initialized, therefore this dialog // was called with the intention to change the password. // The token currently uses an empty password. // We will not allow changing the password from empty to empty. ok.setAttribute("disabled","true"); return; } } if (pw1 == pw2){ ok.setAttribute("disabled","false"); } else { ok.setAttribute("disabled","true"); }} |
|
ok.setAttribute("disabled","true"); | document.documentElement.getButton("accept").disabled = true; | function checkPasswords(){ var pw1=document.getElementById('pw1').value; var pw2=document.getElementById('pw2').value; var ok=document.getElementById('ok-button'); var oldpwbox = document.getElementById("oldpw"); if (oldpwbox) { var initpw = oldpwbox.getAttribute("inited"); if (initpw == "empty" && pw1 == "") { // The token has already been initialized, therefore this dialog // was called with the intention to change the password. // The token currently uses an empty password. // We will not allow changing the password from empty to empty. ok.setAttribute("disabled","true"); return; } } if (pw1 == pw2){ ok.setAttribute("disabled","false"); } else { ok.setAttribute("disabled","true"); }} |
if (pw1 == pw2){ ok.setAttribute("disabled","false"); } else { ok.setAttribute("disabled","true"); } | document.documentElement.getButton("accept").disabled = (pw1 != pw2); | function checkPasswords(){ var pw1=document.getElementById('pw1').value; var pw2=document.getElementById('pw2').value; var ok=document.getElementById('ok-button'); var oldpwbox = document.getElementById("oldpw"); if (oldpwbox) { var initpw = oldpwbox.getAttribute("inited"); if (initpw == "empty" && pw1 == "") { // The token has already been initialized, therefore this dialog // was called with the intention to change the password. // The token currently uses an empty password. // We will not allow changing the password from empty to empty. ok.setAttribute("disabled","true"); return; } } if (pw1 == pw2){ ok.setAttribute("disabled","false"); } else { ok.setAttribute("disabled","true"); }} |
if (!window) | if (!window || !("document" in window)) | function checkScroll(frame){ var window = getContentWindow(frame); if (!window) return false; return (window.document.height - window.innerHeight - window.pageYOffset) < 160;} |
var navWindow = getNavigatorWindow(); var resultsTree = navWindow._content.document.getElementById("internetresultstree"); if(resultsTree) { var treeref = resultsTree.getAttribute("ref"); var ds = resultsTree.database; if (ds && treeref) { try { var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); if (rdf) { var source = rdf.GetResource(treeref, true); var loadingProperty = rdf.GetResource("http: var target = ds.GetTarget(source, loadingProperty, true); if (target) target = target.QueryInterface(nsIRDFLiteral); if (target) target = target.Value; if (target == "true") { activeSearchFlag = true; } else { activeSearchFlag = false; } } } catch(ex) { activeSearchFlag = false; } } | var navWindow = getNavigatorWindow(false); if (navWindow) var resultsTree = navWindow._content.document.getElementById("internetresultstree"); if(resultsTree) { var treeref = resultsTree.getAttribute("ref"); var ds = resultsTree.database; if (ds && treeref) { try { var rdf = nsJSComponentManager.getService(RDFSERVICE_PROGID, "nsIRDFService"); if (rdf) { var source = rdf.GetResource(treeref, true); var loadingProperty = rdf.GetResource("http: var target = ds.GetTarget(source, loadingProperty, true); if (target) target = target.QueryInterface(nsIRDFLiteral); if (target) target = target.Value; activeSearchFlag = target == "true" ? true : false; } } catch(ex) { activeSearchFlag = false; } | function checkSearchProgress(){ var activeSearchFlag = false; var navWindow = getNavigatorWindow(); var resultsTree = navWindow._content.document.getElementById("internetresultstree"); if(resultsTree) { var treeref = resultsTree.getAttribute("ref"); var ds = resultsTree.database; if (ds && treeref) { try { var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); if (rdf) { var source = rdf.GetResource(treeref, true); var loadingProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#loading", true); var target = ds.GetTarget(source, loadingProperty, true); if (target) target = target.QueryInterface(nsIRDFLiteral); if (target) target = target.Value; if (target == "true") { activeSearchFlag = true; } else { activeSearchFlag = false; } } } catch(ex) { activeSearchFlag = false; } } } if( activeSearchFlag ) { setTimeout("checkSearchProgress()", 1000); } else { doStop(); } return(activeSearchFlag);} |
if( activeSearchFlag ) { setTimeout("checkSearchProgress()", 1000); } else { doStop(); } | } if (activeSearchFlag) setTimeout("checkSearchProgress()", 1000); else doStop(); | function checkSearchProgress(){ var activeSearchFlag = false; var navWindow = getNavigatorWindow(); var resultsTree = navWindow._content.document.getElementById("internetresultstree"); if(resultsTree) { var treeref = resultsTree.getAttribute("ref"); var ds = resultsTree.database; if (ds && treeref) { try { var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); if (rdf) { var source = rdf.GetResource(treeref, true); var loadingProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#loading", true); var target = ds.GetTarget(source, loadingProperty, true); if (target) target = target.QueryInterface(nsIRDFLiteral); if (target) target = target.Value; if (target == "true") { activeSearchFlag = true; } else { activeSearchFlag = false; } } } catch(ex) { activeSearchFlag = false; } } } if( activeSearchFlag ) { setTimeout("checkSearchProgress()", 1000); } else { doStop(); } return(activeSearchFlag);} |
var resultsTree = top._content.document.getElementById("internetresultstree"); | var navWindow = getNavigatorWindow(); var resultsTree = navWindow._content.document.getElementById("internetresultstree"); | function checkSearchProgress(){ var activeSearchFlag = false; var resultsTree = top._content.document.getElementById("internetresultstree"); if(resultsTree) { var treeref = resultsTree.getAttribute("ref"); var ds = resultsTree.database; if (ds && treeref) { try { var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); if (rdf) { var source = rdf.GetResource(treeref, true); var loadingProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#loading", true); var target = ds.GetTarget(source, loadingProperty, true); if (target) target = target.QueryInterface(nsIRDFLiteral); if (target) target = target.Value; if (target == "true") { activeSearchFlag = true; } else { activeSearchFlag = false; } } } catch(ex) { activeSearchFlag = false; } } } if( activeSearchFlag ) { setTimeout("checkSearchProgress()", 1000); } else { doStop(); } return(activeSearchFlag);} |
var CheckEndDate = checkEndDate(); var CheckEndTime = checkEndTime(); | var dateComparison = compareIgnoringTimeOfDay(gEndDate, gStartDate); | function checkSetTimeDate(){ var CheckEndDate = checkEndDate(); var CheckEndTime = checkEndTime(); if ( CheckEndDate < 0 ) { // end before start setDateError(true); setTimeError(false); return false; } else if ( CheckEndDate == 0 ) { setDateError(false); // start & end same setTimeError(CheckEndTime); return !CheckEndTime; } else { setDateError(false); setTimeError(false); return true; }} |
if ( CheckEndDate < 0 ) | if (dateComparison < 0 || (dateComparison == 0 && getFieldValue( "all-day-event-checkbox", "checked" ))) | function checkSetTimeDate(){ var CheckEndDate = checkEndDate(); var CheckEndTime = checkEndTime(); if ( CheckEndDate < 0 ) { // end before start setDateError(true); setTimeError(false); return false; } else if ( CheckEndDate == 0 ) { setDateError(false); // start & end same setTimeError(CheckEndTime); return !CheckEndTime; } else { setDateError(false); setTimeError(false); return true; }} |
else if ( CheckEndDate == 0 ) | else if (dateComparison == 0) | function checkSetTimeDate(){ var CheckEndDate = checkEndDate(); var CheckEndTime = checkEndTime(); if ( CheckEndDate < 0 ) { // end before start setDateError(true); setTimeError(false); return false; } else if ( CheckEndDate == 0 ) { setDateError(false); // start & end same setTimeError(CheckEndTime); return !CheckEndTime; } else { setDateError(false); setTimeError(false); return true; }} |
setTimeError(CheckEndTime); return !CheckEndTime; | var isBadEndTime = gEndDate.getTime() < gStartDate.getTime(); setTimeError(isBadEndTime); return !isBadEndTime; | function checkSetTimeDate(){ var CheckEndDate = checkEndDate(); var CheckEndTime = checkEndTime(); if ( CheckEndDate < 0 ) { // end before start setDateError(true); setTimeError(false); return false; } else if ( CheckEndDate == 0 ) { setDateError(false); // start & end same setTimeError(CheckEndTime); return !CheckEndTime; } else { setDateError(false); setTimeError(false); return true; }} |
var spellChecker = editorShell.QueryInterface(Components.interfaces.nsIEditorSpellCheck); if (spellChecker) { dump("Check Spelling starting...\n"); try { firstMisspelledWord = spellChecker.StartSpellChecking(); } catch(ex) { dump("*** Exception error: StartSpellChecking\n"); return; } if( firstMisspelledWord == "") { try { spellChecker.CloseSpellChecking(); } catch(ex) { dump("*** Exception error: CloseSpellChecking\n"); return; } editorShell.AlertWithTitle(editorShell.GetString("CheckSpelling"), editorShell.GetString("NoMisspelledWord")); } else { window.spellChecker = spellChecker; try { window.openDialog("chrome: } catch(ex) { dump("*** Exception error: SpellChecker Dialog Closing\n"); return; } } } contentWindow.focus(); | return _EditorObsolete(); | function CheckSpelling(){ var spellChecker = editorShell.QueryInterface(Components.interfaces.nsIEditorSpellCheck); if (spellChecker) { dump("Check Spelling starting...\n"); // Start the spell checker module. Return is first misspelled word try { firstMisspelledWord = spellChecker.StartSpellChecking(); } catch(ex) { dump("*** Exception error: StartSpellChecking\n"); return; } if( firstMisspelledWord == "") { try { spellChecker.CloseSpellChecking(); } catch(ex) { dump("*** Exception error: CloseSpellChecking\n"); return; } // No misspelled word - tell user editorShell.AlertWithTitle(editorShell.GetString("CheckSpelling"), editorShell.GetString("NoMisspelledWord")); } else { // Set spellChecker variable on window window.spellChecker = spellChecker; try { window.openDialog("chrome://editor/content/EdSpellCheck.xul", "_blank", "chrome,close,titlebar,modal", "", firstMisspelledWord); } catch(ex) { dump("*** Exception error: SpellChecker Dialog Closing\n"); return; } } } contentWindow.focus();} |
var testcases = win.testcases; for (var i = 0; i < testcases.length; i++) { var testcase = testcases[i]; cdump('testname: ' + testcase.name + ' ' + 'bug: ' + testcase.bugnumber + ' ' + (testcase.passed ? 'PASSED':'FAILED') + ' ' + 'description: ' + testcase.description + ' ' + 'expected: ' + testcase.expect + ' ' + 'actual: ' + testcase.actual + ' ' + 'reason: ' + testcase.reason); } | function checkTestCompleted(){ var win = gSpider.mDocument.defaultView; if (win.wrappedJSObject) { win = win.wrappedJSObject; } if (win.gPageCompleted) { gPageCompleted = true; } else { dlog('page not completed, recheck'); setTimeout(checkTestCompleted, gCheckInterval); } } |
|
if (!accountValues) return true; | function checkUserServerChanges(showAlert) { var accountValues = getValueArrayFor(currentServerId); var pageElements = getPageFormElements(); if (pageElements == null) return true; // Get the new username, hostname and type from the page var newUser, newHost, newType, oldUser, oldHost; var uIndx, hIndx; for (var i=0; i<pageElements.length; i++) { if (pageElements[i].id) { var vals = pageElements[i].id.split("."); if (vals.length >= 2) { var type = vals[0]; var slot = vals[1]; //dump("In checkUserServerChanges() ***: accountValues[" + type + "][" + slot + "] = " + getFormElementValue(pageElements[i]) + "/" + accountValues[type][slot] + "\n"); // if this type doesn't exist (just removed) then return. if (!(type in accountValues) || !accountValues[type]) return true; if (slot == "realHostName") { oldHost = accountValues[type][slot]; newHost = getFormElementValue(pageElements[i]); hIndx = i; } else if (slot == "realUsername") { oldUser = accountValues[type][slot]; newUser = getFormElementValue(pageElements[i]); uIndx = i; } else if (slot == "type") newType = getFormElementValue(pageElements[i]); } } } // There is no username defined for news so reset it. if (newType == "nntp") oldUser = newUser = ""; //dump("In checkUserServerChanges() *** Username = " + newUser + "/" + oldUser + "\n"); //dump("In checkUserServerChanges() *** Hostname = " + newHost + "/" + oldHost + "\n"); //dump("In checkUserServerChanges() *** Type = " + newType + "\n"); // If something is changed then check if the new user/host already exists. if ( (oldUser != newUser) || (oldHost != newHost) ) { var newServer = accountManager.findRealServer(newUser, newHost, newType); if (newServer) { if (showAlert) { var alertText = gPrefsBundle.getString("modifiedAccountExists"); window.alert(alertText); } // Restore the old values before return if (newType != "nntp") setFormElementValue(pageElements[uIndx], oldUser); setFormElementValue(pageElements[hIndx], oldHost); return false; } //dump("In checkUserServerChanges() Ah, Server not found !!!" + "\n"); // If username is changed remind users to change Your Name and Email Address. // If serve name is changed and has defined filters then remind users to edit rules. if (showAlert) { var account = getAccountFromServerId(currentServerId); var filterList; if (account && (newType != "nntp")) { var server = account.incomingServer; filterList = server.getFilterList(null); } var userChangeText, serverChangeText; if ( (oldHost != newHost) && (filterList != undefined) && filterList.filterCount ) serverChangeText = gPrefsBundle.getString("serverNameChanged"); if (oldUser != newUser) userChangeText = gPrefsBundle.getString("userNameChanged"); if ( (serverChangeText != undefined) && (userChangeText != undefined) ) serverChangeText = serverChangeText + "\n\n" + userChangeText; else if (userChangeText != undefined) serverChangeText = userChangeText; if (serverChangeText != undefined) window.alert(serverChangeText); } } return true;} |
|
if (! accountValues[type]) return true; | function checkUserServerChanges(showAlert) { var accountValues = getValueArrayFor(currentServerId); var pageElements = getPageFormElements(); if (pageElements == null) return true; // Get the new username, hostname and type from the page var newUser, newHost, newType, oldUser, oldHost; var uIndx, hIndx; for (var i=0; i<pageElements.length; i++) { if (pageElements[i].id) { var vals = pageElements[i].id.split("."); var type = vals[0]; var slot = vals[1]; //dump("In checkUserServerChanges() ***: accountValues[" + type + "][" + slot + "] = " + getFormElementValue(pageElements[i]) + "/" + accountValues[type][slot] + "\n"); if (slot == "realHostName") { oldHost = accountValues[type][slot]; newHost = getFormElementValue(pageElements[i]); hIndx = i; } else if (slot == "realUsername") { oldUser = accountValues[type][slot]; newUser = getFormElementValue(pageElements[i]); uIndx = i; } else if (slot == "type") newType = getFormElementValue(pageElements[i]); } } // There is no username defined for news so reset it. if (newType == "nntp") oldUser = newUser = ""; //dump("In checkUserServerChanges() *** Username = " + newUser + "/" + oldUser + "\n"); //dump("In checkUserServerChanges() *** Hostname = " + newHost + "/" + oldHost + "\n"); //dump("In checkUserServerChanges() *** Type = " + newType + "\n"); // If something is changed then check if the new user/host already exists. if ( (oldUser != newUser) || (oldHost != newHost) ) { var newServer = accountManager.findRealServer(newUser, newHost, newType); if (newServer) { if (showAlert) { var alertText = gPrefsBundle.getString("modifiedAccountExists"); window.alert(alertText); } // Restore the old values before return if (newType != "nntp") setFormElementValue(pageElements[uIndx], oldUser); setFormElementValue(pageElements[hIndx], oldHost); return false; } //dump("In checkUserServerChanges() Ah, Server not found !!!" + "\n"); // If username is changed remind users to change Your Name and Email Address. // If serve name is changed and has defined filters then remind users to edit rules. if (showAlert) { var account = getAccountFromServerId(currentServerId); var filterList; if (account && (newType != "nntp")) { var server = account.incomingServer; filterList = server.filterList; } var userChangeText, serverChangeText; if ( (oldHost != newHost) && (filterList != undefined) && filterList.filterCount ) serverChangeText = gPrefsBundle.getString("serverNameChanged"); if (oldUser != newUser) userChangeText = gPrefsBundle.getString("userNameChanged"); if ( (serverChangeText != undefined) && (userChangeText != undefined) ) serverChangeText = serverChangeText + "\n\n" + userChangeText; else if (userChangeText != undefined) serverChangeText = userChangeText; if (serverChangeText != undefined) window.alert(serverChangeText); } } return true;} |
|
word = gDialog.ReplaceWordInput.value; | var word = gDialog.ReplaceWordInput.value; | function CheckWord(){ word = gDialog.ReplaceWordInput.value; if (word) { if (gSpellChecker.CheckCurrentWord(word)) { FillSuggestedList(word); SetReplaceEnable(); } else { ClearListbox(gDialog.SuggestedList); var item = gDialog.SuggestedList.appendItem(GetString("CorrectSpelling"), ""); if (item) item.setAttribute("disabled", "true"); // Suppress being able to select the message text gAllowSelectWord = false; } }} |
word = dialog.replaceWordInput.value; | word = dialog.ReplaceWordInput.value; | function CheckWord(){ //dump("SpellCheck: CheckWord\n"); word = dialog.replaceWordInput.value; if (word != "") { //dump("CheckWord: Word in edit field="+word+"\n"); isMisspelled = spellChecker.CheckCurrentWord(word); if (isMisspelled) { dump("CheckWord says word was misspelled\n"); misspelledWord = word; FillSuggestedList(); } else { ClearList(dialog.suggestedList); AppendStringToList(dialog.suggestedList, GetString("CorrectSpelling")); // Suppress being able to select the message text allowSelectWord = false; } }} |
misspelledWord = word; | MisspelledWord = word; | function CheckWord(){ //dump("SpellCheck: CheckWord\n"); word = dialog.replaceWordInput.value; if (word != "") { //dump("CheckWord: Word in edit field="+word+"\n"); isMisspelled = spellChecker.CheckCurrentWord(word); if (isMisspelled) { dump("CheckWord says word was misspelled\n"); misspelledWord = word; FillSuggestedList(); } else { ClearList(dialog.suggestedList); AppendStringToList(dialog.suggestedList, GetString("CorrectSpelling")); // Suppress being able to select the message text allowSelectWord = false; } }} |
ClearList(dialog.suggestedList); AppendStringToList(dialog.suggestedList, GetString("CorrectSpelling")); | ClearList(dialog.SuggestedList); AppendStringToList(dialog.SuggestedList, GetString("CorrectSpelling")); | function CheckWord(){ //dump("SpellCheck: CheckWord\n"); word = dialog.replaceWordInput.value; if (word != "") { //dump("CheckWord: Word in edit field="+word+"\n"); isMisspelled = spellChecker.CheckCurrentWord(word); if (isMisspelled) { dump("CheckWord says word was misspelled\n"); misspelledWord = word; FillSuggestedList(); } else { ClearList(dialog.suggestedList); AppendStringToList(dialog.suggestedList, GetString("CorrectSpelling")); // Suppress being able to select the message text allowSelectWord = false; } }} |
ClearList(dialog.SuggestedList); AppendStringToList(dialog.SuggestedList, GetString("CorrectSpelling")); | ClearTreelist(dialog.SuggestedList); var item = AppendStringToTreelistById(dialog.SuggestedList, "CorrectSpelling"); if (item) item.setAttribute("disabled", "true"); | function CheckWord(){ //dump("SpellCheck: CheckWord\n"); word = dialog.ReplaceWordInput.value; if (word != "") { //dump("CheckWord: Word in edit field="+word+"\n"); isMisspelled = spellChecker.CheckCurrentWord(word); if (isMisspelled) { dump("CheckWord says word was misspelled\n"); MisspelledWord = word; FillSuggestedList(); } else { ClearList(dialog.SuggestedList); AppendStringToList(dialog.SuggestedList, GetString("CorrectSpelling")); // Suppress being able to select the message text allowSelectWord = false; } }} |
"NC:SearchCategory?category=" + aNode.id; | "NC:SearchCategory?category=" + aNode.getAttribute("id"); | function chooseCategory( aNode ){ var category = !aNode.id ? "NC:SearchEngineRoot" : "NC:SearchCategory?category=" + aNode.id; if (pref) pref.SetUnicharPref("browser.search.last_search_category", category); var treeNode = document.getElementById("searchengines"); if (treeNode) treeNode.setAttribute("ref", category); loadEngines(category); return(true);} |
} | function chooseCategory( aNode ){ var category = !aNode.id ? "NC:SearchEngineRoot" : "NC:SearchCategory?category=" + aNode.id; if (pref) pref.SetUnicharPref("browser.search.last_search_category", category); var treeNode = document.getElementById("searchengines"); if (treeNode) treeNode.setAttribute("ref", category); loadEngines(category); return(true);} |
|
debug("\nSet search engine list to category='" + category + "'\n\n"); | dump("*** Set search engine list to category=" + category + "\n"); | function chooseCategory( aNode ){ var category = "NC:SearchCategory?category=" + aNode.getAttribute("id"); debug("chooseCategory: '" + category + "'\n"); var treeNode = document.getElementById("engineList"); if (treeNode) { debug("\nSet search engine list to category='" + category + "'\n\n"); treeNode.setAttribute( "ref", category ); } return(true);} |
treeNode.builder.rebuild(); | function chooseCategory( aNode ){ var category = "NC:SearchCategory?category=" + aNode.getAttribute("id"); debug("chooseCategory: '" + category + "'\n"); var treeNode = document.getElementById("engineList"); if (treeNode) { debug("\nSet search engine list to category='" + category + "'\n\n"); treeNode.setAttribute( "ref", category ); } return(true);} |
|
if (pref) pref.SetUnicharPref("browser.search.last_search_category", category); | nsPreferences.setUnicharPref("browser.search.last_search_category", category); | function chooseCategory( aNode ){ var category = !aNode.id ? "NC:SearchEngineRoot" : "NC:SearchCategory?category=" + aNode.getAttribute("id"); if (pref) pref.SetUnicharPref("browser.search.last_search_category", category); var treeNode = document.getElementById("searchengines"); if (treeNode) { debug("chooseCategory: ref='" + category + "'\n"); treeNode.setAttribute("ref", category); } loadEngines(category); return(true);} |
if (treeNode) { debug("chooseCategory: ref='" + category + "'\n"); treeNode.setAttribute("ref", category); } | treeNode.setAttribute("ref", category); | function chooseCategory( aNode ){ var category = !aNode.id ? "NC:SearchEngineRoot" : "NC:SearchCategory?category=" + aNode.getAttribute("id"); if (pref) pref.SetUnicharPref("browser.search.last_search_category", category); var treeNode = document.getElementById("searchengines"); if (treeNode) { debug("chooseCategory: ref='" + category + "'\n"); treeNode.setAttribute("ref", category); } loadEngines(category); return(true);} |
dialog.BackgroundImageInput.focus(); | SetTextfieldFocus(dialog.BackgroundImageInput); | function chooseFile(){ // Get a local file, converted into URL format fileName = GetLocalFileURL("img"); if (fileName && fileName != "") { dialog.BackgroundImage = fileName; dialog.BackgroundImageInput.value = fileName; dialog.BackgroundImageCheckbox.checked = true; dialog.ColorPreview.setAttribute(backgroundStr, fileName); } // Put focus into the input field dialog.BackgroundImageInput.focus();} |
dialog.srcInput.focus(); | SetTextfieldFocus(dialog.srcInput); | function chooseFile(){ // Get a local file, converted into URL format fileName = GetLocalFileURL("img"); if (fileName && fileName != "") { dialog.srcInput.value = fileName; doOverallEnabling(); } // Put focus into the input field dialog.srcInput.focus();} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.