rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
return false; | function Click() { id = this.id.replace("menu_",""); ShowMenu(id);} |
|
id = this.id.replace("menu_","") | id = this.id.replace("menu_",""); | function Click() { id = this.id.replace("menu_","") ShowMenu(id);} |
if (elt.className == 'x') | var strEltClass = elt.className; if (strEltClass.charAt (strEltClass.length - 1) == '_') strEltClass = strEltClass.slice (0, strEltClass.length - 1); if (strEltClass == 'x') | function clickHandler (evt){ var elt; if (document.layers) elt = evt.taget; else if (window.event && window.event.srcElement) { elt = window.event.srcElement; evt = window.event; } else if (evt && evt.stopPropagation) elt = evt.target; if (!elt.className && elt.parentNode) elt = elt.parentNode; if (elt.className == 'l') // label { var strClass; var strField; elt = getParentDiv (elt); if (elt.className == 'x') // constructor { strField = 'ctor'; elt = getParentDiv (elt); } else if (elt.className == 'm' || // method elt.className == 'p' || // property elt.className == 'e' || // event elt.className == 'f') // field { strField = getName (elt).toLowerCase (); var match = strField.match ( /[\.A-Z0-9_]*/i ); if (match) strField = match [0]; elt = getParentDiv (elt); } if (elt.className == 'c' || // class elt.className == 's' || // struct elt.className == 'i' || // struct elt.className == 'd' || // delegate elt.className == 'en') // enum { strClass = getName (elt).toLowerCase () + 'class'; if (elt.className == 'en') strField = null; elt = getParentDiv (elt); } if (elt.className == 'n') // namespace { var re = /\./g ; var strNamespace = getName (elt).toLowerCase ().replace (re, ''); if (strClass) strNamespace += strClass; if (strField) strNamespace += strField; if (strClass || strField) strNamespace += 'topic'; window.open ('http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrf' + strNamespace + '.asp', 'MSDN'); } } else { if (elt.parentNode && elt.parentNode.className == 't') // toggle elt = elt.parentNode; else if (elt.className != 't') // toggle return; while (elt != null && elt.tagName != 'DIV') elt = elt.parentNode; if (evt.shiftKey) { var rgElts = getChildrenByTagName (elt, 'DIV'); var cElts = rgElts.length; if (cElts != 0) { var fView = false; var iElt; for (iElt = 0; iElt < cElts; iElt ++) { if (getView (rgElts [iElt])) { fView = true; break; } } for (iElt = 0; iElt < cElts; iElt ++) { setView (rgElts [iElt], !fView); } } } else if (evt.ctrlKey) { setView (elt, true); var eltParent = getParentDiv (elt); while (eltParent) { var rgSiblings = getChildrenByTagName (eltParent, 'DIV'); var cSiblings = rgSiblings.length; for (var iSibling = 0; iSibling < cSiblings; iSibling++) { var eltSibling = rgSiblings [iSibling]; if (eltSibling != elt) { setView (eltSibling, false); } } elt = eltParent; eltParent = getParentDiv (elt); } } else toggle (elt); } return false;} |
if (elt.className == 'm' || elt.className == 'p' || elt.className == 'e' || elt.className == 'f') | if (strEltClass == 'm' || strEltClass == 'p' || strEltClass == 'e' || strEltClass == 'f') | function clickHandler (evt){ var elt; if (document.layers) elt = evt.taget; else if (window.event && window.event.srcElement) { elt = window.event.srcElement; evt = window.event; } else if (evt && evt.stopPropagation) elt = evt.target; if (!elt.className && elt.parentNode) elt = elt.parentNode; if (elt.className == 'l') // label { var strClass; var strField; elt = getParentDiv (elt); if (elt.className == 'x') // constructor { strField = 'ctor'; elt = getParentDiv (elt); } else if (elt.className == 'm' || // method elt.className == 'p' || // property elt.className == 'e' || // event elt.className == 'f') // field { strField = getName (elt).toLowerCase (); var match = strField.match ( /[\.A-Z0-9_]*/i ); if (match) strField = match [0]; elt = getParentDiv (elt); } if (elt.className == 'c' || // class elt.className == 's' || // struct elt.className == 'i' || // struct elt.className == 'd' || // delegate elt.className == 'en') // enum { strClass = getName (elt).toLowerCase () + 'class'; if (elt.className == 'en') strField = null; elt = getParentDiv (elt); } if (elt.className == 'n') // namespace { var re = /\./g ; var strNamespace = getName (elt).toLowerCase ().replace (re, ''); if (strClass) strNamespace += strClass; if (strField) strNamespace += strField; if (strClass || strField) strNamespace += 'topic'; window.open ('http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrf' + strNamespace + '.asp', 'MSDN'); } } else { if (elt.parentNode && elt.parentNode.className == 't') // toggle elt = elt.parentNode; else if (elt.className != 't') // toggle return; while (elt != null && elt.tagName != 'DIV') elt = elt.parentNode; if (evt.shiftKey) { var rgElts = getChildrenByTagName (elt, 'DIV'); var cElts = rgElts.length; if (cElts != 0) { var fView = false; var iElt; for (iElt = 0; iElt < cElts; iElt ++) { if (getView (rgElts [iElt])) { fView = true; break; } } for (iElt = 0; iElt < cElts; iElt ++) { setView (rgElts [iElt], !fView); } } } else if (evt.ctrlKey) { setView (elt, true); var eltParent = getParentDiv (elt); while (eltParent) { var rgSiblings = getChildrenByTagName (eltParent, 'DIV'); var cSiblings = rgSiblings.length; for (var iSibling = 0; iSibling < cSiblings; iSibling++) { var eltSibling = rgSiblings [iSibling]; if (eltSibling != elt) { setView (eltSibling, false); } } elt = eltParent; eltParent = getParentDiv (elt); } } else toggle (elt); } return false;} |
if (elt.className == 'c' || elt.className == 's' || elt.className == 'i' || elt.className == 'd' || elt.className == 'en') | var strEltClass = elt.className; if (strEltClass.charAt (strEltClass.length - 1) == '_') strEltClass = strEltClass.slice (0, strEltClass.length - 1); if (strEltClass == 'c' || strEltClass == 's' || strEltClass == 'i' || strEltClass == 'd' || strEltClass == 'en') | function clickHandler (evt){ var elt; if (document.layers) elt = evt.taget; else if (window.event && window.event.srcElement) { elt = window.event.srcElement; evt = window.event; } else if (evt && evt.stopPropagation) elt = evt.target; if (!elt.className && elt.parentNode) elt = elt.parentNode; if (elt.className == 'l') // label { var strClass; var strField; elt = getParentDiv (elt); if (elt.className == 'x') // constructor { strField = 'ctor'; elt = getParentDiv (elt); } else if (elt.className == 'm' || // method elt.className == 'p' || // property elt.className == 'e' || // event elt.className == 'f') // field { strField = getName (elt).toLowerCase (); var match = strField.match ( /[\.A-Z0-9_]*/i ); if (match) strField = match [0]; elt = getParentDiv (elt); } if (elt.className == 'c' || // class elt.className == 's' || // struct elt.className == 'i' || // struct elt.className == 'd' || // delegate elt.className == 'en') // enum { strClass = getName (elt).toLowerCase () + 'class'; if (elt.className == 'en') strField = null; elt = getParentDiv (elt); } if (elt.className == 'n') // namespace { var re = /\./g ; var strNamespace = getName (elt).toLowerCase ().replace (re, ''); if (strClass) strNamespace += strClass; if (strField) strNamespace += strField; if (strClass || strField) strNamespace += 'topic'; window.open ('http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrf' + strNamespace + '.asp', 'MSDN'); } } else { if (elt.parentNode && elt.parentNode.className == 't') // toggle elt = elt.parentNode; else if (elt.className != 't') // toggle return; while (elt != null && elt.tagName != 'DIV') elt = elt.parentNode; if (evt.shiftKey) { var rgElts = getChildrenByTagName (elt, 'DIV'); var cElts = rgElts.length; if (cElts != 0) { var fView = false; var iElt; for (iElt = 0; iElt < cElts; iElt ++) { if (getView (rgElts [iElt])) { fView = true; break; } } for (iElt = 0; iElt < cElts; iElt ++) { setView (rgElts [iElt], !fView); } } } else if (evt.ctrlKey) { setView (elt, true); var eltParent = getParentDiv (elt); while (eltParent) { var rgSiblings = getChildrenByTagName (eltParent, 'DIV'); var cSiblings = rgSiblings.length; for (var iSibling = 0; iSibling < cSiblings; iSibling++) { var eltSibling = rgSiblings [iSibling]; if (eltSibling != elt) { setView (eltSibling, false); } } elt = eltParent; eltParent = getParentDiv (elt); } } else toggle (elt); } return false;} |
if (elt.className == 'en') | if (strEltClass == 'en') | function clickHandler (evt){ var elt; if (document.layers) elt = evt.taget; else if (window.event && window.event.srcElement) { elt = window.event.srcElement; evt = window.event; } else if (evt && evt.stopPropagation) elt = evt.target; if (!elt.className && elt.parentNode) elt = elt.parentNode; if (elt.className == 'l') // label { var strClass; var strField; elt = getParentDiv (elt); if (elt.className == 'x') // constructor { strField = 'ctor'; elt = getParentDiv (elt); } else if (elt.className == 'm' || // method elt.className == 'p' || // property elt.className == 'e' || // event elt.className == 'f') // field { strField = getName (elt).toLowerCase (); var match = strField.match ( /[\.A-Z0-9_]*/i ); if (match) strField = match [0]; elt = getParentDiv (elt); } if (elt.className == 'c' || // class elt.className == 's' || // struct elt.className == 'i' || // struct elt.className == 'd' || // delegate elt.className == 'en') // enum { strClass = getName (elt).toLowerCase () + 'class'; if (elt.className == 'en') strField = null; elt = getParentDiv (elt); } if (elt.className == 'n') // namespace { var re = /\./g ; var strNamespace = getName (elt).toLowerCase ().replace (re, ''); if (strClass) strNamespace += strClass; if (strField) strNamespace += strField; if (strClass || strField) strNamespace += 'topic'; window.open ('http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrf' + strNamespace + '.asp', 'MSDN'); } } else { if (elt.parentNode && elt.parentNode.className == 't') // toggle elt = elt.parentNode; else if (elt.className != 't') // toggle return; while (elt != null && elt.tagName != 'DIV') elt = elt.parentNode; if (evt.shiftKey) { var rgElts = getChildrenByTagName (elt, 'DIV'); var cElts = rgElts.length; if (cElts != 0) { var fView = false; var iElt; for (iElt = 0; iElt < cElts; iElt ++) { if (getView (rgElts [iElt])) { fView = true; break; } } for (iElt = 0; iElt < cElts; iElt ++) { setView (rgElts [iElt], !fView); } } } else if (evt.ctrlKey) { setView (elt, true); var eltParent = getParentDiv (elt); while (eltParent) { var rgSiblings = getChildrenByTagName (eltParent, 'DIV'); var cSiblings = rgSiblings.length; for (var iSibling = 0; iSibling < cSiblings; iSibling++) { var eltSibling = rgSiblings [iSibling]; if (eltSibling != elt) { setView (eltSibling, false); } } elt = eltParent; eltParent = getParentDiv (elt); } } else toggle (elt); } return false;} |
if (elt.className == 'n') | var strEltClass = elt.className; if (strEltClass.charAt (strEltClass.length - 1) == '_') strEltClass = strEltClass.slice (0, strEltClass.length - 1); if (strEltClass == 'n') | function clickHandler (evt){ var elt; if (document.layers) elt = evt.taget; else if (window.event && window.event.srcElement) { elt = window.event.srcElement; evt = window.event; } else if (evt && evt.stopPropagation) elt = evt.target; if (!elt.className && elt.parentNode) elt = elt.parentNode; if (elt.className == 'l') // label { var strClass; var strField; elt = getParentDiv (elt); if (elt.className == 'x') // constructor { strField = 'ctor'; elt = getParentDiv (elt); } else if (elt.className == 'm' || // method elt.className == 'p' || // property elt.className == 'e' || // event elt.className == 'f') // field { strField = getName (elt).toLowerCase (); var match = strField.match ( /[\.A-Z0-9_]*/i ); if (match) strField = match [0]; elt = getParentDiv (elt); } if (elt.className == 'c' || // class elt.className == 's' || // struct elt.className == 'i' || // struct elt.className == 'd' || // delegate elt.className == 'en') // enum { strClass = getName (elt).toLowerCase () + 'class'; if (elt.className == 'en') strField = null; elt = getParentDiv (elt); } if (elt.className == 'n') // namespace { var re = /\./g ; var strNamespace = getName (elt).toLowerCase ().replace (re, ''); if (strClass) strNamespace += strClass; if (strField) strNamespace += strField; if (strClass || strField) strNamespace += 'topic'; window.open ('http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrf' + strNamespace + '.asp', 'MSDN'); } } else { if (elt.parentNode && elt.parentNode.className == 't') // toggle elt = elt.parentNode; else if (elt.className != 't') // toggle return; while (elt != null && elt.tagName != 'DIV') elt = elt.parentNode; if (evt.shiftKey) { var rgElts = getChildrenByTagName (elt, 'DIV'); var cElts = rgElts.length; if (cElts != 0) { var fView = false; var iElt; for (iElt = 0; iElt < cElts; iElt ++) { if (getView (rgElts [iElt])) { fView = true; break; } } for (iElt = 0; iElt < cElts; iElt ++) { setView (rgElts [iElt], !fView); } } } else if (evt.ctrlKey) { setView (elt, true); var eltParent = getParentDiv (elt); while (eltParent) { var rgSiblings = getChildrenByTagName (eltParent, 'DIV'); var cSiblings = rgSiblings.length; for (var iSibling = 0; iSibling < cSiblings; iSibling++) { var eltSibling = rgSiblings [iSibling]; if (eltSibling != elt) { setView (eltSibling, false); } } elt = eltParent; eltParent = getParentDiv (elt); } } else toggle (elt); } return false;} |
if( oeTimePicker.isTimeAm( oeTimePicker.gSelectedTime ) ) { hour24 = hourNumber; } else { hour24 = hourNumber + 12; } | hour24 = hourNumber; | oeTimePicker.clickHour = function( hourItem, hourNumber ){ // select the item oeTimePicker.selectHourItem( hourItem ); // Change the hour in the selected time, add 12 if PM. var hour24 = null; if( oeTimePicker.isTimeAm( oeTimePicker.gSelectedTime ) ) { hour24 = hourNumber; } else { hour24 = hourNumber + 12; } oeTimePicker.gSelectedTime.setHours( hour24 ); this.selectTime(); } |
current_panels.treeBoxObject.selection.clearSelection(); | current_panels.view.selection.clearSelection(); | function ClickOnOtherPanels(event){ var tree = document.getElementById("other-panels"); var rowIndex = -1; if (event.type == "click" && event.button == 0) { var row = {}, col = {}, obj = {}; var b = tree.treeBoxObject; b.getCellAt(event.clientX, event.clientY, row, col, obj); if (obj.value == "twisty" || event.detail == 2) { rowIndex = row.value; } } if (rowIndex < 0) return; var treeitem = tree.contentView.getItemAtIndex(rowIndex); var res = RDF.GetResource(treeitem.id); if (treeitem.getAttribute('container') == 'true') { if (treeitem.getAttribute('open') == 'true') { var link = treeitem.getAttribute('link'); var 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); } } } // Remove the selection in the "current" panels list var current_panels = document.getElementById('current-panels'); current_panels.treeBoxObject.selection.clearSelection(); enable_buttons_for_current_panels();} |
span.appendChild (newInlineText("Available networks are [")); | span.appendChild (newInlineText(getMsg("cli_listNetworks.a"))); | function clie_ilistnets (e){ var span = document.createElementNS("http://www.w3.org/1999/xhtml", "html:span"); span.appendChild (newInlineText("Available networks are [")); var netnames = keys(client.networks).sort(); var lastname = netnames[netnames.length - 1]; for (n in netnames) { var net = client.networks[netnames[n]]; var a = document.createElementNS("http://www.w3.org/1999/xhtml", "html:a"); a.setAttribute ("class", "chatzilla-link"); a.setAttribute ("href", "irc://" + net.name); var t = newInlineText (net.name); a.appendChild (t); span.appendChild (a); if (netnames[n] != lastname) span.appendChild (newInlineText (", ")); } span.appendChild (newInlineText("].")); client.currentObject.display (span, "INFO"); return true;} |
span.appendChild (newInlineText (", ")); | span.appendChild (newInlineText (MSG_CSP)); | function clie_ilistnets (e){ var span = document.createElementNS("http://www.w3.org/1999/xhtml", "html:span"); span.appendChild (newInlineText("Available networks are [")); var netnames = keys(client.networks).sort(); var lastname = netnames[netnames.length - 1]; for (n in netnames) { var net = client.networks[netnames[n]]; var a = document.createElementNS("http://www.w3.org/1999/xhtml", "html:a"); a.setAttribute ("class", "chatzilla-link"); a.setAttribute ("href", "irc://" + net.name); var t = newInlineText (net.name); a.appendChild (t); span.appendChild (a); if (netnames[n] != lastname) span.appendChild (newInlineText (", ")); } span.appendChild (newInlineText("].")); client.currentObject.display (span, "INFO"); return true;} |
span.appendChild (newInlineText("].")); | span.appendChild (newInlineText(getMsg("cli_listNetworks.b"))); | function clie_ilistnets (e){ var span = document.createElementNS("http://www.w3.org/1999/xhtml", "html:span"); span.appendChild (newInlineText("Available networks are [")); var netnames = keys(client.networks).sort(); var lastname = netnames[netnames.length - 1]; for (n in netnames) { var net = client.networks[netnames[n]]; var a = document.createElementNS("http://www.w3.org/1999/xhtml", "html:a"); a.setAttribute ("class", "chatzilla-link"); a.setAttribute ("href", "irc://" + net.name); var t = newInlineText (net.name); a.appendChild (t); span.appendChild (a); if (netnames[n] != lastname) span.appendChild (newInlineText (", ")); } span.appendChild (newInlineText("].")); client.currentObject.display (span, "INFO"); return true;} |
}), arguments ); | })); | clone: function(deep) { return this.pushStack( jQuery.map( this, function(a){ return a.cloneNode( deep != undefined ? deep : true ); }), arguments ); }, |
obj.isExternalAttachment = aAttachment.isExternalAttachment; | function cloneAttachment(aAttachment){ var obj = new Object(); obj.contentType = aAttachment.contentType; obj.url = aAttachment.url; obj.displayName = aAttachment.displayName; obj.messageUri = aAttachment.uri; return obj;} |
|
gActiveEditor.removeAttribute(destElement, attr); | gActiveEditor.removeAttributeOrEquivalent(destElement, attr, false); | function CloneAttribute(destElement, srcElement, attr){ var value = srcElement.getAttribute(attr); // Use editor methods since we are always // modifying a table in the document and // we need transaction system for undo try { if (!value || value.length == 0) gActiveEditor.removeAttribute(destElement, attr); else gActiveEditor.setAttribute(destElement, attr, value); } catch(e) {}} |
gActiveEditor.setAttribute(destElement, attr, value); | gActiveEditor.setAttributeOrEquivalent(destElement, attr, value, false); | function CloneAttribute(destElement, srcElement, attr){ var value = srcElement.getAttribute(attr); // Use editor methods since we are always // modifying a table in the document and // we need transaction system for undo try { if (!value || value.length == 0) gActiveEditor.removeAttribute(destElement, attr); else gActiveEditor.setAttribute(destElement, attr, value); } catch(e) {}} |
DWRUtil.cloneNode = function(ele) { | DWRUtil.cloneNode = function(ele, options) { if (options == null) options = {}; | DWRUtil.cloneNode = function(ele) { var orig = ele; ele = $(ele); if (ele == null) { DWRUtil.debug("cloneNode() can't find an element with id: " + orig + "."); return null; } var clone = ele.cloneNode(true); DWRUtil._removeIds(clone); ele.parentNode.insertBefore(clone, ele); return clone;} |
DWRUtil.debug("cloneNode() can't find an element with id: " + orig + "."); | DWRUtil.debug("cloneNode2() can't find an element with id: " + orig + "."); | DWRUtil.cloneNode = function(ele) { var orig = ele; ele = $(ele); if (ele == null) { DWRUtil.debug("cloneNode() can't find an element with id: " + orig + "."); return null; } var clone = ele.cloneNode(true); DWRUtil._removeIds(clone); ele.parentNode.insertBefore(clone, ele); return clone;} |
DWRUtil._removeIds(clone); | if (options.idPrefix || options.idSuffix) { DWRUtil._updateIds(clone, options); } else { DWRUtil._removeIds(clone); } | DWRUtil.cloneNode = function(ele) { var orig = ele; ele = $(ele); if (ele == null) { DWRUtil.debug("cloneNode() can't find an element with id: " + orig + "."); return null; } var clone = ele.cloneNode(true); DWRUtil._removeIds(clone); ele.parentNode.insertBefore(clone, ele); return clone;} |
return; | return null; | DWRUtil.cloneNode = function(ele) { var orig = ele; ele = $(ele); if (ele == null) { DWRUtil.debug("cloneNode() can't find an element with id: " + orig + "."); return; } var clone = ele.cloneNode(true); DWRUtil._removeIds(clone); ele.parentNode.insertBefore(clone, ele); return clone;} |
var panels = document.getElementsByClassName("category_panel"); for(var i=0; i<panels.length; i++) { var fullId = panels[i].id; var index = fullId.lastIndexOf('_'); var catId = fullId.substring(0, index); hideCategory(catId); } function chooserModeChanged() { var radioPanel = document.getElementById("viewchoiceRadioPanel"); var radioButtons = radioPanel.getElementsByTagName("input"); for(var i=0; i<radioButtons.length; i++) { if(radioButtons[i].type == "radio") { var panelId = "module_table_" + radioButtons[i].value; var panel = document.getElementById(panelId); if(radioButtons[i].checked && panel != null) { Element.show(panel); } else { Element.hide(panel); } } } } function toggleExpansionState( categoryIdentifier) { var id= "expansion_state_" + categoryIdentifier; var hiddenField = document.getElementById(id); hiddenField.value = (hiddenField.value == "true" ? "false" : "true"); } } | var panels = document.getElementsByClassName("category_panel"); for(var i=0; i<panels.length; i++) { var fullId = panels[i].id; var index = fullId.lastIndexOf('_'); var catId = fullId.substring(0, index); hideCategory(catId); } } | function closeAll() { var panels = document.getElementsByClassName("category_panel"); for(var i=0; i<panels.length; i++) { var fullId = panels[i].id; var index = fullId.lastIndexOf('_'); var catId = fullId.substring(0, index); hideCategory(catId); } function chooserModeChanged() { var radioPanel = document.getElementById("viewchoiceRadioPanel"); var radioButtons = radioPanel.getElementsByTagName("input"); for(var i=0; i<radioButtons.length; i++) { if(radioButtons[i].type == "radio") { var panelId = "module_table_" + radioButtons[i].value; var panel = document.getElementById(panelId); if(radioButtons[i].checked && panel != null) { Element.show(panel); } else { Element.hide(panel); } } } } function toggleExpansionState( categoryIdentifier) { var id= "expansion_state_" + categoryIdentifier; var hiddenField = document.getElementById(id); hiddenField.value = (hiddenField.value == "true" ? "false" : "true"); } } |
var panels = document.getElementsByName("category_panel"); | var panels = document.getElementsByClassName("category_panel"); | function closeAll() { var panels = document.getElementsByName("category_panel"); for(var i=0; i<panels.length; i++) { var fullId = panels[i].id; var index = fullId.lastIndexOf('_'); var catId = fullId.substring(0, index); hideCategory(catId); } } |
dump("*** running closeBranches\n"); | closeBranches: function ( aComponentName ) { dump("*** running closeBranches\n"); 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(); window.close();} |
|
var findField = document.getElementById("find-field"); var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher); if (window == ww.activeWindow && document.commandDispatcher.focusedElement && document.commandDispatcher.focusedElement.parentNode.parentNode == findField) { _content.focus(); } var findToolbar = document.getElementById("FindToolbar"); findToolbar.hidden = true; gTypeAheadFindBuffer = ""; changeSelectionColor(false); if (gQuickFindTimeout) { clearTimeout(gQuickFindTimeout); gQuickFindTimeout = null; } | setTimeout(delayedCloseFindBar, 0); | function closeFindBar(){ var findField = document.getElementById("find-field"); var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher); if (window == ww.activeWindow && document.commandDispatcher.focusedElement && document.commandDispatcher.focusedElement.parentNode.parentNode == findField) { _content.focus(); } var findToolbar = document.getElementById("FindToolbar"); findToolbar.hidden = true; gTypeAheadFindBuffer = ""; changeSelectionColor(false); if (gQuickFindTimeout) { clearTimeout(gQuickFindTimeout); gQuickFindTimeout = null; } } |
if (gRunFiltersButton.getAttribute("label") == gRunFiltersButton.getAttribute("stoplabel")) { gFilterListMsgWindow.StopUrls(); } | closeWindow: function() { // if we are running, and the user closes the window, stop. // XXX todo, prompt first, though. if (gRunFiltersButton.getAttribute("label") == gRunFiltersButton.getAttribute("stoplabel")) { gFilterListMsgWindow.StopUrls(); } } |
|
var ary = aliasDefs[i].split(/\s*=\s*/); if (ary[0] == commandName) return [i, ary[1]]; | var ary = aliasDefs[i].match(/^(.*?)\s*=\s*(.*)$/); if (ary[1] == commandName) return [i, ary[2]]; | function cmdAlias(e){ var aliasDefs = client.prefs["aliases"]; function getAlias(commandName) { for (var i = 0; i < aliasDefs.length; ++i) { var ary = aliasDefs[i].split(/\s*=\s*/); if (ary[0] == commandName) return [i, ary[1]]; } return null; }; var ary; if (e.commandList == "-") { /* remove alias */ ary = getAlias(e.aliasName); if (!ary) { display(getMsg(MSG_NOT_AN_ALIAS, e.aliasName), MT_ERROR); return; } delete client.commandManager.commands[e.aliasName]; arrayRemoveAt(aliasDefs, ary[1]); aliasDefs.update(); feedback(e, getMsg(MSG_ALIAS_REMOVED, e.aliasName)); } else if (e.aliasName) { /* add/change alias */ client.commandManager.defineCommand(e.aliasName, e.commandList); ary = getAlias(e.aliasName); if (ary) aliasDefs[ary[0]] = e.aliasName + " = " + e.commandList; else aliasDefs.push(e.aliasName + " = " + e.commandList); aliasDefs.update(); feedback(e, getMsg(MSG_ALIAS_CREATED, [e.aliasName, e.commandList])); } else { /* list aliases */ if (aliasDefs.length == 0) { display(MSG_NO_ALIASES); } else { for (var i = 0; i < aliasDefs.length; ++i) { ary = aliasDefs[i].split(/\s*=\s*/); display(getMsg(MSG_FMT_ALIAS, [ary[0], ary[1]])); } } }} |
arrayRemoveAt(aliasDefs, ary[1]); | arrayRemoveAt(aliasDefs, ary[0]); | function cmdAlias(e){ var aliasDefs = client.prefs["aliases"]; function getAlias(commandName) { for (var i = 0; i < aliasDefs.length; ++i) { var ary = aliasDefs[i].split(/\s*=\s*/); if (ary[0] == commandName) return [i, ary[1]]; } return null; }; var ary; if (e.commandList == "-") { /* remove alias */ ary = getAlias(e.aliasName); if (!ary) { display(getMsg(MSG_NOT_AN_ALIAS, e.aliasName), MT_ERROR); return; } delete client.commandManager.commands[e.aliasName]; arrayRemoveAt(aliasDefs, ary[1]); aliasDefs.update(); feedback(e, getMsg(MSG_ALIAS_REMOVED, e.aliasName)); } else if (e.aliasName) { /* add/change alias */ client.commandManager.defineCommand(e.aliasName, e.commandList); ary = getAlias(e.aliasName); if (ary) aliasDefs[ary[0]] = e.aliasName + " = " + e.commandList; else aliasDefs.push(e.aliasName + " = " + e.commandList); aliasDefs.update(); feedback(e, getMsg(MSG_ALIAS_CREATED, [e.aliasName, e.commandList])); } else { /* list aliases */ if (aliasDefs.length == 0) { display(MSG_NO_ALIASES); } else { for (var i = 0; i < aliasDefs.length; ++i) { ary = aliasDefs[i].split(/\s*=\s*/); display(getMsg(MSG_FMT_ALIAS, [ary[0], ary[1]])); } } }} |
ary = aliasDefs[i].split(/\s*=\s*/); display(getMsg(MSG_FMT_ALIAS, [ary[0], ary[1]])); | ary = aliasDefs[i].match(/^(.*?)\s*=\s*(.*)$/); display(getMsg(MSG_FMT_ALIAS, [ary[1], ary[2]])); | function cmdAlias(e){ var aliasDefs = client.prefs["aliases"]; function getAlias(commandName) { for (var i = 0; i < aliasDefs.length; ++i) { var ary = aliasDefs[i].split(/\s*=\s*/); if (ary[0] == commandName) return [i, ary[1]]; } return null; }; var ary; if (e.commandList == "-") { /* remove alias */ ary = getAlias(e.aliasName); if (!ary) { display(getMsg(MSG_NOT_AN_ALIAS, e.aliasName), MT_ERROR); return; } delete client.commandManager.commands[e.aliasName]; arrayRemoveAt(aliasDefs, ary[1]); aliasDefs.update(); feedback(e, getMsg(MSG_ALIAS_REMOVED, e.aliasName)); } else if (e.aliasName) { /* add/change alias */ client.commandManager.defineCommand(e.aliasName, e.commandList); ary = getAlias(e.aliasName); if (ary) aliasDefs[ary[0]] = e.aliasName + " = " + e.commandList; else aliasDefs.push(e.aliasName + " = " + e.commandList); aliasDefs.update(); feedback(e, getMsg(MSG_ALIAS_CREATED, [e.aliasName, e.commandList])); } else { /* list aliases */ if (aliasDefs.length == 0) { display(MSG_NO_ALIASES); } else { for (var i = 0; i < aliasDefs.length; ++i) { ary = aliasDefs[i].split(/\s*=\s*/); display(getMsg(MSG_FMT_ALIAS, [ary[0], ary[1]])); } } }} |
mask = e.user.getBanMask(); | mask = fromUnicode(e.user.getBanMask(), e.server); | function cmdBanOrExcept(e){ /* If we're unbanning, or banning in odd cases, we may actually be talking * about a user who is not in the channel, so we need to check the server * for information as well. */ if (!e.user && e.nickname) e.user = e.channel.getUser(e.nickname); if (!e.user && e.nickname) e.user = e.server.getUser(e.nickname); var mask = ""; if (e.user) { // We have a real user object, so get their proper 'ban mask'. mask = e.user.getBanMask(); } else if (e.nickname) { /* If we have either ! or @ in the nickname assume the user has given * us a complete mask and pass it directly, otherwise assume it is * only the nickname and use * for username/host. */ mask = fromUnicode(e.nickname, e.server); if (!/[!@]/.test(e.nickname)) mask = mask + "!*@*"; } var op; switch (e.command.name) { case "ban": op = " +b "; break; case "unban": op = " -b "; break; case "except": op = " +e "; break; case "unexcept": op = " -e "; break; } e.server.sendData("MODE " + e.channel.encodedName + op + mask + "\n");} |
var bpr = bplist[i]; display (getMsg(MSN_BP_LINE, [i, bpr.fileName, bpr.line, bpr.scriptMatches])); | bpr = bplist[i]; feedback (e, getMsg(MSN_BP_LINE, [i, bpr.fileName, bpr.line, bpr.scriptMatches])); | function cmdBreak (e){ var i; if (!e.fileName) { /* if no input data, just list the breakpoints */ var bplist = console.breakpoints.childData; if (bplist.length == 0) { display (MSG_NO_BREAKPOINTS_SET); return true; } display (getMsg(MSN_BP_HEADER, bplist.length)); for (i = 0; i < bplist.length; ++i) { var bpr = bplist[i]; display (getMsg(MSN_BP_LINE, [i, bpr.fileName, bpr.line, bpr.scriptMatches])); } return true; } var matchingFiles = matchFileName (e.fileName); if (matchingFiles.length == 0) { display (getMsg(MSN_ERR_BP_NOSCRIPT, e.fileName), MT_ERROR); return false; } for (i in matchingFiles) setBreakpoint (matchingFiles[i], e.lineNumber); return true;} |
display (getMsg(MSN_ERR_BP_NOSCRIPT, e.fileName), MT_ERROR); | feedback (e, getMsg(MSN_ERR_BP_NOSCRIPT, e.fileName), MT_ERROR); | function cmdBreak (e){ var i; if (!e.fileName) { /* if no input data, just list the breakpoints */ var bplist = console.breakpoints.childData; if (bplist.length == 0) { display (MSG_NO_BREAKPOINTS_SET); return true; } display (getMsg(MSN_BP_HEADER, bplist.length)); for (i = 0; i < bplist.length; ++i) { var bpr = bplist[i]; display (getMsg(MSN_BP_LINE, [i, bpr.fileName, bpr.line, bpr.scriptMatches])); } return true; } var matchingFiles = matchFileName (e.fileName); if (matchingFiles.length == 0) { display (getMsg(MSN_ERR_BP_NOSCRIPT, e.fileName), MT_ERROR); return false; } for (i in matchingFiles) setBreakpoint (matchingFiles[i], e.lineNumber); return true;} |
setBreakpoint (matchingFiles[i], e.lineNumber); | { bpr = setBreakpoint (matchingFiles[i], e.lineNumber); if (bpr) feedback (getMsg(MSN_BP_CREATED, [bpr.fileName, bpr.lineNumber, bpr.scriptMatches])); } | function cmdBreak (e){ var i; if (!e.fileName) { /* if no input data, just list the breakpoints */ var bplist = console.breakpoints.childData; if (bplist.length == 0) { display (MSG_NO_BREAKPOINTS_SET); return true; } display (getMsg(MSN_BP_HEADER, bplist.length)); for (i = 0; i < bplist.length; ++i) { var bpr = bplist[i]; display (getMsg(MSN_BP_LINE, [i, bpr.fileName, bpr.line, bpr.scriptMatches])); } return true; } var matchingFiles = matchFileName (e.fileName); if (matchingFiles.length == 0) { display (getMsg(MSN_ERR_BP_NOSCRIPT, e.fileName), MT_ERROR); return false; } for (i in matchingFiles) setBreakpoint (matchingFiles[i], e.lineNumber); return true;} |
if ((network.state != NET_CONNECTING) && (network.state != NET_WAITING)) | if ((network.state == NET_ONLINE) && network.isRunningList()) { display(MSG_CANCELLING_LIST); network.abortList(); } else if ((network.state == NET_CONNECTING) || (network.state == NET_WAITING)) { display(getMsg(MSG_CANCELLING, network.unicodeName)); network.cancel(); } else | function cmdCancel(e){ var network = e.network; if ((network.state != NET_CONNECTING) && (network.state != NET_WAITING)) { display(MSG_NOTHING_TO_CANCEL, MT_ERROR); return; } display(getMsg(MSG_CANCELLING, network.unicodeName)); network.cancel();} |
return; | function cmdCancel(e){ var network = e.network; if ((network.state != NET_CONNECTING) && (network.state != NET_WAITING)) { display(MSG_NOTHING_TO_CANCEL, MT_ERROR); return; } display(getMsg(MSG_CANCELLING, network.unicodeName)); network.cancel();} |
|
display(getMsg(MSG_CANCELLING, network.unicodeName)); network.cancel(); | function cmdCancel(e){ var network = e.network; if ((network.state != NET_CONNECTING) && (network.state != NET_WAITING)) { display(MSG_NOTHING_TO_CANCEL, MT_ERROR); return; } display(getMsg(MSG_CANCELLING, network.unicodeName)); network.cancel();} |
|
} else dd ("record already seems to be in the tree"); | function cmdChromeFilter (e){ var currentState = console.prefs["enableChromeFilter"]; if (e.toggle != null) { if (e.toggle == "toggle") e.toggle = !currentState; if (e.toggle != currentState) { if (e.toggle) console.jsds.insertFilter (console.chromeFilter, null); else console.jsds.removeFilter (console.chromeFilter); } console.scriptsView.freeze(); for (var container in console.scripts) { if (console.scripts[container].fileName.indexOf("chrome:") == 0) { var rec = console.scripts[container]; var scriptList = console.scriptsView.childData; if (e.toggle) { /* filter is on, remove chrome file from scripts view */ if ("parentRecord" in rec) scriptList.removeChildAtIndex(rec.childIndex); } else { /* filter is off, add chrome file to scripts view */ if (!("parentRecord" in rec)) scriptList.appendChild(rec); } } } console.scriptsView.thaw(); currentState = console.enableChromeFilter = console.prefs["enableChromeFilter"] = e.toggle; } feedback (e, getMsg(MSN_CHROME_FILTER, currentState ? MSG_VAL_ON : MSG_VAL_OFF));} |
|
return clearBreakpointByNumber (e.breakpointIndex); | var bpr = clearBreakpointByNumber (e.breakpointIndex); if (bpr) feedback (getMsg(MSN_BP_CLEARED, [bpr.fileName, bpr.line, bpr.scriptMatches])); | function cmdClear (e){ return clearBreakpointByNumber (e.breakpointIndex);} |
feedback (getMsg(MSN_BP_CLEARED, [bpr.fileName, bpr.line, bpr.scriptMatches])); | feedback (e, getMsg(MSN_BP_CLEARED, [bpr.fileName, bpr.line, bpr.scriptMatches])); | function cmdClear (e){ var bpr = clearBreakpointByNumber (e.breakpointIndex); if (bpr) feedback (getMsg(MSN_BP_CLEARED, [bpr.fileName, bpr.line, bpr.scriptMatches]));} |
helper.copyStringToClipboard(val, kGlobalClipboard); | helper.copyString(val); | cmdCopyValue: function() { var sel = getSelectedItem(); if (sel) { var val = sel.__JSValue__; if (val) { var helper = XPCU.getService(kClipboardHelperCID, "nsIClipboardHelper"); helper.copyStringToClipboard(val, kGlobalClipboard); } } }, |
if (pickerRv.reason == PICK_CANCEL) | if (!pickerRv.ok) | function cmdDCCAccept(e){ if (!jsenv.HAS_SERVER_SOCKETS) return display(MSG_DCC_NOT_POSSIBLE); if (!client.prefs["dcc.enabled"]) return display(MSG_DCC_NOT_ENABLED); function accept(c) { if (c.TYPE == "IRCDCCChat") { if (!c.accept()) return false; display(getMsg(MSG_DCCCHAT_ACCEPTED, c._getParams()), "DCC-CHAT"); return true; } // Accept the request passed in... var filename = c.filename; var ext = "*"; var m = filename.match(/...\.([a-z]+)$/i); if (m) ext = "*." + m[1]; var pickerRv = pickSaveAs(getMsg(MSG_DCCFILE_SAVE_TO, filename), ["$all", ext], filename); if (pickerRv.reason == PICK_CANCEL) return false; if (!c.accept(pickerRv.file)) return false; display(getMsg(MSG_DCCFILE_ACCEPTED, c._getParams()), "DCC-FILE"); return true; }; // If there is no nickname specified, use the "last" item. // This is the last DCC request that arrvied. if (!e.nickname && client.dcc.last) { if ((new Date() - client.dcc.lastTime) >= 10000) return accept(client.dcc.last); return display(MSG_DCC_ERR_ACCEPT_TIME); } var o = client.dcc.findByID(e.nickname); if (o) // Direct ID --> object request. return accept(o); if (e.type) e.type = [e.type.toLowerCase()]; else e.type = ["chat", "file"]; // Go ask the DCC code for some matching requets. var list = client.dcc.getMatches(e.nickname, e.file, e.type, [DCC_DIR_GETTING], [DCC_STATE_REQUESTED]); // Accept if only one match. if (list.length == 1) return accept(list[0]); // Oops, couldn't figure the user's request out, so give them some help. display(getMsg(MSG_DCC_PENDING_MATCHES, [list.length])); display(MSG_DCC_MATCHES_HELP); return true;} |
if (pickerRv.reason == PICK_CANCEL) | if (!pickerRv.ok) | function cmdDCCSend(e){ if (!jsenv.HAS_SERVER_SOCKETS) return display(MSG_DCC_NOT_POSSIBLE); if (!client.prefs["dcc.enabled"]) return display(MSG_DCC_NOT_ENABLED); const DIRSVC_CID = "@mozilla.org/file/directory_service;1"; const nsIProperties = Components.interfaces.nsIProperties; if (!e.nickname && !e.user) return display(MSG_DCC_ERR_NOUSER); // Accept the request passed in... var file; if (!e.file) { var pickerRv = pickOpen(MSG_DCCFILE_SEND); if (pickerRv.reason == PICK_CANCEL) return false; file = pickerRv.file; } else { // Wrap in try/catch because nsILocalFile creation throws a freaking // error if it doesn't get a FULL path. try { file = nsLocalFile(e.file); } catch(ex) { // Ok, try user's home directory. var fl = Components.classes[DIRSVC_CID].getService(nsIProperties); file = fl.get("Home", Components.interfaces.nsILocalFile); // Another freaking try/catch wrapper. try { // NOTE: This is so pathetic it can't cope with any path // separators in it, so don't even THINK about lobing a // relative path at it. file.append(e.file); // Wow. We survived. } catch (ex) { return display(MSG_DCCFILE_ERR_NOTFOUND); } } } if (!file.exists()) return display(MSG_DCCFILE_ERR_NOTFOUND); if (!file.isFile()) return display(MSG_DCCFILE_ERR_NOTAFILE); if (!file.isReadable()) return display(MSG_DCCFILE_ERR_NOTREADABLE); var user; if (e.nickname) user = e.server.addUser(e.nickname); else user = e.server.addUser(e.user.unicodeName); var u = client.dcc.addUser(user); var c = client.dcc.addFileTransfer(u, client.dcc.getNextPort()); c.request(file); client.munger.entries[".inline-buttons"].enabled = true; var cmd = getMsg(MSG_DCC_COMMAND_CANCEL, "dcc-close " + c.id); display(getMsg(MSG_DCCFILE_SENT_REQUEST, [c.user.unicodeName, c.localIP, c.port, c.filename, getSISize(c.size), cmd]), "DCC-FILE"); client.munger.entries[".inline-buttons"].enabled = false; return true;} |
var msg = filterOutput(e.action, "ACTION", "ME!"); | var msg = filterOutput(e.action, "ACTION", target); | function cmdDescribe(e){ var target = e.server.addTarget(e.target); var msg = filterOutput(e.action, "ACTION", "ME!"); e.sourceObject.display(msg, "ACTION", "ME!", target); target.act(msg);} |
if (!gPromptService.prompt(window, title, msg, propValue, false, dummy)) { | if (!gPromptService.prompt(window, title, msg, propValue, null, dummy)) { | cmdEditSelectedProperty: function() { var style = this.getSelectedRule().style; var propname = this.getSelectedProp(); var propval = style.getPropertyValue(propname); var priority = style.getPropertyPriority(propname); var bundle = this.mPanel.panelset.stringBundle; var msg = bundle.getString("styleRulePropertyValue.message"); var title = bundle.getString("styleRuleEditProperty.title"); var propValue = { value: propval }; var dummy = { value: false }; if (!gPromptService.prompt(window, title, msg, propValue, false, dummy)) { return; } style.removeProperty(propname); style.setProperty(propname, propValue.value, priority); this.mPropsBoxObject.invalidate(); }, |
propval = prompt("Enter the property value:", propval); if (!propval) return; | var bundle = this.mPanel.panelset.stringBundle; var msg = bundle.getString("styleRulePropertyValue.message"); var title = bundle.getString("styleRuleEditProperty.title"); var propValue = { value: propval }; var dummy = { value: false }; if (!gPromptService.prompt(window, title, msg, propValue, false, dummy)) { return; } | cmdEditSelectedProperty: function() { var style = this.getSelectedRule().style; var propname = this.getSelectedProp(); var propval = style.getPropertyValue(propname); var priority = style.getPropertyPriority(propname); propval = prompt("Enter the property value:", propval); if (!propval) return; style.removeProperty(propname); style.setProperty(propname, propval, priority); this.mPropsBoxObject.invalidate(); }, |
style.setProperty(propname, propval, priority); | style.setProperty(propname, propValue.value, priority); | cmdEditSelectedProperty: function() { var style = this.getSelectedRule().style; var propname = this.getSelectedProp(); var propval = style.getPropertyValue(propname); var priority = style.getPropertyPriority(propname); propval = prompt("Enter the property value:", propval); if (!propval) return; style.removeProperty(propname); style.setProperty(propname, propval, priority); this.mPropsBoxObject.invalidate(); }, |
var scriptRec = console.scripts[e.breakpointRec.fileName]; if (!scriptRec) | var containerRec = console.scripts[e.breakpointRec.fileName]; if (!containerRec) | function cmdFindBp (e){ var scriptRec = console.scripts[e.breakpointRec.fileName]; if (!scriptRec) { dd ("breakpoint in unknown source"); return false; } var sourceView = console.sourceView; cmdFindURL ({url: scriptRec.script.fileName, rangeStart: e.breakpointRec.line, rangeEnd: e.breakpointRec.line}); return true;} |
cmdFindURL ({url: scriptRec.script.fileName, | cmdFindURL ({url: containerRec.fileName, | function cmdFindBp (e){ var scriptRec = console.scripts[e.breakpointRec.fileName]; if (!scriptRec) { dd ("breakpoint in unknown source"); return false; } var sourceView = console.sourceView; cmdFindURL ({url: scriptRec.script.fileName, rangeStart: e.breakpointRec.line, rangeEnd: e.breakpointRec.line}); return true;} |
if (typeof nsFindData != "undefined") | if (typeof nsFindInstData != "undefined") | function cmdFindString (e){ var source2View = console.views.source2; if (!source2View.tabs) return; var index = source2View.tabs.selectedIndex; if (!(index in source2View.sourceTabList)) return; var browser = source2View.sourceTabList[index].iframe; if (typeof nsFindData != "undefined") { if (!("findData" in console)) console.findData = new nsFindInstData(); console.findData.browser = browser; console.findData.rootSearchWindow = browser.contentWindow; console.findData.currentSearchWindow = browser.contentWindow; findInPage(console.findData); } else { findInPage(browser, browser.contentWindow, browser.contentWindow); }} |
return; | function cmdGotoURL(e){ 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-newwin") { openTopWin(e.url); return; } var window = getWindowByType("navigator:browser"); if (!window) { openTopWin(e.url); return; } if (e.command.name == "goto-url-newtab") { window.openNewTabWith(e.url, false, 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); } location.href = e.url;} |
|
window.openNewTabWith(e.url); | window.openNewTabWith(e.url, null, null, null, null, false); | 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); } 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;} |
e.sourceObject.frame.contentWindow.location = "javascript:void(view.dispatch('" + decodeURI(ary[1]) + "'))"; | e.sourceObject.frame.contentWindow.location.href = "javascript:void(view.dispatch('" + decodeURI(ary[1]) + "'))"; | 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); dispatch("focus-input"); return; } var window = getWindowByType("navigator:browser"); if (!window) { openTopWin(e.url); dispatch("focus-input"); 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); } dispatch("focus-input"); 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); dispatch("focus-input"); return; } location.href = e.url; dispatch("focus-input");} |
var cuser = e.channel.getUser(e.nickname); if (!cuser) | if (!e.user) e.user = e.channel.getUser(e.nickname); if (!e.user) | function cmdKick(e) { var cuser = e.channel.getUser(e.nickname); if (!cuser) { display(getMsg(MSG_ERR_UNKNOWN_USER, e.nickname), MT_ERROR); return; } if (e.command.name == "kick-ban") { var hostmask = e.user.host.replace(/^[^.]+/, "*"); e.server.sendData("MODE " + e.channel.name + " +b *!" + e.user.name + "@" + hostmask + "\n"); } cuser.kick(e.reason);} |
cuser.kick(e.reason); | e.user.kick(e.reason); | function cmdKick(e) { var cuser = e.channel.getUser(e.nickname); if (!cuser) { display(getMsg(MSG_ERR_UNKNOWN_USER, e.nickname), MT_ERROR); return; } if (e.command.name == "kick-ban") { var hostmask = e.user.host.replace(/^[^.]+/, "*"); e.server.sendData("MODE " + e.channel.name + " +b *!" + e.user.name + "@" + hostmask + "\n"); } cuser.kick(e.reason);} |
if (!e.channelName) | if (!e.channelName || !e.inputData) | function cmdList(e){ e.network.list = new Array(); e.network.list.regexp = null; if (!e.channelName) e.channelName = ""; e.server.sendData("LIST " + e.channelName + "\n");} |
var msg = filterOutput(e.action, "ACTION", "ME!"); | var msg = filterOutput(e.action, "ACTION", e.sourceObject); | function cmdMe(e){ if (!("act" in e.sourceObject)) { display(getMsg(MSG_ERR_IMPROPER_VIEW, "me"), MT_ERROR); return; } var msg = filterOutput(e.action, "ACTION", "ME!"); e.sourceObject.display(msg, "ACTION", "ME!", e.sourceObject); e.sourceObject.act(msg);} |
e.sourceObject.act (fromUnicode(e.action, e.sourceObject)); | e.sourceObject.act (e.action); | function cmdMe(e){ if (!("act" in e.sourceObject)) { display(getMsg(MSG_ERR_IMPROPER_VIEW, "me"), MT_ERROR); return; } e.action = filterOutput (e.action, "ACTION", "ME!"); display (e.action, "ACTION", "ME!", e.sourceObject); e.sourceObject.act (fromUnicode(e.action, e.sourceObject));} |
var msg = filterOutput(e.message, "PRIVMSG", "ME!"); | var msg = filterOutput(e.message, "PRIVMSG", target); | function cmdMsg(e){ var target = e.server.addTarget(e.nickname); var msg = filterOutput(e.message, "PRIVMSG", "ME!"); e.sourceObject.display(msg, "PRIVMSG", "ME!", target); target.say(msg);} |
usr.say(fromUnicode(e.message, e.sourceObject)); | usr.say(e.message, e.sourceObject); | function cmdMsg(e){ var usr = e.server.addUser(e.nickname); var msg = filterOutput(e.message, "PRIVMSG", "ME!"); usr.display(e.message, "PRIVMSG", "ME!", usr); usr.say(fromUnicode(e.message, e.sourceObject));} |
if (!gPromptService.prompt(window, title, msg, propName, false, dummy)) { | if (!gPromptService.prompt(window, title, msg, propName, null, dummy)) { | cmdNewProperty: function() { var bundle = this.mPanel.panelset.stringBundle; var msg = bundle.getString("styleRulePropertyName.message"); var title = bundle.getString("styleRuleNewProperty.title"); var propName = { value: "" }; var propValue = { value: "" }; var dummy = { value: false }; if (!gPromptService.prompt(window, title, msg, propName, false, dummy)) { return; } msg = bundle.getString("styleRulePropertyValue.message"); if (!gPromptService.prompt(window, title, msg, propValue, false, dummy)) { return; } var style = this.getSelectedRule().style; style.setProperty(propName.value, propValue.value, ""); this.mPropsBoxObject.invalidate(); }, |
if (!gPromptService.prompt(window, title, msg, propValue, false, dummy)) { | if (!gPromptService.prompt(window, title, msg, propValue, null, dummy)) { | cmdNewProperty: function() { var bundle = this.mPanel.panelset.stringBundle; var msg = bundle.getString("styleRulePropertyName.message"); var title = bundle.getString("styleRuleNewProperty.title"); var propName = { value: "" }; var propValue = { value: "" }; var dummy = { value: false }; if (!gPromptService.prompt(window, title, msg, propName, false, dummy)) { return; } msg = bundle.getString("styleRulePropertyValue.message"); if (!gPromptService.prompt(window, title, msg, propValue, false, dummy)) { return; } var style = this.getSelectedRule().style; style.setProperty(propName.value, propValue.value, ""); this.mPropsBoxObject.invalidate(); }, |
var propname = prompt("Enter the property name:", ""); if (!propname) return; var propval = prompt("Enter the property value:", ""); if (!propval) return; | var bundle = this.mPanel.panelset.stringBundle; var msg = bundle.getString("styleRulePropertyName.message"); var title = bundle.getString("styleRuleNewProperty.title"); var propName = { value: "" }; var propValue = { value: "" }; var dummy = { value: false }; if (!gPromptService.prompt(window, title, msg, propName, false, dummy)) { return; } msg = bundle.getString("styleRulePropertyValue.message"); if (!gPromptService.prompt(window, title, msg, propValue, false, dummy)) { return; } | cmdNewProperty: function() { var propname = prompt("Enter the property name:", ""); if (!propname) return; var propval = prompt("Enter the property value:", ""); if (!propval) return; var style = this.getSelectedRule().style; style.setProperty(propname, propval, ""); this.mPropsBoxObject.invalidate(); }, |
style.setProperty(propname, propval, ""); | style.setProperty(propName.value, propValue.value, ""); | cmdNewProperty: function() { var propname = prompt("Enter the property name:", ""); if (!propname) return; var propval = prompt("Enter the property value:", ""); if (!propval) return; var style = this.getSelectedRule().style; style.setProperty(propname, propval, ""); this.mPropsBoxObject.invalidate(); }, |
var msg = filterOutput(e.message, "NOTICE", "ME!"); | var msg = filterOutput(e.message, "NOTICE", target); | function cmdNotice(e){ var target = e.server.addTarget(e.nickname); var msg = filterOutput(e.message, "NOTICE", "ME!"); e.sourceObject.display(msg, "NOTICE", "ME!", target); target.notice(msg);} |
e.network.dispatch("ctcp", { target: e.target, code: "PING" }); | e.network.dispatch("ctcp", { target: e.nickname, code: "PING" }); | function cmdPing (e){ e.network.dispatch("ctcp", { target: e.target, code: "PING" });} |
e.message = filterOutput(e.message, "PRIVMSG", "ME!"); | e.message = filterOutput(e.message, "PRIVMSG", user); | function cmdQuery(e){ // We'd rather *not* trigger the user.start event this time. blockEventSounds("user", "start"); var user = openQueryTab(e.server, e.nickname); dispatch("set-current-view", { view: user }); if (e.message) { e.message = filterOutput(e.message, "PRIVMSG", "ME!"); user.display(e.message, "PRIVMSG", "ME!", user); user.say(e.message); } return user;} |
user.say(fromUnicode(e.message, e.sourceObject)); | user.say(e.message, e.sourceObject); | function cmdQuery(e){ var user = openQueryTab(e.server, e.nickname); setCurrentObject(user); if (e.message) { e.message = filterOutput(e.message, "PRIVMSG", "ME!"); user.display(e.message, "PRIVMSG", "ME!", user); user.say(fromUnicode(e.message, e.sourceObject)); } return user;} |
return | return; | function cmdReloadTab (e){ const WINDOW = Components.interfaces.nsIWebProgress.NOTIFY_STATE_WINDOW; if (console.views.source2.sourceTabList.length == 0) return var source2View = console.views.source2; function cb(status) { sourceTab.iframe.addProgressListener (source2View.progressListener, WINDOW); sourceTab.iframe.reload(); }; if (source2View.tabs && e.index == null) { e.index = source2View.tabs.selectedIndex; } else if (!source2View.tabs || e.index < 0 || e.index > source2View.sourceTabList.length - 1) { display (MSN_ERR_INVALID_PARAM, ["index", e.index], MT_ERROR); return; } var sourceTab = console.views.source2.sourceTabList[e.index]; source2View.onSourceTabUnloaded (sourceTab, Components.results.NS_OK); sourceTab.sourceText.reloadSource(cb);} |
var templateName; | function cmdSaveProfile (e){ function onComplete (i) { var msg = getMsg(MSN_PROFILE_SAVED, getURLSpecFromFile(file.localFile)); display (msg); console.status = msg; file.close(); }; var templatePfx = "profile.template."; var i; var ext; if (!e.targetFile || e.targetFile == "?") { var list = console.prefManager.listPrefs(templatePfx); var extList = ""; for (i = 0; i < list.length; ++i) { ext = list[i].substr(templatePfx.length); if (list[i].search(/html|htm|xml|txt/i) == -1) extList += "*." + ext + " "; } var rv = pickSaveAs(MSG_SAVE_PROFILE, "$html $xml $text " + extList + "$all"); if (rv.reason == PICK_CANCEL) return null; e.targetFile = rv.file; } var file = fopen (e.targetFile, ">"); var templateName; var ary = file.localFile.path.match(/\.([^.]+)$/); if (ary) ext = ary[1].toLowerCase(); else ext = "txt"; templateName = templatePfx + ext; var templateFile; if (templateName in console.prefs) templateFile = console.prefs[templateName]; else templateFile = console.prefs[templatePfx + "txt"]; var reportTemplate = console.profiler.loadTemplate(templateFile); var scriptInstanceList = new Array(); var j; if (!("urlList" in e) || e.urlList.length == 0) { if ("url" in e && e.url) e.urlList = [e.url]; else e.urlList = keys(console.scriptManagers); } e.urlList = e.urlList.sort(); for (i = 0; i < e.urlList.length; ++i) { var url = e.urlList[i]; if (!ASSERT (url in console.scriptManagers, "url not loaded")) continue; var manager = console.scriptManagers[url]; for (j in manager.instances) scriptInstanceList.push (manager.instances[j]); } var rangeList; if (("profile.ranges." + ext) in console.prefs) rangeList = console.prefs["profile.ranges." + ext].split(","); else rangeList = console.prefs["profile.ranges.default"].split(","); var profileReport = new ProfileReport (reportTemplate, file, rangeList, scriptInstanceList); profileReport.onComplete = onComplete; console.profiler.generateReport (profileReport); return file.localFile;} |
|
templateName = templatePfx + ext; var templateFile; if (templateName in console.prefs) templateFile = console.prefs[templateName]; else templateFile = console.prefs[templatePfx + "txt"]; var reportTemplate = console.profiler.loadTemplate(templateFile); | var rv = writeProfile(e, file, ext, onComplete); | function cmdSaveProfile (e){ function onComplete (i) { var msg = getMsg(MSN_PROFILE_SAVED, getURLSpecFromFile(file.localFile)); display (msg); console.status = msg; file.close(); }; var templatePfx = "profile.template."; var i; var ext; if (!e.targetFile || e.targetFile == "?") { var list = console.prefManager.listPrefs(templatePfx); var extList = ""; for (i = 0; i < list.length; ++i) { ext = list[i].substr(templatePfx.length); if (list[i].search(/html|htm|xml|txt/i) == -1) extList += "*." + ext + " "; } var rv = pickSaveAs(MSG_SAVE_PROFILE, "$html $xml $text " + extList + "$all"); if (rv.reason == PICK_CANCEL) return null; e.targetFile = rv.file; } var file = fopen (e.targetFile, ">"); var templateName; var ary = file.localFile.path.match(/\.([^.]+)$/); if (ary) ext = ary[1].toLowerCase(); else ext = "txt"; templateName = templatePfx + ext; var templateFile; if (templateName in console.prefs) templateFile = console.prefs[templateName]; else templateFile = console.prefs[templatePfx + "txt"]; var reportTemplate = console.profiler.loadTemplate(templateFile); var scriptInstanceList = new Array(); var j; if (!("urlList" in e) || e.urlList.length == 0) { if ("url" in e && e.url) e.urlList = [e.url]; else e.urlList = keys(console.scriptManagers); } e.urlList = e.urlList.sort(); for (i = 0; i < e.urlList.length; ++i) { var url = e.urlList[i]; if (!ASSERT (url in console.scriptManagers, "url not loaded")) continue; var manager = console.scriptManagers[url]; for (j in manager.instances) scriptInstanceList.push (manager.instances[j]); } var rangeList; if (("profile.ranges." + ext) in console.prefs) rangeList = console.prefs["profile.ranges." + ext].split(","); else rangeList = console.prefs["profile.ranges.default"].split(","); var profileReport = new ProfileReport (reportTemplate, file, rangeList, scriptInstanceList); profileReport.onComplete = onComplete; console.profiler.generateReport (profileReport); return file.localFile;} |
var scriptInstanceList = new Array(); var j; if (!("urlList" in e) || e.urlList.length == 0) { if ("url" in e && e.url) e.urlList = [e.url]; else e.urlList = keys(console.scriptManagers); } e.urlList = e.urlList.sort(); for (i = 0; i < e.urlList.length; ++i) { var url = e.urlList[i]; if (!ASSERT (url in console.scriptManagers, "url not loaded")) continue; var manager = console.scriptManagers[url]; for (j in manager.instances) scriptInstanceList.push (manager.instances[j]); } var rangeList; if (("profile.ranges." + ext) in console.prefs) rangeList = console.prefs["profile.ranges." + ext].split(","); else rangeList = console.prefs["profile.ranges.default"].split(","); var profileReport = new ProfileReport (reportTemplate, file, rangeList, scriptInstanceList); profileReport.onComplete = onComplete; console.profiler.generateReport (profileReport); return file.localFile; | return rv.localFile; | function cmdSaveProfile (e){ function onComplete (i) { var msg = getMsg(MSN_PROFILE_SAVED, getURLSpecFromFile(file.localFile)); display (msg); console.status = msg; file.close(); }; var templatePfx = "profile.template."; var i; var ext; if (!e.targetFile || e.targetFile == "?") { var list = console.prefManager.listPrefs(templatePfx); var extList = ""; for (i = 0; i < list.length; ++i) { ext = list[i].substr(templatePfx.length); if (list[i].search(/html|htm|xml|txt/i) == -1) extList += "*." + ext + " "; } var rv = pickSaveAs(MSG_SAVE_PROFILE, "$html $xml $text " + extList + "$all"); if (rv.reason == PICK_CANCEL) return null; e.targetFile = rv.file; } var file = fopen (e.targetFile, ">"); var templateName; var ary = file.localFile.path.match(/\.([^.]+)$/); if (ary) ext = ary[1].toLowerCase(); else ext = "txt"; templateName = templatePfx + ext; var templateFile; if (templateName in console.prefs) templateFile = console.prefs[templateName]; else templateFile = console.prefs[templatePfx + "txt"]; var reportTemplate = console.profiler.loadTemplate(templateFile); var scriptInstanceList = new Array(); var j; if (!("urlList" in e) || e.urlList.length == 0) { if ("url" in e && e.url) e.urlList = [e.url]; else e.urlList = keys(console.scriptManagers); } e.urlList = e.urlList.sort(); for (i = 0; i < e.urlList.length; ++i) { var url = e.urlList[i]; if (!ASSERT (url in console.scriptManagers, "url not loaded")) continue; var manager = console.scriptManagers[url]; for (j in manager.instances) scriptInstanceList.push (manager.instances[j]); } var rangeList; if (("profile.ranges." + ext) in console.prefs) rangeList = console.prefs["profile.ranges." + ext].split(","); else rangeList = console.prefs["profile.ranges.default"].split(","); var profileReport = new ProfileReport (reportTemplate, file, rangeList, scriptInstanceList); profileReport.onComplete = onComplete; console.profiler.generateReport (profileReport); return file.localFile;} |
return; | return null; | function cmdSaveTab (e){ var source2View = console.views.source2; if (source2View.tabs && e.index == null) { e.index = source2View.tabs.selectedIndex; if (!(e.index in source2View.sourceTabList)) return; } else if (!source2View.tabs || e.index < 0 || e.index > source2View.sourceTabList.length - 1) { display (MSN_ERR_INVALID_PARAM, ["index", e.index], MT_ERROR); return null; } var sourceText = source2View.sourceTabList[e.index].sourceText; var fileString; if (!e.targetFile || e.targetFile == "?") { var fileName = sourceText.url; //dd ("fileName is " + fileName); if (fileName.search(/^\w+:/) != -1) { var shortName = getFileFromPath(fileName); if (fileName != shortName) fileName = shortName; else fileName = ""; } else fileName = ""; var rv = pickSaveAs(MSG_SAVE_SOURCE, "*.js $xml $text $all", fileName); if (rv.reason == PICK_CANCEL) return null; e.targetFile = rv.file; fileString = rv.file.leafName; } else { fileString = e.targetFile; } var file = fopen (e.targetFile, MODE_WRONLY | MODE_CREATE | MODE_TRUNCATE); if (fileString.search (/xml$/i) == -1) { for (var i = 0; i < sourceText.lines.length; ++i) file.write(sourceText.lines[i] + "\n"); } else { if ("markup" in sourceText) file.write (sourceText.markup); else display (MSG_ERR_FORMAT_NOT_AVAILABLE, MT_ERROR); } file.close(); return file.localFile.path;} |
var msg = filterOutput(e.message, "PRIVMSG", "ME!"); | var msg = filterOutput(e.message, "PRIVMSG", e.sourceObject); | function cmdSay(e){ if (!("say" in e.sourceObject)) { display(getMsg(MSG_ERR_IMPROPER_VIEW, "say"), MT_ERROR); return; } var msg = filterOutput(e.message, "PRIVMSG", "ME!"); e.sourceObject.display(msg, "PRIVMSG", "ME!", e.sourceObject); e.sourceObject.say(msg);} |
priority = priority == "!important" ? "!blah" : "!important"; | priority = priority == "important" ? "" : "important"; | cmdToggleSelectedImportant: function() { var style = this.getSelectedRule().style; var propname = this.getSelectedProp(); var propval = style.getPropertyValue(propname); var priority = style.getPropertyPriority(propname); priority = priority == "!important" ? "!blah" : "!important"; style.removeProperty(propname); style.setProperty(propname, propval, priority); this.mPropsBoxObject.invalidate(); }, |
e.channel.setTopic(fromUnicode(e.newTopic, e.channel)); | e.channel.setTopic(e.newTopic); | function cmdTopic(e){ if (!e.newTopic) e.server.sendData ("TOPIC " + e.channel.name + "\n"); else e.channel.setTopic(fromUnicode(e.newTopic, e.channel));} |
labelDefault = getMsgFrom (bundle, "cmd." + aliasFor + ".label", null, name); | if (aliasFor) labelDefault = getMsgFrom (bundle, "cmd." + aliasFor + ".label", null, name); | function cmgr_defcmds (cmdary){ var len = cmdary.length; var commands = new Object(); var bundle = ("stringBundle" in cmdary ? cmdary.stringBundle : this.defaultBundle); for (var i = 0; i < len; ++i) { var name = cmdary[i][0]; var func = cmdary[i][1]; var flags = cmdary[i][2]; var usage = getMsgFrom(bundle, "cmd." + name + ".params", null, ""); var helpDefault; var labelDefault = name; var aliasFor; if (flags & CMD_NO_HELP) helpDefault = MSG_NO_HELP; if (typeof func == "string") { var ary = func.match(/(\S+)/); if (ary) aliasFor = ary[1]; helpDefault = getMsg (MSN_DEFAULT_ALIAS_HELP, func); labelDefault = getMsgFrom (bundle, "cmd." + aliasFor + ".label", null, name); } var label = getMsgFrom(bundle, "cmd." + name + ".label", null, labelDefault); var help = getMsgFrom(bundle, "cmd." + name + ".help", null, helpDefault); var keystr = getMsgFrom (bundle, "cmd." + name + ".key", null, ""); var command = new CommandRecord (name, func, usage, help, label, flags, keystr); if (aliasFor) command.aliasFor = aliasFor; this.addCommand(command); commands[name] = command; } return commands;} |
if (partialName.length == this.commands[i].name.length) return [this.commands[i]]; else | function cmgr_list (partialName){ /* returns array of command objects which look like |partialName|, or * all commands if |partialName| is not specified */ if ((typeof partialName == "undefined") || (String(partialName) == "")) return this.commands; var ary = new Array(); for (var i in this.commands) { if (this.commands[i].name.indexOf(partialName) == 0) if (partialName.length == this.commands[i].name.length) /* exact match */ return [this.commands[i]]; else ary.push (this.commands[i]); } return ary;} |
|
return cmdNames.sort(); | return (cmdNames.length > 0) ? cmdNames.sort() : []; | function cmgr_listnames (partialName){ var cmds = this.list(partialName); var cmdNames = new Array(); for (var c in cmds) cmdNames.push (cmds[c].name); return cmdNames.sort();} |
this.description = getMsg("rule_" + name); | if (name[0] != ".") this.description = getMsg("rule_" + name); | function CMungerEntry (name, regex, className, enable, tagName){ this.name = name; this.description = getMsg("rule_" + name); this.enabled = (typeof enable == "undefined" ? true : enable); this.tagName = (tagName) ? tagName : "html:span"; if (regex instanceof RegExp) this.regex = regex; else this.lambdaMatch = regex; if (typeof className == "function") this.lambdaReplace = className; else this.className = className; } |
if (inboxFolder.hasNewMessages) inboxFolder.clearNewMessages(); | inboxFolder.clearNewMessages(); | function CoalesceGetMsgsForPop3ServersByDestFolder(currentServer, pop3DownloadServersArray, localFoldersToDownloadTo){ var outNumFolders = new Object(); var inboxFolder = currentServer.rootMsgFolder.getFoldersWithFlag(0x1000, 1, outNumFolders); pop3Server = currentServer.QueryInterface(Components.interfaces.nsIPop3IncomingServer); // coalesce the servers that download into the same folder... var index = localFoldersToDownloadTo.GetIndexOf(inboxFolder); if (index == -1) { if(inboxFolder) { inboxFolder.biffState = Components.interfaces.nsIMsgFolder.nsMsgBiffState_NoMail; if (inboxFolder.hasNewMessages) inboxFolder.clearNewMessages(); } localFoldersToDownloadTo.AppendElement(inboxFolder); index = pop3DownloadServersArray.length pop3DownloadServersArray[index] = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray); pop3DownloadServersArray[index].AppendElement(currentServer); } else { pop3DownloadServersArray[index].AppendElement(currentServer); }} |
img = FetchElement('img_admin_menu'+i) | img = FetchElement('img_admin_menu'+i); | function Collapse_all() { for (var i=0; i<=20; i++) { img = FetchElement('img_admin_menu'+i) if (img) { KillCookie('admin_menu'+i) Switch(img) } } } |
KillCookie('admin_menu'+i) Switch(img) | KillCookie('admin_menu'+i); Switch(img); | function Collapse_all() { for (var i=0; i<=20; i++) { img = FetchElement('img_admin_menu'+i) if (img) { KillCookie('admin_menu'+i) Switch(img) } } } |
var endDate = getElementValue("end-datetime"); if (getElementValue("all-day-event-checkbox", "checked") ) endDate.setDate(endDate.getDate() + 1); else endDate.setDate(endDate.getDate() - 1); updateStartEndItemEnabled(); updateOKButton(); | updateDuration(); updateStartEndItemEnabled(); updateOKButton(); | function commandAllDay(){ var endDate = getElementValue("end-datetime"); //user enddate == ical enddate - 1 (for allday events) if (getElementValue("all-day-event-checkbox", "checked") ) endDate.setDate(endDate.getDate() + 1); else endDate.setDate(endDate.getDate() - 1); updateStartEndItemEnabled(); updateOKButton();} |
AbUpdateCommandDelete(); | function CommandUpdate_AddressBook(){ dump("CommandUpdate_AddressBook\n"); // get selection info from dir pane var tree = document.getElementById('dirTree'); var oneAddressBookSelected = false; if ( tree && tree.selectedItems && (tree.selectedItems.length == 1) ) oneAddressBookSelected = true; dump("oneAddressBookSelected = " + oneAddressBookSelected + "\n"); // get selection info from results pane var selectedCards = GetSelectedAddresses(); var oneOrMoreCardsSelected = false; if ( selectedCards ) oneOrMoreCardsSelected = true; // set commands to enabled / disabled goSetCommandEnabled('cmd_PrintCard', oneOrMoreCardsSelected); goSetCommandEnabled('cmd_SortByName', oneAddressBookSelected); goSetCommandEnabled('cmd_SortByEmail', oneAddressBookSelected); goSetCommandEnabled('cmd_SortByPhone', oneAddressBookSelected); AbUpdateCommandDelete();} |
|
goUpdateCommand('cmd_getNewMessages'); goUpdateCommand('cmd_find'); goUpdateCommand('cmd_findAgain'); goUpdateCommand('cmd_markAsRead'); goUpdateCommand('cmd_markThreadAsRead'); goUpdateCommand('cmd_markAllRead'); goUpdateCommand('cmd_markAsFlagged'); goUpdateCommand('cmd_file'); | function CommandUpdate_Mail(){ goUpdateCommand('cmd_delete'); goUpdateCommand('button_delete'); goUpdateCommand('cmd_shiftDelete'); goUpdateCommand('cmd_print'); goUpdateCommand('cmd_saveAsFile'); goUpdateCommand('cmd_saveAsTemplate'); goUpdateCommand('cmd_viewPageSource'); goUpdateCommand('cmd_reload');} |
|
goUpdateCommand('cmd_delete'); | function CommandUpdate_Mail(){ /*var messagePane = top.document.getElementById('messagePane'); var drawFocusBorder = messagePane.getAttribute('draw-focus-border'); if ( MessagePaneHasFocus() ) { if ( !drawFocusBorder ) messagePane.setAttribute('draw-focus-border', 'true'); } else { if ( drawFocusBorder ) messagePane.removeAttribute('draw-focus-border'); }*/ goUpdateCommand('button_delete');} |
|
goUpdateCommand('cmd_getMsgsForAuthAccounts'); | function CommandUpdate_Mail(){ goUpdateCommand('button_delete'); goUpdateCommand('cmd_delete'); goUpdateCommand('cmd_editDraft'); goUpdateCommand('cmd_nextMsg'); goUpdateCommand('cmd_nextUnreadMsg'); goUpdateCommand('cmd_nextUnreadThread'); goUpdateCommand('cmd_nextFlaggedMsg'); goUpdateCommand('cmd_previousMsg'); goUpdateCommand('cmd_previousUnreadMsg'); goUpdateCommand('cmd_previousFlaggedMsg'); goUpdateCommand('cmd_sortByThread'); goUpdateCommand('cmd_viewAllMsgs'); goUpdateCommand('cmd_viewUnreadMsgs'); goUpdateCommand('cmd_expandAllThreads'); goUpdateCommand('cmd_collapseAllThreads'); goUpdateCommand('cmd_renameFolder'); goUpdateCommand('cmd_setFolderCharset'); goUpdateCommand('cmd_getNewMessages'); goUpdateCommand('cmd_getNextNMessages'); goUpdateCommand('cmd_find'); goUpdateCommand('cmd_findAgain'); goUpdateCommand('cmd_markAllRead'); goUpdateCommand('cmd_emptyTrash'); goUpdateCommand('cmd_compactFolder');} |
|
goUpdateCommand('button_delete'); goUpdateCommand('button_reply'); goUpdateCommand('button_replyall'); goUpdateCommand('button_forward'); goUpdateCommand('cmd_shiftDelete'); | function CommandUpdate_Mail(){ /*var messagePane = top.document.getElementById('messagePane'); var drawFocusBorder = messagePane.getAttribute('draw-focus-border'); if ( MessagePaneHasFocus() ) { if ( !drawFocusBorder ) messagePane.setAttribute('draw-focus-border', 'true'); } else { if ( drawFocusBorder ) messagePane.removeAttribute('draw-focus-border'); }*/ goUpdateCommand('cmd_delete'); goUpdateCommand('button_delete'); goUpdateCommand('button_reply'); goUpdateCommand('button_replyall'); goUpdateCommand('button_forward'); goUpdateCommand('cmd_shiftDelete'); goUpdateCommand('cmd_nextMsg'); goUpdateCommand('cmd_nextUnreadMsg'); goUpdateCommand('cmd_nextUnreadThread'); goUpdateCommand('cmd_nextFlaggedMsg'); goUpdateCommand('cmd_previousMsg'); goUpdateCommand('cmd_previousUnreadMsg'); goUpdateCommand('cmd_previousFlaggedMsg'); goUpdateCommand('cmd_sortBySubject'); goUpdateCommand('cmd_sortByDate'); goUpdateCommand('cmd_sortByFlag'); goUpdateCommand('cmd_sortByPriority'); goUpdateCommand('cmd_sortBySender'); goUpdateCommand('cmd_sortBySize'); goUpdateCommand('cmd_sortByStatus'); goUpdateCommand('cmd_sortByRead'); goUpdateCommand('cmd_sortByOrderReceived'); goUpdateCommand('cmd_sortByThread'); goUpdateCommand('cmd_viewAllMsgs'); goUpdateCommand('cmd_viewUnreadMsgs'); goUpdateCommand('cmd_expandAllThreads'); goUpdateCommand('cmd_collapseAllThreads'); goUpdateCommand('cmd_renameFolder'); goUpdateCommand('cmd_openMessage'); goUpdateCommand('cmd_print'); goUpdateCommand('cmd_saveAsFile'); goUpdateCommand('cmd_saveAsTemplate'); goUpdateCommand('cmd_viewPageSource'); goUpdateCommand('cmd_reload');} |
|
goUpdateCommand('cmd_sortBySubject'); goUpdateCommand('cmd_sortByDate'); goUpdateCommand('cmd_sortByFlag'); goUpdateCommand('cmd_sortByPriority'); goUpdateCommand('cmd_sortBySender'); goUpdateCommand('cmd_sortBySize'); goUpdateCommand('cmd_sortByStatus'); goUpdateCommand('cmd_sortByRead'); goUpdateCommand('cmd_sortByOrderReceived'); | function CommandUpdate_Mail(){ /*var messagePane = top.document.getElementById('messagePane'); var drawFocusBorder = messagePane.getAttribute('draw-focus-border'); if ( MessagePaneHasFocus() ) { if ( !drawFocusBorder ) messagePane.setAttribute('draw-focus-border', 'true'); } else { if ( drawFocusBorder ) messagePane.removeAttribute('draw-focus-border'); }*/ goUpdateCommand('cmd_delete'); goUpdateCommand('button_delete'); goUpdateCommand('button_reply'); goUpdateCommand('button_replyall'); goUpdateCommand('button_forward'); goUpdateCommand('cmd_shiftDelete'); goUpdateCommand('cmd_nextMsg'); goUpdateCommand('cmd_nextUnreadMsg'); goUpdateCommand('cmd_nextUnreadThread'); goUpdateCommand('cmd_nextFlaggedMsg'); goUpdateCommand('cmd_previousMsg'); goUpdateCommand('cmd_previousUnreadMsg'); goUpdateCommand('cmd_previousFlaggedMsg'); goUpdateCommand('cmd_sortBySubject'); goUpdateCommand('cmd_sortByDate'); goUpdateCommand('cmd_sortByFlag'); goUpdateCommand('cmd_sortByPriority'); goUpdateCommand('cmd_sortBySender'); goUpdateCommand('cmd_sortBySize'); goUpdateCommand('cmd_sortByStatus'); goUpdateCommand('cmd_sortByRead'); goUpdateCommand('cmd_sortByOrderReceived'); goUpdateCommand('cmd_sortByThread'); goUpdateCommand('cmd_viewAllMsgs'); goUpdateCommand('cmd_viewUnreadMsgs'); goUpdateCommand('cmd_expandAllThreads'); goUpdateCommand('cmd_collapseAllThreads'); goUpdateCommand('cmd_renameFolder'); goUpdateCommand('cmd_openMessage'); goUpdateCommand('cmd_print'); goUpdateCommand('cmd_saveAsFile'); goUpdateCommand('cmd_saveAsTemplate'); goUpdateCommand('cmd_viewPageSource'); goUpdateCommand('cmd_reload');} |
|
goUpdateCommand('cmd_openMessage'); goUpdateCommand('cmd_print'); goUpdateCommand('cmd_saveAsFile'); goUpdateCommand('cmd_saveAsTemplate'); goUpdateCommand('cmd_viewPageSource'); goUpdateCommand('cmd_reload'); | goUpdateCommand('cmd_getNewMessages'); goUpdateCommand('cmd_find'); goUpdateCommand('cmd_findAgain'); goUpdateCommand('cmd_markAllRead'); goUpdateCommand('cmd_emptyTrash'); goUpdateCommand('cmd_compactFolder'); | function CommandUpdate_Mail(){ /*var messagePane = top.document.getElementById('messagePane'); var drawFocusBorder = messagePane.getAttribute('draw-focus-border'); if ( MessagePaneHasFocus() ) { if ( !drawFocusBorder ) messagePane.setAttribute('draw-focus-border', 'true'); } else { if ( drawFocusBorder ) messagePane.removeAttribute('draw-focus-border'); }*/ goUpdateCommand('cmd_delete'); goUpdateCommand('button_delete'); goUpdateCommand('button_reply'); goUpdateCommand('button_replyall'); goUpdateCommand('button_forward'); goUpdateCommand('cmd_shiftDelete'); goUpdateCommand('cmd_nextMsg'); goUpdateCommand('cmd_nextUnreadMsg'); goUpdateCommand('cmd_nextUnreadThread'); goUpdateCommand('cmd_nextFlaggedMsg'); goUpdateCommand('cmd_previousMsg'); goUpdateCommand('cmd_previousUnreadMsg'); goUpdateCommand('cmd_previousFlaggedMsg'); goUpdateCommand('cmd_sortBySubject'); goUpdateCommand('cmd_sortByDate'); goUpdateCommand('cmd_sortByFlag'); goUpdateCommand('cmd_sortByPriority'); goUpdateCommand('cmd_sortBySender'); goUpdateCommand('cmd_sortBySize'); goUpdateCommand('cmd_sortByStatus'); goUpdateCommand('cmd_sortByRead'); goUpdateCommand('cmd_sortByOrderReceived'); goUpdateCommand('cmd_sortByThread'); goUpdateCommand('cmd_viewAllMsgs'); goUpdateCommand('cmd_viewUnreadMsgs'); goUpdateCommand('cmd_expandAllThreads'); goUpdateCommand('cmd_collapseAllThreads'); goUpdateCommand('cmd_renameFolder'); goUpdateCommand('cmd_openMessage'); goUpdateCommand('cmd_print'); goUpdateCommand('cmd_saveAsFile'); goUpdateCommand('cmd_saveAsTemplate'); goUpdateCommand('cmd_viewPageSource'); goUpdateCommand('cmd_reload');} |
goUpdateCommand('cmd_getMsgsForAuthAccounts'); | function CommandUpdate_Mail(){ goUpdateCommand('cmd_reply'); goUpdateCommand('cmd_replySender'); goUpdateCommand('cmd_replyGroup'); goUpdateCommand('cmd_replyall'); goUpdateCommand('cmd_forward'); goUpdateCommand('cmd_forwardInline'); goUpdateCommand('cmd_forwardAttachment'); goUpdateCommand('button_reply'); goUpdateCommand('button_replyall'); goUpdateCommand('button_forward'); goUpdateCommand('cmd_editAsNew'); goUpdateCommand('cmd_delete'); goUpdateCommand('button_delete'); goUpdateCommand('cmd_shiftDelete'); goUpdateCommand('cmd_print'); goUpdateCommand('cmd_saveAsFile'); goUpdateCommand('cmd_saveAsTemplate'); goUpdateCommand('cmd_viewPageSource'); goUpdateCommand('cmd_reload'); goUpdateCommand('cmd_getNewMessages'); goUpdateCommand('cmd_getNextNMessages'); goUpdateCommand('cmd_find'); goUpdateCommand('cmd_findAgain'); goUpdateCommand('cmd_markAsRead'); goUpdateCommand('cmd_markThreadAsRead'); goUpdateCommand('cmd_markAllRead'); goUpdateCommand('cmd_markAsFlagged'); goUpdateCommand('cmd_downloadFlagged'); goUpdateCommand('cmd_downloadSelected'); goUpdateCommand('cmd_file');} |
|
goUpdateCommand("cmd_insert"); goUpdateCommand("cmd_link"); goUpdateCommand("cmd_anchor"); goUpdateCommand("cmd_image"); goUpdateCommand("cmd_hline"); goUpdateCommand("cmd_table"); goUpdateCommand("cmd_insertHTML"); goUpdateCommand("cmd_insertChars"); goUpdateCommand("cmd_insertBreak"); goUpdateCommand("cmd_insertBreakAll"); | if (msgCompose.composeHTML) { goUpdateCommand("cmd_insert"); goUpdateCommand("cmd_link"); goUpdateCommand("cmd_anchor"); goUpdateCommand("cmd_image"); goUpdateCommand("cmd_hline"); goUpdateCommand("cmd_table"); goUpdateCommand("cmd_insertHTML"); goUpdateCommand("cmd_insertChars"); goUpdateCommand("cmd_insertBreak"); goUpdateCommand("cmd_insertBreakAll"); } | function CommandUpdate_MsgCompose(){// dump("\nCommandUpdate_MsgCompose\n"); //File Menu goUpdateCommand("cmd_attachFile"); goUpdateCommand("cmd_attachPage"); goUpdateCommand("cmd_close"); goUpdateCommand("cmd_saveDefault"); goUpdateCommand("cmd_saveAsDraft"); goUpdateCommand("cmd_saveAsTemplate"); goUpdateCommand("cmd_sendNow"); goUpdateCommand("cmd_sendLater"); goUpdateCommand("cmd_quit"); //Edit Menu goUpdateCommand("cmd_pasteQuote"); goUpdateCommand("cmd_find"); goUpdateCommand("cmd_findNext"); goUpdateCommand("cmd_account"); goUpdateCommand("cmd_preferences"); //View Menu goUpdateCommand("cmd_showComposeToolbar"); goUpdateCommand("cmd_showFormatToolbar"); //Insert Menu goUpdateCommand("cmd_insert"); goUpdateCommand("cmd_link"); goUpdateCommand("cmd_anchor"); goUpdateCommand("cmd_image"); goUpdateCommand("cmd_hline"); goUpdateCommand("cmd_table"); goUpdateCommand("cmd_insertHTML"); goUpdateCommand("cmd_insertChars"); goUpdateCommand("cmd_insertBreak"); goUpdateCommand("cmd_insertBreakAll"); //Format Menu goUpdateCommand("cmd_format"); goUpdateCommand("cmd_decreaseFont"); goUpdateCommand("cmd_increaseFont"); goUpdateCommand("cmd_bold"); goUpdateCommand("cmd_italic"); goUpdateCommand("cmd_underline"); goUpdateCommand("cmd_strikethrough"); goUpdateCommand("cmd_superscript"); goUpdateCommand("cmd_subscript"); goUpdateCommand("cmd_nobreak"); goUpdateCommand("cmd_em"); goUpdateCommand("cmd_strong"); goUpdateCommand("cmd_cite"); goUpdateCommand("cmd_abbr"); goUpdateCommand("cmd_acronym"); goUpdateCommand("cmd_code"); goUpdateCommand("cmd_samp"); goUpdateCommand("cmd_var"); goUpdateCommand("cmd_removeList"); goUpdateCommand("cmd_ul"); goUpdateCommand("cmd_ol"); goUpdateCommand("cmd_dt"); goUpdateCommand("cmd_dd"); goUpdateCommand("cmd_listProperties"); goUpdateCommand("cmd_indent"); goUpdateCommand("cmd_outdent"); goUpdateCommand("cmd_objectProperties"); goUpdateCommand("cmd_InsertTable"); goUpdateCommand("cmd_InsertRowAbove"); goUpdateCommand("cmd_InsertRowBelow"); goUpdateCommand("cmd_InsertColumnBefore"); goUpdateCommand("cmd_InsertColumnAfter"); goUpdateCommand("cmd_SelectTable"); goUpdateCommand("cmd_SelectRow"); goUpdateCommand("cmd_SelectColumn"); goUpdateCommand("cmd_SelectCell"); goUpdateCommand("cmd_SelectAllCells"); goUpdateCommand("cmd_DeleteTable"); goUpdateCommand("cmd_DeleteRow"); goUpdateCommand("cmd_DeleteColumn"); goUpdateCommand("cmd_DeleteCell"); goUpdateCommand("cmd_DeleteCellContents"); goUpdateCommand("cmd_NormalizeTable"); goUpdateCommand("cmd_tableJoinCells"); goUpdateCommand("cmd_tableSplitCell"); goUpdateCommand("cmd_editTable"); //Options Menu goUpdateCommand("cmd_selectAddress"); goUpdateCommand("cmd_spelling"); goUpdateCommand("cmd_outputFormat");} |
goUpdateCommand("cmd_format"); goUpdateCommand("cmd_decreaseFont"); goUpdateCommand("cmd_increaseFont"); goUpdateCommand("cmd_bold"); goUpdateCommand("cmd_italic"); goUpdateCommand("cmd_underline"); goUpdateCommand("cmd_strikethrough"); goUpdateCommand("cmd_superscript"); goUpdateCommand("cmd_subscript"); goUpdateCommand("cmd_nobreak"); goUpdateCommand("cmd_em"); goUpdateCommand("cmd_strong"); goUpdateCommand("cmd_cite"); goUpdateCommand("cmd_abbr"); goUpdateCommand("cmd_acronym"); goUpdateCommand("cmd_code"); goUpdateCommand("cmd_samp"); goUpdateCommand("cmd_var"); goUpdateCommand("cmd_removeList"); goUpdateCommand("cmd_ul"); goUpdateCommand("cmd_ol"); goUpdateCommand("cmd_dt"); goUpdateCommand("cmd_dd"); goUpdateCommand("cmd_listProperties"); goUpdateCommand("cmd_indent"); goUpdateCommand("cmd_outdent"); goUpdateCommand("cmd_objectProperties"); goUpdateCommand("cmd_InsertTable"); goUpdateCommand("cmd_InsertRowAbove"); goUpdateCommand("cmd_InsertRowBelow"); goUpdateCommand("cmd_InsertColumnBefore"); goUpdateCommand("cmd_InsertColumnAfter"); goUpdateCommand("cmd_SelectTable"); goUpdateCommand("cmd_SelectRow"); goUpdateCommand("cmd_SelectColumn"); goUpdateCommand("cmd_SelectCell"); goUpdateCommand("cmd_SelectAllCells"); goUpdateCommand("cmd_DeleteTable"); goUpdateCommand("cmd_DeleteRow"); goUpdateCommand("cmd_DeleteColumn"); goUpdateCommand("cmd_DeleteCell"); goUpdateCommand("cmd_DeleteCellContents"); goUpdateCommand("cmd_NormalizeTable"); goUpdateCommand("cmd_tableJoinCells"); goUpdateCommand("cmd_tableSplitCell"); goUpdateCommand("cmd_editTable"); | if (msgCompose.composeHTML) { goUpdateCommand("cmd_format"); goUpdateCommand("cmd_decreaseFont"); goUpdateCommand("cmd_increaseFont"); goUpdateCommand("cmd_bold"); goUpdateCommand("cmd_italic"); goUpdateCommand("cmd_underline"); goUpdateCommand("cmd_strikethrough"); goUpdateCommand("cmd_superscript"); goUpdateCommand("cmd_subscript"); goUpdateCommand("cmd_nobreak"); goUpdateCommand("cmd_em"); goUpdateCommand("cmd_strong"); goUpdateCommand("cmd_cite"); goUpdateCommand("cmd_abbr"); goUpdateCommand("cmd_acronym"); goUpdateCommand("cmd_code"); goUpdateCommand("cmd_samp"); goUpdateCommand("cmd_var"); goUpdateCommand("cmd_removeList"); goUpdateCommand("cmd_ul"); goUpdateCommand("cmd_ol"); goUpdateCommand("cmd_dt"); goUpdateCommand("cmd_dd"); goUpdateCommand("cmd_listProperties"); goUpdateCommand("cmd_indent"); goUpdateCommand("cmd_outdent"); goUpdateCommand("cmd_objectProperties"); goUpdateCommand("cmd_InsertTable"); goUpdateCommand("cmd_InsertRowAbove"); goUpdateCommand("cmd_InsertRowBelow"); goUpdateCommand("cmd_InsertColumnBefore"); goUpdateCommand("cmd_InsertColumnAfter"); goUpdateCommand("cmd_SelectTable"); goUpdateCommand("cmd_SelectRow"); goUpdateCommand("cmd_SelectColumn"); goUpdateCommand("cmd_SelectCell"); goUpdateCommand("cmd_SelectAllCells"); goUpdateCommand("cmd_DeleteTable"); goUpdateCommand("cmd_DeleteRow"); goUpdateCommand("cmd_DeleteColumn"); goUpdateCommand("cmd_DeleteCell"); goUpdateCommand("cmd_DeleteCellContents"); goUpdateCommand("cmd_NormalizeTable"); goUpdateCommand("cmd_tableJoinCells"); goUpdateCommand("cmd_tableSplitCell"); goUpdateCommand("cmd_editTable"); } | function CommandUpdate_MsgCompose(){// dump("\nCommandUpdate_MsgCompose\n"); //File Menu goUpdateCommand("cmd_attachFile"); goUpdateCommand("cmd_attachPage"); goUpdateCommand("cmd_close"); goUpdateCommand("cmd_saveDefault"); goUpdateCommand("cmd_saveAsDraft"); goUpdateCommand("cmd_saveAsTemplate"); goUpdateCommand("cmd_sendNow"); goUpdateCommand("cmd_sendLater"); goUpdateCommand("cmd_quit"); //Edit Menu goUpdateCommand("cmd_pasteQuote"); goUpdateCommand("cmd_find"); goUpdateCommand("cmd_findNext"); goUpdateCommand("cmd_account"); goUpdateCommand("cmd_preferences"); //View Menu goUpdateCommand("cmd_showComposeToolbar"); goUpdateCommand("cmd_showFormatToolbar"); //Insert Menu goUpdateCommand("cmd_insert"); goUpdateCommand("cmd_link"); goUpdateCommand("cmd_anchor"); goUpdateCommand("cmd_image"); goUpdateCommand("cmd_hline"); goUpdateCommand("cmd_table"); goUpdateCommand("cmd_insertHTML"); goUpdateCommand("cmd_insertChars"); goUpdateCommand("cmd_insertBreak"); goUpdateCommand("cmd_insertBreakAll"); //Format Menu goUpdateCommand("cmd_format"); goUpdateCommand("cmd_decreaseFont"); goUpdateCommand("cmd_increaseFont"); goUpdateCommand("cmd_bold"); goUpdateCommand("cmd_italic"); goUpdateCommand("cmd_underline"); goUpdateCommand("cmd_strikethrough"); goUpdateCommand("cmd_superscript"); goUpdateCommand("cmd_subscript"); goUpdateCommand("cmd_nobreak"); goUpdateCommand("cmd_em"); goUpdateCommand("cmd_strong"); goUpdateCommand("cmd_cite"); goUpdateCommand("cmd_abbr"); goUpdateCommand("cmd_acronym"); goUpdateCommand("cmd_code"); goUpdateCommand("cmd_samp"); goUpdateCommand("cmd_var"); goUpdateCommand("cmd_removeList"); goUpdateCommand("cmd_ul"); goUpdateCommand("cmd_ol"); goUpdateCommand("cmd_dt"); goUpdateCommand("cmd_dd"); goUpdateCommand("cmd_listProperties"); goUpdateCommand("cmd_indent"); goUpdateCommand("cmd_outdent"); goUpdateCommand("cmd_objectProperties"); goUpdateCommand("cmd_InsertTable"); goUpdateCommand("cmd_InsertRowAbove"); goUpdateCommand("cmd_InsertRowBelow"); goUpdateCommand("cmd_InsertColumnBefore"); goUpdateCommand("cmd_InsertColumnAfter"); goUpdateCommand("cmd_SelectTable"); goUpdateCommand("cmd_SelectRow"); goUpdateCommand("cmd_SelectColumn"); goUpdateCommand("cmd_SelectCell"); goUpdateCommand("cmd_SelectAllCells"); goUpdateCommand("cmd_DeleteTable"); goUpdateCommand("cmd_DeleteRow"); goUpdateCommand("cmd_DeleteColumn"); goUpdateCommand("cmd_DeleteCell"); goUpdateCommand("cmd_DeleteCellContents"); goUpdateCommand("cmd_NormalizeTable"); goUpdateCommand("cmd_tableJoinCells"); goUpdateCommand("cmd_tableSplitCell"); goUpdateCommand("cmd_editTable"); //Options Menu goUpdateCommand("cmd_selectAddress"); goUpdateCommand("cmd_spelling"); goUpdateCommand("cmd_outputFormat");} |
} catch(e) {} | function CommandUpdate_MsgCompose(){// dump("\nCommandUpdate_MsgCompose\n"); //File Menu goUpdateCommand("cmd_attachFile"); goUpdateCommand("cmd_attachPage"); goUpdateCommand("cmd_close"); goUpdateCommand("cmd_saveDefault"); goUpdateCommand("cmd_saveAsDraft"); goUpdateCommand("cmd_saveAsTemplate"); goUpdateCommand("cmd_sendNow"); goUpdateCommand("cmd_sendLater"); goUpdateCommand("cmd_quit"); //Edit Menu goUpdateCommand("cmd_pasteQuote"); goUpdateCommand("cmd_find"); goUpdateCommand("cmd_findNext"); goUpdateCommand("cmd_account"); goUpdateCommand("cmd_preferences"); //View Menu goUpdateCommand("cmd_showComposeToolbar"); goUpdateCommand("cmd_showFormatToolbar"); //Insert Menu goUpdateCommand("cmd_insert"); goUpdateCommand("cmd_link"); goUpdateCommand("cmd_anchor"); goUpdateCommand("cmd_image"); goUpdateCommand("cmd_hline"); goUpdateCommand("cmd_table"); goUpdateCommand("cmd_insertHTML"); goUpdateCommand("cmd_insertChars"); goUpdateCommand("cmd_insertBreak"); goUpdateCommand("cmd_insertBreakAll"); //Format Menu goUpdateCommand("cmd_format"); goUpdateCommand("cmd_decreaseFont"); goUpdateCommand("cmd_increaseFont"); goUpdateCommand("cmd_bold"); goUpdateCommand("cmd_italic"); goUpdateCommand("cmd_underline"); goUpdateCommand("cmd_strikethrough"); goUpdateCommand("cmd_superscript"); goUpdateCommand("cmd_subscript"); goUpdateCommand("cmd_nobreak"); goUpdateCommand("cmd_em"); goUpdateCommand("cmd_strong"); goUpdateCommand("cmd_cite"); goUpdateCommand("cmd_abbr"); goUpdateCommand("cmd_acronym"); goUpdateCommand("cmd_code"); goUpdateCommand("cmd_samp"); goUpdateCommand("cmd_var"); goUpdateCommand("cmd_removeList"); goUpdateCommand("cmd_ul"); goUpdateCommand("cmd_ol"); goUpdateCommand("cmd_dt"); goUpdateCommand("cmd_dd"); goUpdateCommand("cmd_listProperties"); goUpdateCommand("cmd_indent"); goUpdateCommand("cmd_outdent"); goUpdateCommand("cmd_objectProperties"); goUpdateCommand("cmd_InsertTable"); goUpdateCommand("cmd_InsertRowAbove"); goUpdateCommand("cmd_InsertRowBelow"); goUpdateCommand("cmd_InsertColumnBefore"); goUpdateCommand("cmd_InsertColumnAfter"); goUpdateCommand("cmd_SelectTable"); goUpdateCommand("cmd_SelectRow"); goUpdateCommand("cmd_SelectColumn"); goUpdateCommand("cmd_SelectCell"); goUpdateCommand("cmd_SelectAllCells"); goUpdateCommand("cmd_DeleteTable"); goUpdateCommand("cmd_DeleteRow"); goUpdateCommand("cmd_DeleteColumn"); goUpdateCommand("cmd_DeleteCell"); goUpdateCommand("cmd_DeleteCellContents"); goUpdateCommand("cmd_NormalizeTable"); goUpdateCommand("cmd_tableJoinCells"); goUpdateCommand("cmd_tableSplitCell"); goUpdateCommand("cmd_editTable"); //Options Menu goUpdateCommand("cmd_selectAddress"); goUpdateCommand("cmd_spelling"); goUpdateCommand("cmd_outputFormat");} |
|
if (field) { var newvalue = field.value; if (gFields[i] == "webpanel") newvalue = field.checked ? "true" : undefined; var oldvalue = Bookmarks.GetTarget(RDF.GetResource(gBookmarkID), RDF.GetResource(gProperties[i]), true); | if (! field) continue | function Commit(){ var changed = false; // Grovel through the fields to see if any of the values have // changed. If so, update the RDF graph and force them to be saved // to disk. for (var i = 0; i < gFields.length; ++i) { var field = document.getElementById(gFields[i]); if (field) { // Get the new value as a literal, using 'null' if the value is empty. var newvalue = field.value; if (gFields[i] == "webpanel") newvalue = field.checked ? "true" : undefined; var oldvalue = Bookmarks.GetTarget(RDF.GetResource(gBookmarkID), RDF.GetResource(gProperties[i]), true); if (oldvalue) oldvalue = oldvalue.QueryInterface(Components.interfaces.nsIRDFLiteral); if (newvalue && gProperties[i] == (NC_NS + "ShortcutURL")) { // shortcuts are always lowercased internally newvalue = newvalue.toLowerCase(); } else if (newvalue && gProperties[i] == (NC_NS + "URL")) { if (newvalue.indexOf(":") < 0) // we're dealing with the URL attribute; // if a scheme isn't specified, use "http://" newvalue = "http://" + newvalue; } if (newvalue) newvalue = RDF.GetLiteral(newvalue); if (updateAttribute(gProperties[i], oldvalue, newvalue)) { changed = true; } } } // Update bookmark schedule if necessary; // if the tab was removed, just skip it var scheduleTab = document.getElementById("ScheduleTab"); if (scheduleTab) { var scheduleRes = "http://home.netscape.com/WEB-rdf#Schedule"; oldvalue = Bookmarks.GetTarget(RDF.GetResource(gBookmarkID), RDF.GetResource(scheduleRes), true); newvalue = ""; var dayRangeNode = document.getElementById("dayRange"); var dayRange = dayRangeNode.selectedItem.getAttribute("value"); if (dayRange) { var startHourRangeNode = document.getElementById("startHourRange"); var startHourRange = startHourRangeNode.selectedItem.getAttribute("value"); var endHourRangeNode = document.getElementById("endHourRange"); var endHourRange = endHourRangeNode.selectedItem.getAttribute("value"); if (parseInt(startHourRange) > parseInt(endHourRange)) { var temp = startHourRange; startHourRange = endHourRange; endHourRange = temp; } var duration = document.getElementById("duration").value; if (!duration) { alert(BookmarksUtils.getLocaleString("pleaseEnterADuration")); return false; } var methods = []; if (document.getElementById("bookmarkIcon").checked) methods.push("icon"); if (document.getElementById("playSound").checked) methods.push("sound"); if (document.getElementById("showAlert").checked) methods.push("alert"); if (document.getElementById("openWindow").checked) methods.push("open"); if (methods.length == 0) { alert(BookmarksUtils.getLocaleString("pleaseSelectANotification")); return false; } var method = methods.join(); // join string in array with "," newvalue = dayRange + "|" + startHourRange + "-" + endHourRange + "|" + duration + "|" + method; } if (newvalue) newvalue = RDF.GetLiteral(newvalue); if (updateAttribute(scheduleRes, oldvalue, newvalue)) changed = true; } if (changed) { var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (remote) remote.Flush(); } window.close(); return true;} |
if (oldvalue) oldvalue = oldvalue.QueryInterface(Components.interfaces.nsIRDFLiteral); | var newValue = field.value; if (gFields[i] == "webpanel") newValue = field.checked ? "true" : undefined; var oldValue = BMDS.GetTarget(gResource, gProperties[i], true); | function Commit(){ var changed = false; // Grovel through the fields to see if any of the values have // changed. If so, update the RDF graph and force them to be saved // to disk. for (var i = 0; i < gFields.length; ++i) { var field = document.getElementById(gFields[i]); if (field) { // Get the new value as a literal, using 'null' if the value is empty. var newvalue = field.value; if (gFields[i] == "webpanel") newvalue = field.checked ? "true" : undefined; var oldvalue = Bookmarks.GetTarget(RDF.GetResource(gBookmarkID), RDF.GetResource(gProperties[i]), true); if (oldvalue) oldvalue = oldvalue.QueryInterface(Components.interfaces.nsIRDFLiteral); if (newvalue && gProperties[i] == (NC_NS + "ShortcutURL")) { // shortcuts are always lowercased internally newvalue = newvalue.toLowerCase(); } else if (newvalue && gProperties[i] == (NC_NS + "URL")) { if (newvalue.indexOf(":") < 0) // we're dealing with the URL attribute; // if a scheme isn't specified, use "http://" newvalue = "http://" + newvalue; } if (newvalue) newvalue = RDF.GetLiteral(newvalue); if (updateAttribute(gProperties[i], oldvalue, newvalue)) { changed = true; } } } // Update bookmark schedule if necessary; // if the tab was removed, just skip it var scheduleTab = document.getElementById("ScheduleTab"); if (scheduleTab) { var scheduleRes = "http://home.netscape.com/WEB-rdf#Schedule"; oldvalue = Bookmarks.GetTarget(RDF.GetResource(gBookmarkID), RDF.GetResource(scheduleRes), true); newvalue = ""; var dayRangeNode = document.getElementById("dayRange"); var dayRange = dayRangeNode.selectedItem.getAttribute("value"); if (dayRange) { var startHourRangeNode = document.getElementById("startHourRange"); var startHourRange = startHourRangeNode.selectedItem.getAttribute("value"); var endHourRangeNode = document.getElementById("endHourRange"); var endHourRange = endHourRangeNode.selectedItem.getAttribute("value"); if (parseInt(startHourRange) > parseInt(endHourRange)) { var temp = startHourRange; startHourRange = endHourRange; endHourRange = temp; } var duration = document.getElementById("duration").value; if (!duration) { alert(BookmarksUtils.getLocaleString("pleaseEnterADuration")); return false; } var methods = []; if (document.getElementById("bookmarkIcon").checked) methods.push("icon"); if (document.getElementById("playSound").checked) methods.push("sound"); if (document.getElementById("showAlert").checked) methods.push("alert"); if (document.getElementById("openWindow").checked) methods.push("open"); if (methods.length == 0) { alert(BookmarksUtils.getLocaleString("pleaseSelectANotification")); return false; } var method = methods.join(); // join string in array with "," newvalue = dayRange + "|" + startHourRange + "-" + endHourRange + "|" + duration + "|" + method; } if (newvalue) newvalue = RDF.GetLiteral(newvalue); if (updateAttribute(scheduleRes, oldvalue, newvalue)) changed = true; } if (changed) { var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (remote) remote.Flush(); } window.close(); return true;} |
if (newvalue && gProperties[i] == (NC_NS + "ShortcutURL")) { newvalue = newvalue.toLowerCase(); } else if (newvalue && gProperties[i] == (NC_NS + "URL")) { if (newvalue.indexOf(":") < 0) newvalue = "http: } | if (oldValue) oldValue = oldValue.QueryInterface(Components.interfaces.nsIRDFLiteral); | function Commit(){ var changed = false; // Grovel through the fields to see if any of the values have // changed. If so, update the RDF graph and force them to be saved // to disk. for (var i = 0; i < gFields.length; ++i) { var field = document.getElementById(gFields[i]); if (field) { // Get the new value as a literal, using 'null' if the value is empty. var newvalue = field.value; if (gFields[i] == "webpanel") newvalue = field.checked ? "true" : undefined; var oldvalue = Bookmarks.GetTarget(RDF.GetResource(gBookmarkID), RDF.GetResource(gProperties[i]), true); if (oldvalue) oldvalue = oldvalue.QueryInterface(Components.interfaces.nsIRDFLiteral); if (newvalue && gProperties[i] == (NC_NS + "ShortcutURL")) { // shortcuts are always lowercased internally newvalue = newvalue.toLowerCase(); } else if (newvalue && gProperties[i] == (NC_NS + "URL")) { if (newvalue.indexOf(":") < 0) // we're dealing with the URL attribute; // if a scheme isn't specified, use "http://" newvalue = "http://" + newvalue; } if (newvalue) newvalue = RDF.GetLiteral(newvalue); if (updateAttribute(gProperties[i], oldvalue, newvalue)) { changed = true; } } } // Update bookmark schedule if necessary; // if the tab was removed, just skip it var scheduleTab = document.getElementById("ScheduleTab"); if (scheduleTab) { var scheduleRes = "http://home.netscape.com/WEB-rdf#Schedule"; oldvalue = Bookmarks.GetTarget(RDF.GetResource(gBookmarkID), RDF.GetResource(scheduleRes), true); newvalue = ""; var dayRangeNode = document.getElementById("dayRange"); var dayRange = dayRangeNode.selectedItem.getAttribute("value"); if (dayRange) { var startHourRangeNode = document.getElementById("startHourRange"); var startHourRange = startHourRangeNode.selectedItem.getAttribute("value"); var endHourRangeNode = document.getElementById("endHourRange"); var endHourRange = endHourRangeNode.selectedItem.getAttribute("value"); if (parseInt(startHourRange) > parseInt(endHourRange)) { var temp = startHourRange; startHourRange = endHourRange; endHourRange = temp; } var duration = document.getElementById("duration").value; if (!duration) { alert(BookmarksUtils.getLocaleString("pleaseEnterADuration")); return false; } var methods = []; if (document.getElementById("bookmarkIcon").checked) methods.push("icon"); if (document.getElementById("playSound").checked) methods.push("sound"); if (document.getElementById("showAlert").checked) methods.push("alert"); if (document.getElementById("openWindow").checked) methods.push("open"); if (methods.length == 0) { alert(BookmarksUtils.getLocaleString("pleaseSelectANotification")); return false; } var method = methods.join(); // join string in array with "," newvalue = dayRange + "|" + startHourRange + "-" + endHourRange + "|" + duration + "|" + method; } if (newvalue) newvalue = RDF.GetLiteral(newvalue); if (updateAttribute(scheduleRes, oldvalue, newvalue)) changed = true; } if (changed) { var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (remote) remote.Flush(); } window.close(); return true;} |
if (newvalue) newvalue = RDF.GetLiteral(newvalue); | if (newValue && gFields[i] == "shortcut") newValue = newValue.toLowerCase(); else if (newValue && gFields[i] == "url") { if (newValue.indexOf(":") < 0) newValue = "http: } | function Commit(){ var changed = false; // Grovel through the fields to see if any of the values have // changed. If so, update the RDF graph and force them to be saved // to disk. for (var i = 0; i < gFields.length; ++i) { var field = document.getElementById(gFields[i]); if (field) { // Get the new value as a literal, using 'null' if the value is empty. var newvalue = field.value; if (gFields[i] == "webpanel") newvalue = field.checked ? "true" : undefined; var oldvalue = Bookmarks.GetTarget(RDF.GetResource(gBookmarkID), RDF.GetResource(gProperties[i]), true); if (oldvalue) oldvalue = oldvalue.QueryInterface(Components.interfaces.nsIRDFLiteral); if (newvalue && gProperties[i] == (NC_NS + "ShortcutURL")) { // shortcuts are always lowercased internally newvalue = newvalue.toLowerCase(); } else if (newvalue && gProperties[i] == (NC_NS + "URL")) { if (newvalue.indexOf(":") < 0) // we're dealing with the URL attribute; // if a scheme isn't specified, use "http://" newvalue = "http://" + newvalue; } if (newvalue) newvalue = RDF.GetLiteral(newvalue); if (updateAttribute(gProperties[i], oldvalue, newvalue)) { changed = true; } } } // Update bookmark schedule if necessary; // if the tab was removed, just skip it var scheduleTab = document.getElementById("ScheduleTab"); if (scheduleTab) { var scheduleRes = "http://home.netscape.com/WEB-rdf#Schedule"; oldvalue = Bookmarks.GetTarget(RDF.GetResource(gBookmarkID), RDF.GetResource(scheduleRes), true); newvalue = ""; var dayRangeNode = document.getElementById("dayRange"); var dayRange = dayRangeNode.selectedItem.getAttribute("value"); if (dayRange) { var startHourRangeNode = document.getElementById("startHourRange"); var startHourRange = startHourRangeNode.selectedItem.getAttribute("value"); var endHourRangeNode = document.getElementById("endHourRange"); var endHourRange = endHourRangeNode.selectedItem.getAttribute("value"); if (parseInt(startHourRange) > parseInt(endHourRange)) { var temp = startHourRange; startHourRange = endHourRange; endHourRange = temp; } var duration = document.getElementById("duration").value; if (!duration) { alert(BookmarksUtils.getLocaleString("pleaseEnterADuration")); return false; } var methods = []; if (document.getElementById("bookmarkIcon").checked) methods.push("icon"); if (document.getElementById("playSound").checked) methods.push("sound"); if (document.getElementById("showAlert").checked) methods.push("alert"); if (document.getElementById("openWindow").checked) methods.push("open"); if (methods.length == 0) { alert(BookmarksUtils.getLocaleString("pleaseSelectANotification")); return false; } var method = methods.join(); // join string in array with "," newvalue = dayRange + "|" + startHourRange + "-" + endHourRange + "|" + duration + "|" + method; } if (newvalue) newvalue = RDF.GetLiteral(newvalue); if (updateAttribute(scheduleRes, oldvalue, newvalue)) changed = true; } if (changed) { var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (remote) remote.Flush(); } window.close(); return true;} |
if (updateAttribute(gProperties[i], oldvalue, newvalue)) { changed = true; } | if (newValue) { newValue = RDF.GetLiteral(newValue); changed |= updateAttribute(gProperties[i], oldValue, newValue); | function Commit(){ var changed = false; // Grovel through the fields to see if any of the values have // changed. If so, update the RDF graph and force them to be saved // to disk. for (var i = 0; i < gFields.length; ++i) { var field = document.getElementById(gFields[i]); if (field) { // Get the new value as a literal, using 'null' if the value is empty. var newvalue = field.value; if (gFields[i] == "webpanel") newvalue = field.checked ? "true" : undefined; var oldvalue = Bookmarks.GetTarget(RDF.GetResource(gBookmarkID), RDF.GetResource(gProperties[i]), true); if (oldvalue) oldvalue = oldvalue.QueryInterface(Components.interfaces.nsIRDFLiteral); if (newvalue && gProperties[i] == (NC_NS + "ShortcutURL")) { // shortcuts are always lowercased internally newvalue = newvalue.toLowerCase(); } else if (newvalue && gProperties[i] == (NC_NS + "URL")) { if (newvalue.indexOf(":") < 0) // we're dealing with the URL attribute; // if a scheme isn't specified, use "http://" newvalue = "http://" + newvalue; } if (newvalue) newvalue = RDF.GetLiteral(newvalue); if (updateAttribute(gProperties[i], oldvalue, newvalue)) { changed = true; } } } // Update bookmark schedule if necessary; // if the tab was removed, just skip it var scheduleTab = document.getElementById("ScheduleTab"); if (scheduleTab) { var scheduleRes = "http://home.netscape.com/WEB-rdf#Schedule"; oldvalue = Bookmarks.GetTarget(RDF.GetResource(gBookmarkID), RDF.GetResource(scheduleRes), true); newvalue = ""; var dayRangeNode = document.getElementById("dayRange"); var dayRange = dayRangeNode.selectedItem.getAttribute("value"); if (dayRange) { var startHourRangeNode = document.getElementById("startHourRange"); var startHourRange = startHourRangeNode.selectedItem.getAttribute("value"); var endHourRangeNode = document.getElementById("endHourRange"); var endHourRange = endHourRangeNode.selectedItem.getAttribute("value"); if (parseInt(startHourRange) > parseInt(endHourRange)) { var temp = startHourRange; startHourRange = endHourRange; endHourRange = temp; } var duration = document.getElementById("duration").value; if (!duration) { alert(BookmarksUtils.getLocaleString("pleaseEnterADuration")); return false; } var methods = []; if (document.getElementById("bookmarkIcon").checked) methods.push("icon"); if (document.getElementById("playSound").checked) methods.push("sound"); if (document.getElementById("showAlert").checked) methods.push("alert"); if (document.getElementById("openWindow").checked) methods.push("open"); if (methods.length == 0) { alert(BookmarksUtils.getLocaleString("pleaseSelectANotification")); return false; } var method = methods.join(); // join string in array with "," newvalue = dayRange + "|" + startHourRange + "-" + endHourRange + "|" + duration + "|" + method; } if (newvalue) newvalue = RDF.GetLiteral(newvalue); if (updateAttribute(scheduleRes, oldvalue, newvalue)) changed = true; } if (changed) { var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (remote) remote.Flush(); } window.close(); return true;} |
var scheduleRes = "http: oldvalue = Bookmarks.GetTarget(RDF.GetResource(gBookmarkID), RDF.GetResource(scheduleRes), true); newvalue = ""; | var scheduleArc = RDF.GetResource(WEB_NS+"Schedule"); oldValue = BMDS.GetTarget(gResource, scheduleArc, true); newValue = null; | function Commit(){ var changed = false; // Grovel through the fields to see if any of the values have // changed. If so, update the RDF graph and force them to be saved // to disk. for (var i = 0; i < gFields.length; ++i) { var field = document.getElementById(gFields[i]); if (field) { // Get the new value as a literal, using 'null' if the value is empty. var newvalue = field.value; if (gFields[i] == "webpanel") newvalue = field.checked ? "true" : undefined; var oldvalue = Bookmarks.GetTarget(RDF.GetResource(gBookmarkID), RDF.GetResource(gProperties[i]), true); if (oldvalue) oldvalue = oldvalue.QueryInterface(Components.interfaces.nsIRDFLiteral); if (newvalue && gProperties[i] == (NC_NS + "ShortcutURL")) { // shortcuts are always lowercased internally newvalue = newvalue.toLowerCase(); } else if (newvalue && gProperties[i] == (NC_NS + "URL")) { if (newvalue.indexOf(":") < 0) // we're dealing with the URL attribute; // if a scheme isn't specified, use "http://" newvalue = "http://" + newvalue; } if (newvalue) newvalue = RDF.GetLiteral(newvalue); if (updateAttribute(gProperties[i], oldvalue, newvalue)) { changed = true; } } } // Update bookmark schedule if necessary; // if the tab was removed, just skip it var scheduleTab = document.getElementById("ScheduleTab"); if (scheduleTab) { var scheduleRes = "http://home.netscape.com/WEB-rdf#Schedule"; oldvalue = Bookmarks.GetTarget(RDF.GetResource(gBookmarkID), RDF.GetResource(scheduleRes), true); newvalue = ""; var dayRangeNode = document.getElementById("dayRange"); var dayRange = dayRangeNode.selectedItem.getAttribute("value"); if (dayRange) { var startHourRangeNode = document.getElementById("startHourRange"); var startHourRange = startHourRangeNode.selectedItem.getAttribute("value"); var endHourRangeNode = document.getElementById("endHourRange"); var endHourRange = endHourRangeNode.selectedItem.getAttribute("value"); if (parseInt(startHourRange) > parseInt(endHourRange)) { var temp = startHourRange; startHourRange = endHourRange; endHourRange = temp; } var duration = document.getElementById("duration").value; if (!duration) { alert(BookmarksUtils.getLocaleString("pleaseEnterADuration")); return false; } var methods = []; if (document.getElementById("bookmarkIcon").checked) methods.push("icon"); if (document.getElementById("playSound").checked) methods.push("sound"); if (document.getElementById("showAlert").checked) methods.push("alert"); if (document.getElementById("openWindow").checked) methods.push("open"); if (methods.length == 0) { alert(BookmarksUtils.getLocaleString("pleaseSelectANotification")); return false; } var method = methods.join(); // join string in array with "," newvalue = dayRange + "|" + startHourRange + "-" + endHourRange + "|" + duration + "|" + method; } if (newvalue) newvalue = RDF.GetLiteral(newvalue); if (updateAttribute(scheduleRes, oldvalue, newvalue)) changed = true; } if (changed) { var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (remote) remote.Flush(); } window.close(); return true;} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.