rem stringlengths 0 126k | add stringlengths 0 441k | context stringlengths 15 136k |
|---|---|---|
anchor.setAttribute ("href", "irc: "/" + escape (encodedMatchText)); | anchor.setAttribute ("href", eventData.network.getURL() + escape (encodedMatchText)); | function insertChannelLink (matchText, containerTag, eventData){ var encodedMatchText = fromUnicode(matchText + " "); /* bug 114923 */ encodedMatchText = encodedMatchText.substr(0, encodedMatchText.length - 1); if (!("network" in eventData) || matchText.search (/^#(include|error|define|if... |
var anchorParent = editorShell.editorSelection.anchorNode; if (!anchorParent.localName) var anchorSelected = true; else if (editorShell.editorSelection.anchorOffset < anchorParent.childNodes.length) var anchor = anchorParent.childNodes[editorShell.editorSelection.anchorOffset]; var focusParent = editorShell.editorSelec... | var editor = GetCurrentEditor(); | function InsertElementAroundSelection(element){ // We need to find a suitable container for the element. // First get the selection var anchorParent = editorShell.editorSelection.anchorNode; if (!anchorParent.localName) var anchorSelected = true; else if (editorShell.editorSelection.anchorOffset < anchorParent.... |
var anchorDepth = nodeDepth(anchorParent); var focusDepth = nodeDepth(focusParent); if (anchorDepth > focusDepth) { anchor = nthParent(anchorParent, anchorDepth - focusDepth - 1); anchorParent = anchor.parentNode; anchorSelected = true; } else if (anchorDepth < focusDepth) { focus = nthParent(focusParent, focusDepth - ... | try { var anchorParent = editor.selection.anchorNode; if (!anchorParent.localName) var anchorSelected = true; else if (editor.selection.anchorOffset < anchorParent.childNodes.length) var anchor = anchorParent.childNodes[editor.selection.anchorOffset]; var focusParent = editor.selection.focusNode; if (!focusParent.loc... | function InsertElementAroundSelection(element){ // We need to find a suitable container for the element. // First get the selection var anchorParent = editorShell.editorSelection.anchorNode; if (!anchorParent.localName) var anchorSelected = true; else if (editorShell.editorSelection.anchorOffset < anchorParent.... |
if (editorShell.NodeIsBlock(element)) { while (!(anchorParent.localName in IsBlockParent)) | var anchorDepth = nodeDepth(anchorParent); var focusDepth = nodeDepth(focusParent); if (anchorDepth > focusDepth) | function InsertElementAroundSelection(element){ // We need to find a suitable container for the element. // First get the selection var anchorParent = editorShell.editorSelection.anchorNode; if (!anchorParent.localName) var anchorSelected = true; else if (editorShell.editorSelection.anchorOffset < anchorParent.... |
anchor = focus = anchorParent; | anchor = nthParent(anchorParent, anchorDepth - focusDepth - 1); anchorParent = anchor.parentNode; anchorSelected = true; } else if (anchorDepth < focusDepth) { focus = nthParent(focusParent, focusDepth - anchorDepth - 1); focusParent = focus.parentNode; focusSelected = true; } var ordered = false; while (anchorParent !... | function InsertElementAroundSelection(element){ // We need to find a suitable container for the element. // First get the selection var anchorParent = editorShell.editorSelection.anchorNode; if (!anchorParent.localName) var anchorSelected = true; else if (editorShell.editorSelection.anchorOffset < anchorParent.... |
anchorParent = anchor.parentNode; ordered = true; | function InsertElementAroundSelection(element){ // We need to find a suitable container for the element. // First get the selection var anchorParent = editorShell.editorSelection.anchorNode; if (!anchorParent.localName) var anchorSelected = true; else if (editorShell.editorSelection.anchorOffset < anchorParent.... | |
} else { while (anchorParent.localName in NotAnInlineParent) | if (editor.nodeIsBlock(element)) | function InsertElementAroundSelection(element){ // We need to find a suitable container for the element. // First get the selection var anchorParent = editorShell.editorSelection.anchorNode; if (!anchorParent.localName) var anchorSelected = true; else if (editorShell.editorSelection.anchorOffset < anchorParent.... |
anchor = focus = anchorParent; anchorSelected = focusSelected = true; anchorParent = anchor.parentNode; ordered = true; | while (!(anchorParent.localName in IsBlockParent)) { anchor = focus = anchorParent; anchorSelected = focusSelected = true; anchorParent = anchor.parentNode; ordered = true; } | function InsertElementAroundSelection(element){ // We need to find a suitable container for the element. // First get the selection var anchorParent = editorShell.editorSelection.anchorNode; if (!anchorParent.localName) var anchorSelected = true; else if (editorShell.editorSelection.anchorOffset < anchorParent.... |
} | else { while (anchorParent.localName in NotAnInlineParent) { anchor = focus = anchorParent; anchorSelected = focusSelected = true; anchorParent = anchor.parentNode; ordered = true; } } | function InsertElementAroundSelection(element){ // We need to find a suitable container for the element. // First get the selection var anchorParent = editorShell.editorSelection.anchorNode; if (!anchorParent.localName) var anchorSelected = true; else if (editorShell.editorSelection.anchorOffset < anchorParent.... |
if (anchor != focus) { if (!ordered) | if (anchor != focus) | function InsertElementAroundSelection(element){ // We need to find a suitable container for the element. // First get the selection var anchorParent = editorShell.editorSelection.anchorNode; if (!anchorParent.localName) var anchorSelected = true; else if (editorShell.editorSelection.anchorOffset < anchorParent.... |
for (var node = anchorParent.firstChild; node != anchor; node = node.nextSibling) | if (!ordered) | function InsertElementAroundSelection(element){ // We need to find a suitable container for the element. // First get the selection var anchorParent = editorShell.editorSelection.anchorNode; if (!anchorParent.localName) var anchorSelected = true; else if (editorShell.editorSelection.anchorOffset < anchorParent.... |
if (node == focus) | for (var node = anchorParent.firstChild; node != anchor; node = node.nextSibling) | function InsertElementAroundSelection(element){ // We need to find a suitable container for the element. // First get the selection var anchorParent = editorShell.editorSelection.anchorNode; if (!anchorParent.localName) var anchorSelected = true; else if (editorShell.editorSelection.anchorOffset < anchorParent.... |
focus = anchor; anchor = node; focusSelected = anchorSelected; break; | if (node == focus) { focus = anchor; anchor = node; focusSelected = anchorSelected; break; } | function InsertElementAroundSelection(element){ // We need to find a suitable container for the element. // First get the selection var anchorParent = editorShell.editorSelection.anchorNode; if (!anchorParent.localName) var anchorSelected = true; else if (editorShell.editorSelection.anchorOffset < anchorParent.... |
if (focus && !focusSelected) focus = focus.previousSibling; } if (!editorShell.NodeIsBlock(element)) { if (!anchor) return false; for (node = anchor; ; node = node.nextSibling) if (!node) return false; else if (nodeIsBlock(node)) break; else if (node == focus) return false; } | if (!editor.nodeIsBlock(element)) { if (!anchor) return false; for (node = anchor; ; node = node.nextSibling) if (!node) return false; else if (nodeIsBlock(node)) break; else if (node == focus) return false; } | function InsertElementAroundSelection(element){ // We need to find a suitable container for the element. // First get the selection var anchorParent = editorShell.editorSelection.anchorNode; if (!anchorParent.localName) var anchorSelected = true; else if (editorShell.editorSelection.anchorOffset < anchorParent.... |
if (!nodeIsBlock(anchor)) while (!nodeIsBlock(anchor.previousSibling)) anchor = anchor.previousSibling; if (!nodeIsBlock(focus)) while (!nodeIsBlock(focus.nextSibling)) focus = focus.nextSibling; | if (!nodeIsBlock(anchor)) while (!nodeIsBlock(anchor.previousSibling)) anchor = anchor.previousSibling; if (!nodeIsBlock(focus)) while (!nodeIsBlock(focus.nextSibling)) focus = focus.nextSibling; } catch (e) {return false;} | function InsertElementAroundSelection(element){ // We need to find a suitable container for the element. // First get the selection var anchorParent = editorShell.editorSelection.anchorNode; if (!anchorParent.localName) var anchorSelected = true; else if (editorShell.editorSelection.anchorOffset < anchorParent.... |
editorShell.BeginBatchChanges(); | editor.beginTransaction(); | function InsertElementAroundSelection(element){ // We need to find a suitable container for the element. // First get the selection var anchorParent = editorShell.editorSelection.anchorNode; if (!anchorParent.localName) var anchorSelected = true; else if (editorShell.editorSelection.anchorOffset < anchorParent.... |
editorShell.InsertElement(element, anchorParent, anchorOffset, true); | editor.insertElement(element, anchorParent, anchorOffset, true); | function InsertElementAroundSelection(element){ // We need to find a suitable container for the element. // First get the selection var anchorParent = editorShell.editorSelection.anchorNode; if (!anchorParent.localName) var anchorSelected = true; else if (editorShell.editorSelection.anchorOffset < anchorParent.... |
var editor = editorShell.editor; | function InsertElementAroundSelection(element){ // We need to find a suitable container for the element. // First get the selection var anchorParent = editorShell.editorSelection.anchorNode; if (!anchorParent.localName) var anchorSelected = true; else if (editorShell.editorSelection.anchorOffset < anchorParent.... | |
editorShell.EndBatchChanges(); | editor.endTransaction(); | function InsertElementAroundSelection(element){ // We need to find a suitable container for the element. // First get the selection var anchorParent = editorShell.editorSelection.anchorNode; if (!anchorParent.localName) var anchorSelected = true; else if (editorShell.editorSelection.anchorOffset < anchorParent.... |
parentDiv.insertBefore(document.createTextNode(", "), child); | { var textNode = document.createElement("text"); textNode.setAttribute("value", ", "); parentDiv.insertBefore(textNode, child); } | function InsertEmailAddressUnderEnclosingBox(parentBox, parentDiv, emailAddress, fullAddress) { if ( parentBox ) { var item = document.createElement("titledbutton"); if ( item && parentDiv) { item.setAttribute("class", "emailDisplayButton"); item.setAttribute("value", fullAddress); if (pa... |
link.setAttribute("class", "chatzilla-link"); | function insertInlineButton(text, containerTag, data){ var ary = text.match(/\[\[([^\]]+)\]\[([^\]]+)\]\[([^\]]+)\]\]/); if (!ary) { containerTag.appendChild(document.createTextNode(text)); return; } var label = ary[1]; var title = ary[2]; var command = ary[3]; var link = document.... | |
if (matchText.indexOf (": | if (matchText.match (/^[a-zA-Z-]+:/)) href = matchText; else | function insertLink (matchText, containerTag){ var href; if (matchText.indexOf ("://") == -1) href = "http://" + matchText; else href = matchText; var anchor = document.createElementNS ("http://www.w3.org/1999/xhtml", "html:a"); anchor.setAt... |
else href = matchText; | function insertLink (matchText, containerTag){ var href; if (matchText.indexOf ("://") == -1) href = "http://" + matchText; else href = matchText; var anchor = document.createElementNS ("http://www.w3.org/1999/xhtml", "html:a"); anchor.setAt... | |
function insertLink (matchText, containerTag) | function insertLink (matchText, containerTag, data) | function insertLink (matchText, containerTag){ var href; var linkText; var trailing; ary = matchText.match(/([.,?]+)$/); if (ary) { linkText = RegExp.leftContext; trailing = ary[1]; } else { linkText = matchText; } var ary = linkText.match (/^(\w[\w-]+):/); if (a... |
var max = client.prefs["urls.store.max"]; if (client.prefs["urls.list"].unshift(href) > max) client.prefs["urls.list"].pop(); client.prefs["urls.list"].update(); | if ((!("dontLogURLs" in data) || !data.dontLogURLs) && (!("noStateChange" in data) || !data.noStateChange)) { var max = client.prefs["urls.store.max"]; if (client.prefs["urls.list"].unshift(href) > max) client.prefs["urls.list"].pop(); client.prefs["urls.list"].update(); } | function insertLink (matchText, containerTag){ var href; var linkText; var trailing; ary = matchText.match(/([.,?]+)$/); if (ary) { linkText = RegExp.leftContext; trailing = ary[1]; } else { linkText = matchText; } var ary = linkText.match (/^(\w[\w-]+):/); if (a... |
var radioAttributes = ["value", "group", "id"]; | var radioAttributes = ["label", "group", "id"]; | insertRadioGroup: function () { var nRadios = this.incrementElementCount("radio"); var nRadiogroups = this.incrementElementCount("radiogroup"); var vixenMain = vxUtils.getWindow("vixen:main"); var focusedWindow = vixenMain.vxShell.mFocusedWindow; // need to check to see if the focused window is a ... |
for (prop in object) { var x = object[prop]; types[types.length] = (typeof x); } | for (prop in object) { var x = object[prop]; types[types.length] = (typeof x); | function inspect(object) { for (prop in object) { var x = object[prop]; types[types.length] = (typeof x); } } |
} | function inspect(object) { for (prop in object) { var x = object[prop]; types[types.length] = (typeof x); } } | |
for (prop in object) { types_2[types_2.length] = (typeof object[prop]); } | for (prop in object) { types_2[types_2.length] = (typeof object[prop]); | function inspect_again(object) { for (prop in object) { types_2[types_2.length] = (typeof object[prop]); } } |
} | function inspect_again(object) { for (prop in object) { types_2[types_2.length] = (typeof object[prop]); } } | |
var target = aEvent.target; while (target && !target.href) target = target.parentNode; | var url = getInstallURL(); | function install( aEvent, extName, iconURL, extHash) { if (aEvent.altKey || !window.InstallTrigger) return true; // The event target might be a child of the link, not the link itself var target = aEvent.target; while (target && !target.href) target = target.parentNode; if (!target) r... |
if (!target) return true; var url = target.href; if (url.match(/^.+\.xpi$/)) { | if (url && url.match(/^.+\.xpi$/)) { | function install( aEvent, extName, iconURL, extHash) { if (aEvent.altKey || !window.InstallTrigger) return true; // The event target might be a child of the link, not the link itself var target = aEvent.target; while (target && !target.href) target = target.parentNode; if (!target) r... |
var url = aEvent.target.href; if (!url) { url = aEvent.target.parentNode.href; } | if(!window.InstallTrigger) return true; var url = getInstallURL(aEvent); if (!url) return true; | function installTheme( aEvent, extName) { var url = aEvent.target.href; if (!url) { // rustico puts it somewhere else, of course url = aEvent.target.parentNode.href; } InstallTrigger.installChrome(InstallTrigger.SKIN,url,extName); try { var p = new XMLHttpRequest(); p.open("GE... |
testcases[tc++] = new TestCase( SECTION, "(" + object_1 + ") instanceof " + object_2, expect, result ); } | new TestCase( SECTION, "(" + object_1 + ") instanceof " + object_2, expect, result ); } | function InstanceOf( object_1, object_2, expect ) { result = object_1 instanceof object_2; testcases[tc++] = new TestCase( SECTION, "(" + object_1 + ") instanceof " + object_2, expect, result ); } |
result = object_1 instanceof object_2; | function InstanceOf( object_1, object_2, expect ) { result = object_1 instanceof object_2; testcases[tc++] = new TestCase( SECTION, "(" + object_1 + ") instanceof " + object_2, expect, result ); } | |
testcases[tc++] = new TestCase( SECTION, "(" + object_1 + ") instanceof " + object_2, expect, result ); } | result = object_1 instanceof object_2; new TestCase( SECTION, "(" + object_1 + ") instanceof " + object_2, expect, result ); } | function InstanceOf( object_1, object_2, expect ) { result = object_1 instanceof object_2; testcases[tc++] = new TestCase( SECTION, "(" + object_1 + ") instanceof " + object_2, expect, result ); } |
while ( object != null ) { if ( object == constructor.prototype ) { return true; } object = object.__proto__; | while ( object != null ) { if ( object == constructor.prototype ) { return true; | function InstanceOf( object, constructor ) { while ( object != null ) { if ( object == constructor.prototype ) { return true; } object = object.__proto__; } return false;} |
return false; | object = object.__proto__; } return false; | function InstanceOf( object, constructor ) { while ( object != null ) { if ( object == constructor.prototype ) { return true; } object = object.__proto__; } return false;} |
testcases[tc++] = new TestCase( SECTION, "Integer( " + value +" )", (exception ? INVALID_INTEGER_VALUE +": " + value : this.value), this.value ); } | new TestCase( SECTION, "Integer( " + value +" )", (exception ? INVALID_INTEGER_VALUE +": " + value : this.value), this.value ); } | function Integer( value, exception ) { try { this.value = checkValue( value ); } catch ( e ) { this.value = e.toString(); } testcases[tc++] = new TestCase( SECTION, "Integer( " + value +" )", (exception ? INVALID_INTEGER_VALUE +": " ... |
var dl = Components.classes["@mozilla.org/download;1"].createInstance(Components.interfaces.nsIDownload); | var tr = Components.classes["@mozilla.org/download;1"].createInstance(Components.interfaces.nsITransfer); | function internalSave(aURL, aDocument, aDefaultFileName, aShouldBypassCache, aFilePickerTitleKey, aChosenData, aReferrer){ // Note: aDocument == null when this code is used by save-link-as... var contentType = (aDocument ? aDocument.contentType : null); var saveMode = GetSaveModeForContentType(c... |
dl.init((aChosenData ? aChosenData.uri : fileInfo.uri), | tr.init((aChosenData ? aChosenData.uri : fileInfo.uri), | function internalSave(aURL, aDocument, aDefaultFileName, aShouldBypassCache, aFilePickerTitleKey, aChosenData, aReferrer){ // Note: aDocument == null when this code is used by save-link-as... var contentType = (aDocument ? aDocument.contentType : null); var saveMode = GetSaveModeForContentType(c... |
dl.init((aChosenData ? aChosenData.uri : source), | tr.init((aChosenData ? aChosenData.uri : source), | function internalSave(aURL, aDocument, aDefaultFileName, aShouldBypassCache, aFilePickerTitleKey, aChosenData, aReferrer){ // Note: aDocument == null when this code is used by save-link-as... var contentType = (aDocument ? aDocument.contentType : null); var saveMode = GetSaveModeForContentType(c... |
var bogusChan = new BogusChannel(URI, this.isSecure); bogusChan.contentType = (this.isSecure ? IRCS_MIMETYPE : IRC_MIMETYPE); return bogusChan; | return new BogusChannel(URI, this.isSecure); | function ircph_newChannel(URI){ ios = Components.classes[IOSERVICE_CONTRACTID].getService(nsIIOService); if (!ios.allowPort(URI.port, URI.scheme)) throw Components.results.NS_ERROR_FAILURE; var bogusChan = new BogusChannel(URI, this.isSecure); bogusChan.contentType = (this.isSecure ? IRCS_MIMETYPE : ... |
if ((!isNaN(parseInt(inLetter))) && (parseInt(inLetter >= 0)) && (parseInt(inLetter <=9))) | if ((!isNaN(parseInt(inLetter))) && (parseInt(inLetter) >= 0) && (parseInt(inLetter) <= 9)) | function isAlphaNumeric(inLetter){ debug("inAlphaNumeric"); var outValue = false; if ((inLetter != null) && (inLetter != "")) { if ((!isNaN(parseInt(inLetter))) && (parseInt(inLetter >= 0)) && (parseInt(inLetter <=9))) outValue = true; else { var let = inLetter.toLowerCase(); if ((let <= "z") && ( let >= "a")... |
dump( "\n\nCOMPARE-> "+dateToMatch +" "+dateObj.getTime() ); | function isAlreadyException( dateObj ){ //check to make sure that the date is not already added. var listbox = document.getElementById( "exception-dates-listbox" ); for( i = 0; i < listbox.childNodes.length; i++ ) { var dateToMatch = new Date( ); dateToMatch.setTime( listbox.childNodes[i].value... | |
try { rv = pref.getBoolPref("bidi.browser.ui"); } catch (e) {} | rv = pref.getBoolPref("bidi.browser.ui"); | function isBidiEnabled(){ var rv = false; var systemLocale; try { var localeService = Components.classes["@mozilla.org/intl/nslocaleservice;1"] .getService(Components.interfaces.nsILocaleService); systemLocale = localeService.getSystemLocale().getCategory("NSILOCALE_CTYPE"); ... |
var db = document.getElementById("innermostBox").database; | var db = document.getElementById("NC:PersonalToolbarFolder").database; | isBookmark: function (aURI) { if (!aURI) return false; var db = document.getElementById("innermostBox").database; var typeValue = RDFUtils.getTarget(db, aURI, _RDF("type")); typeValue = RDFUtils.getValueFromResource(typeValue); return (typeValue == NC_RDF("BookmarkSeparator") || typeVa... |
case "cmd_bm_expandfolder": | isCommandEnabled: function (aCommand, aSelection, aTarget) { var item0, type0, junk, parent0, ptype0; var length = 0; if (aSelection && aSelection.length != 0) { length = aSelection.length; item0 = aSelection.item[0].Value; type0 = aSelection.type[0]; parent0 = (aSelection.parent[0] != ... | |
case "cmd_search": var loadedFolder = GetLoadedMsgFolder(); if (!loadedFolder) return false; return loadedFolder.server.canSearchMessages; | isCommandEnabled: function(command) { switch ( command ) { case "cmd_createFilterFromPopup": case "cmd_createFilterFromMenu": var loadedFolder = GetLoadedMsgFolder(); if (!(loadedFolder && loadedFolder.server.canHaveFilters)) return false; case "cmd_delete": UpdateDeleteComm... | |
case "cmd_recalculateJunkScore": | isCommandEnabled: function(command) { switch (command) { case "cmd_createFilterFromPopup": case "cmd_createFilterFromMenu": var loadedFolder = GetLoadedMsgFolder(); if (!(loadedFolder && loadedFolder.server.canHaveFilters)) return false; case "cmd_delete": UpdateDeleteComman... | |
debug("bookmarks in enabled with " + command); | isCommandEnabled: function(command) { debug("bookmarks in enabled with " + command); switch(command) { case "cmd_undo": case "cmd_redo": return false; case "cmd_cut": case "cmd_copy": case "cmd_paste": case "cmd... | |
selectedItem.getAttribute("blocklisted") != "true" && | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selectedItem; if (selectedItem) { if (selectedItem.getAttribute("downloadURL") != "") return false; var opType = selectedItem.getAttribute("opType"); } switch (aCommand) { case "cmd_close": return true; ... | |
dump("Updating cmd_deleteByHostname..\n"); | isCommandEnabled: function(command) { var enabled = false; var stringId; var text; switch(command) { case "cmd_deleteByHostname": dump("Updating cmd_deleteByHostname..\n"); if (gLastHostname) { stringId = "deleteHost"; enabled... | |
dump("Setting value to " + text + "\n"); | isCommandEnabled: function(command) { var enabled = false; var stringId; var text; switch(command) { case "cmd_deleteByHostname": dump("Updating cmd_deleteByHostname..\n"); if (gLastHostname) { stringId = "deleteHost"; enabled... | |
case "cmd_undo": case "cmd_redo": return true; | isCommandEnabled: function(command) { dump("ThreadPaneController.isCommandEnabled\n"); switch ( command ) { case "cmd_selectAll": return true; case "cmd_delete": case "button_delete": var threadTree = GetThreadTree(); dump("threadTree = " + threadTree + "\n"); var numSelected = 0; if ( threa... | |
return (GetCurrentEditor() != null && !IsInHTMLSourceMode()); | return GetCurrentEditor() != null; | isCommandEnabled: function(aCommand, dummy) { // we can only do this if the search pattern is non-empty. Not sure how // to get that from here return (GetCurrentEditor() != null && !IsInHTMLSourceMode()); }, |
dump("ThreadPaneController.IsCommandEnabled\n"); | IsCommandEnabled: function(command) { switch ( command ) { case "cmd_selectAll": return true; case "cmd_delete": goSetMenuValue(command, 'valueMessage'); return true; default: return false; } }, | |
var selectedItem = gExtensionsView.selected; | var selectedItem = gExtensionsView.selectedItem; | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selected; if (selectedItem) { if (selectedItem.getAttribute("downloadURL") != "") return false; var opType = selectedItem.getAttribute("opType"); } switch (aCommand) { case "cmd_close": return true; cas... |
debug("in enabled with " + command); | debug("bookmarks in enabled with " + command); | isCommandEnabled: function(command) { debug("in enabled with " + command); switch(command) { case "cmd_undo": case "cmd_redo": return false; case "cmd_cut": case "cmd_copy": case "cmd_paste": case "cmd_delete": ... |
var numSelected = 0 | isCommandEnabled: function(command) { var numSelected = 0 switch (command) { case "cmd_selectAll": return true; case "cmd_delete": case "button_delete": if (resultsTree && resultsTree.selectedItems) numSelected = resultsTree.selectedItems.length; if (command == "cmd... | |
if (resultsTree && resultsTree.selectedItems) numSelected = resultsTree.selectedItems.length; | var numSelected; if (gAbView && gAbView.selection) numSelected = gAbView.selection.count; else numSelected = 0; | isCommandEnabled: function(command) { var numSelected = 0 switch (command) { case "cmd_selectAll": return true; case "cmd_delete": case "button_delete": if (resultsTree && resultsTree.selectedItems) numSelected = resultsTree.selectedItems.length; if (command == "cmd... |
if (resultsTree && resultsTree.selectedItems) numSelected = resultsTree.selectedItems.length; return (numSelected == 1); | return (GetSelectedCardIndex() != -1); | isCommandEnabled: function(command) { var numSelected = 0 switch (command) { case "cmd_selectAll": return true; case "cmd_delete": case "button_delete": if (resultsTree && resultsTree.selectedItems) numSelected = resultsTree.selectedItems.length; if (command == "cmd... |
case "button_goForward": case "button_goBack": case "cmd_goForward": case "cmd_goBack": return gDBView && gDBView.navigateStatus((command == "cmd_goBack" || command == "button_goBack") ? nsMsgNavigationType.back : nsMsgNavigationType.forward); | isCommandEnabled: function(command) { switch ( command ) { case "cmd_createFilterFromPopup": case "cmd_createFilterFromMenu": var loadedFolder = GetLoadedMsgFolder(); if (!(loadedFolder && loadedFolder.server.canHaveFilters)) return false; case "cmd_delete": UpdateDeleteComm... | |
case "cmd_markReadByDate": | isCommandEnabled: function(command) { switch ( command ) { case "cmd_createFilterFromPopup": case "cmd_createFilterFromMenu": var loadedFolder = GetLoadedMsgFolder(); if (!(loadedFolder && loadedFolder.server.canHaveFilters)) return false; case "cmd_delete": UpdateDeleteComm... | |
if (gDBView) { gDBView.getCommandStatus(nsMsgViewCommandType.deleteMsg, enabled, checkStatus); return enabled.value; } | if ( command == "cmd_delete") { if (isNewsURI(gCurrentMessageUri)) { goSetMenuValue(command, 'valueNewsMessage'); goSetAccessKey(command, 'valueNewsMessageAccessKey'); } else { goSetMenuValue(command, 'valueMessage'); goSetAccessKey(command, 'valueMessageAccessKey'); } } if (gDBView) { gDBView.getCommandStatus(nsMsgVi... | isCommandEnabled: function(command) { var enabled = new Object(); var checkStatus = new Object(); switch ( command ) { case "cmd_delete": if (gDBView) { gDBView.getCommandStatus(nsMsgViewCommandType.deleteMsg, enabled, checkStatus); return enabled.value; } case "cmd_reply": ... |
if ( command == "cmd_delete") { if (isNewsURI(gCurrentMessageUri)) goSetMenuValue(command, 'valueNewsMessage'); else goSetMenuValue(command, 'valueMessage'); } | isCommandEnabled: function(command) { var enabled = new Object(); var checkStatus = new Object(); switch ( command ) { case "cmd_delete": if (gDBView) { gDBView.getCommandStatus(nsMsgViewCommandType.deleteMsg, enabled, checkStatus); return enabled.value; } case "cmd_reply": ... | |
var haveSelection = (tree.selectedItems.length > 0) return haveCommand && haveSelection; | var haveSelection = (tree.selectedItems.length > 0); return (haveCommand && haveSelection); | isCommandEnabled: function(command) { var haveCommand; switch (command) { // commands which do not require selection case "cmd_paste": return (this.doPaste != undefined); case "cmd_selectAll": // we can always sel... |
if (gAbView && gAbView.selection) | var enabled = false; if (gAbView && gAbView.selection) { if (gAbView.directory) enabled = gAbView.directory.operations & gAbView.directory.opWrite; | isCommandEnabled: function(command) { switch (command) { case "cmd_selectAll": return true; case "cmd_delete": case "button_delete": var numSelected; if (gAbView && gAbView.selection) numSelected = gAbView.selection.count; else numSelected = 0; ... |
return (numSelected > 0); | return (enabled && (numSelected > 0)); | isCommandEnabled: function(command) { switch (command) { case "cmd_selectAll": return true; case "cmd_delete": case "button_delete": var numSelected; if (gAbView && gAbView.selection) numSelected = gAbView.selection.count; else numSelected = 0; ... |
case "cmd_sendNow": | case "cmd_sendButton": | isCommandEnabled: function(command) { //For some reason, when editor has the focus, focusedElement is null!. var focusedElement = top.document.commandDispatcher.focusedElement; switch (command) { //File Menu case "cmd_attachFile": case "cmd_attachPage": case "cmd_close": case "cm... |
case "cmd_sendNow": return !(windowLocked || (ioService && ioService.offline)) | isCommandEnabled: function(command) { //For some reason, when editor has the focus, focusedElement is null!. var focusedElement = top.document.commandDispatcher.focusedElement; switch (command) { //File Menu case "cmd_attachFile": case "cmd_attachPage": case "cmd_close": case "cm... | |
var focusedElement = top.document.commandDispatcher.focusedElement; | isCommandEnabled: function(command) { //For some reason, when editor has the focus, focusedElement is null!. var focusedElement = top.document.commandDispatcher.focusedElement; var composeHTML = gMsgCompose && gMsgCompose.composeHTML; switch (command) { //File Menu case "cmd_attachFile": ... | |
case "cmd_pasteQuote": case "cmd_find": case "cmd_findNext": return !focusedElement; case "cmd_rewrap": return !focusedElement; | isCommandEnabled: function(command) { //For some reason, when editor has the focus, focusedElement is null!. var focusedElement = top.document.commandDispatcher.focusedElement; var composeHTML = gMsgCompose && gMsgCompose.composeHTML; switch (command) { //File Menu case "cmd_attachFile": ... | |
case "cmd_renderedHTMLEnabler": case "cmd_insert": return !focusedElement; case "cmd_link": case "cmd_anchor": case "cmd_image": case "cmd_hline": case "cmd_table": case "cmd_insertHTMLWithDialog": case "cmd_insertChars": case "cmd_insertBreak": case "cmd_insertBreakAll": return !focusedElement; | isCommandEnabled: function(command) { //For some reason, when editor has the focus, focusedElement is null!. var focusedElement = top.document.commandDispatcher.focusedElement; var composeHTML = gMsgCompose && gMsgCompose.composeHTML; switch (command) { //File Menu case "cmd_attachFile": ... | |
case "cmd_spelling": return (focusedElement == GetMsgBodyFrame()); | isCommandEnabled: function(command) { //For some reason, when editor has the focus, focusedElement is null!. var focusedElement = top.document.commandDispatcher.focusedElement; var composeHTML = gMsgCompose && gMsgCompose.composeHTML; switch (command) { //File Menu case "cmd_attachFile": ... | |
case "cmd_decreaseFont": case "cmd_increaseFont": case "cmd_bold": case "cmd_italic": case "cmd_underline": case "cmd_smiley": case "cmd_strikethrough": case "cmd_superscript": case "cmd_subscript": case "cmd_nobreak": case "cmd_em": case "cmd_strong": case "cmd_cite": case "cmd_abbr": case "cmd_acronym": case "cmd_cod... | isCommandEnabled: function(command) { //For some reason, when editor has the focus, focusedElement is null!. var focusedElement = top.document.commandDispatcher.focusedElement; var composeHTML = gMsgCompose && gMsgCompose.composeHTML; switch (command) { //File Menu case "cmd_attachFile": ... | |
selectedItem.isCompatible && | (!gCheckCompat || selectedItem.isCompatible) && | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selectedItem; if (!selectedItem) return false; if (selectedItem.hasAttribute("downloadURL") && selectedItem.getAttribute("downloadURL") != "") { if (aCommand == "cmd_uninstall") return true; return false;... |
if (selectedItem) { if (selectedItem.getAttribute("downloadURL") != "") return false; var opType = selectedItem.getAttribute("opType"); | if (!selectedItem) return false; if (selectedItem.hasAttribute("downloadURL") && selectedItem.getAttribute("downloadURL") != "") { if (aCommand == "cmd_uninstall") return true; return false; | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selectedItem; if (selectedItem) { if (selectedItem.getAttribute("downloadURL") != "") return false; var opType = selectedItem.getAttribute("opType"); } switch (aCommand) { case "cmd_close": return true; ... |
case "cmd_close": return true; | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selectedItem; if (selectedItem) { if (selectedItem.getAttribute("downloadURL") != "") return false; var opType = selectedItem.getAttribute("opType"); } switch (aCommand) { case "cmd_close": return true; ... | |
return selectedItem && !selectedItem.disabled && opType != OP_NEEDS_UNINSTALL && | return selectedItem.type == nsIUpdateItem.TYPE_THEME && !selectedItem.isDisabled && selectedItem.opType != OP_NEEDS_UNINSTALL && | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selectedItem; if (selectedItem) { if (selectedItem.getAttribute("downloadURL") != "") return false; var opType = selectedItem.getAttribute("opType"); } switch (aCommand) { case "cmd_close": return true; ... |
return selectedItem && !selectedItem.disabled && !gApp.inSafeMode && opType == OP_NONE && | return selectedItem.type == nsIUpdateItem.TYPE_EXTENSION && !selectedItem.isDisabled && !gInSafeMode && !selectedItem.opType && | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selectedItem; if (selectedItem) { if (selectedItem.getAttribute("downloadURL") != "") return false; var opType = selectedItem.getAttribute("opType"); } switch (aCommand) { case "cmd_close": return true; ... |
return selectedItem && opType != OP_NEEDS_INSTALL; | return selectedItem.opType != OP_NEEDS_INSTALL; | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selectedItem; if (selectedItem) { if (selectedItem.getAttribute("downloadURL") != "") return false; var opType = selectedItem.getAttribute("opType"); } switch (aCommand) { case "cmd_close": return true; ... |
return selectedItem && selectedItem.getAttribute("homepageURL") != ""; | return selectedItem.getAttribute("homepageURL") != ""; | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selectedItem; if (selectedItem) { if (selectedItem.getAttribute("downloadURL") != "") return false; var opType = selectedItem.getAttribute("opType"); } switch (aCommand) { case "cmd_close": return true; ... |
if (gWindowState != "extensions") { return (selectedItem && selectedItem.getAttribute("internalName") != gDefaultTheme && opType != OP_NEEDS_UNINSTALL && selectedItem.getAttribute("locked") != "true" && canWriteToLocation(selectedItem)); } return selectedItem && opType != OP_NEEDS_UNINSTALL && | return (selectedItem.type != nsIUpdateItem.TYPE_THEME || selectedItem.type == nsIUpdateItem.TYPE_THEME && selectedItem.getAttribute("internalName") != gDefaultTheme) && selectedItem.opType != OP_NEEDS_UNINSTALL && | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selectedItem; if (selectedItem) { if (selectedItem.getAttribute("downloadURL") != "") return false; var opType = selectedItem.getAttribute("opType"); } switch (aCommand) { case "cmd_close": return true; ... |
canWriteToLocation(selectedItem); | canWriteToLocation(selectedItem) && !gExtensionsView.hasAttribute("update-operation"); | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selectedItem; if (selectedItem) { if (selectedItem.getAttribute("downloadURL") != "") return false; var opType = selectedItem.getAttribute("opType"); } switch (aCommand) { case "cmd_close": return true; ... |
return selectedItem && opType == OP_NEEDS_UNINSTALL; case "cmd_update": return selectedItem && selectedItem.getAttribute("updateable") != "false" && !gExtensionsView.hasAttribute("update-check"); case "cmd_update_all": return gExtensionsView.children.length > 0 && !gExtensionsView.hasAttribute("update-check"); | return selectedItem.opType == OP_NEEDS_UNINSTALL; case "cmd_checkUpdate": return selectedItem.getAttribute("updateable") != "false" && !gExtensionsView.hasAttribute("update-operation"); case "cmd_installUpdate": return selectedItem.getAttribute("availableUpdateURL") != "none" && !gExtensionsView.hasAttribute("update-op... | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selectedItem; if (selectedItem) { if (selectedItem.getAttribute("downloadURL") != "") return false; var opType = selectedItem.getAttribute("opType"); } switch (aCommand) { case "cmd_close": return true; ... |
return selectedItem && (selectedItem.disabled && opType != OP_NEEDS_ENABLE || opType == OP_NEEDS_DISABLE); | return selectedItem.isDisabled && selectedItem.opType != OP_NEEDS_ENABLE || selectedItem.opType == OP_NEEDS_DISABLE; | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selectedItem; if (selectedItem) { if (selectedItem.getAttribute("downloadURL") != "") return false; var opType = selectedItem.getAttribute("opType"); } switch (aCommand) { case "cmd_close": return true; ... |
return selectedItem && (opType == OP_NONE || opType == OP_NEEDS_DISABLE) && selectedItem.getAttribute("satisfiesDependencies") != "false" && selectedItem.getAttribute("blocklisted") != "true" && selectedItem.getAttribute("compatible") != "false"; | return selectedItem.type != nsIUpdateItem.TYPE_THEME && (selectedItem.isDisabled || (!selectedItem.opType || selectedItem.opType == "needs-disable")) && !selectedItem.isBlocklisted && selectedItem.isCompatible && selectedItem.satisfiesDependencies && !gExtensionsView.hasAttribute("update-operation"); | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selectedItem; if (selectedItem) { if (selectedItem.getAttribute("downloadURL") != "") return false; var opType = selectedItem.getAttribute("opType"); } switch (aCommand) { case "cmd_close": return true; ... |
return selectedItem && selectedItem.getAttribute("satisfiesDependencies") != "false" && selectedItem.getAttribute("blocklisted") != "true" && (opType == OP_NONE || opType == OP_NEEDS_ENABLE); case "cmd_movetop": return selectedItem && (gExtensionsView.children[0] != selectedItem); case "cmd_moveup": return selectedItem... | return selectedItem.type != nsIUpdateItem.TYPE_THEME && (!selectedItem.isDisabled && !selectedItem.opType || selectedItem.opType == OP_NEEDS_ENABLE) && !selectedItem.isBlocklisted && selectedItem.satisfiesDependencies && !gExtensionsView.hasAttribute("update-operation"); | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selectedItem; if (selectedItem) { if (selectedItem.getAttribute("downloadURL") != "") return false; var opType = selectedItem.getAttribute("opType"); } switch (aCommand) { case "cmd_close": return true; ... |
if (numSelected < 2) goSetMenuValue(command, "valueCard"); else goSetMenuValue(command, "valueCards"); | switch (GetSelectedCardTypes()) { case kSingleListOnly: goSetMenuValue(command, "valueList"); break; case kMultipleListsOnly: goSetMenuValue(command, "valueLists"); break; case kListsAndCards: goSetMenuValue(command, "valueItems"); break; case kCardsOnly: default: if (numSelected < 2) goSetMenuValue(command, "valueCard... | isCommandEnabled: function(command) { switch (command) { case "cmd_selectAll": return true; case "cmd_delete": case "button_delete": var numSelected; var enabled = false; if (gAbView && gAbView.selection) { if (gAbView.directory) enabled = gA... |
var folderURI = GetSelectedFolderURI(); var server = GetServer(folderURI); if (!(server.canCompactFoldersOnServer)) return false; | function IsCompactFolderEnabled(){ var folderOutliner = GetFolderOutliner(); var startIndex = {}; var endIndex = {}; folderOutliner.outlinerBoxObject.selection.getRangeAt(0, startIndex, endIndex); if (startIndex.value < 0) return false; var folderResource = GetFolderResource(folderOutliner, st... | |
var focusedTop = Components.lookupMethod(aFocusedWindow, 'top') .call(aFocusedWindow); | var focusedTop = new XPCNativeWrapper(aFocusedWindow, 'top').top; | function isContentFrame(aFocusedWindow){ if (!aFocusedWindow) return false; var focusedTop = Components.lookupMethod(aFocusedWindow, 'top') .call(aFocusedWindow); return (focusedTop == window.content);} |
return true; | case "application/xml": return false; | function isDocumentType(aContentType){ switch (aContentType) { case "text/html": case "text/xml": case "application/xhtml+xml": return true; } return false;} |
return IsMailFolderSelected(); | var folderURI = GetSelectedFolderURI(); var server = GetServer(folderURI); return (server.canEmptyTrashOnExit?IsMailFolderSelected():false); | function IsEmptyTrashEnabled(){ return IsMailFolderSelected();} |
dump("Have Find = "+gHaveFind+"\n"); | function IsFindInstalled(){ if (gSoughtFind) return gHaveFind; var findClass = Components.classes["@mozilla.org/appshell/component/find;1"]; gHaveFind = (findClass != null); gSoughtFind = true; dump("Have Find = "+gHaveFind+"\n"); return gHaveFind;} | |
dump("IsInTable?\n"); | function IsInTable(){ return (window.editorShell && window.editorShell.documentEditable && null != window.editorShell.GetElementOrParentByTagName("table", null));} | |
return (window.editorShell && window.editorShell.documentEditable && | return (window.editorShell && window.editorShell.documentEditable && IsEditingRenderedHTML() && | function IsInTable(){ return (window.editorShell && window.editorShell.documentEditable && null != window.editorShell.GetElementOrParentByTagName("table", null));} |
dump("IsInTableCell???\n"); | dump("IsInTableCell?\n"); | function IsInTableCell(){dump("IsInTableCell???\n"); return (window.editorShell && window.editorShell.documentEditable && null != window.editorShell.GetElementOrParentByTagName("td", null));} |
return (window.editorShell && window.editorShell.documentEditable && | return (window.editorShell && window.editorShell.documentEditable && IsEditingRenderedHTML() && | function IsInTableCell(){ return (window.editorShell && window.editorShell.documentEditable && null != window.editorShell.GetElementOrParentByTagName("td", null));} |
var startTime = document.getElementById( "start-date-picker" ).value; | var startTime = document.getElementById( "start-date-picker" ).value; var oldStartTime = startTime; var thisMonth = startTime.getMonth(); var monthToCompare = thisMonth; var weekNumber = 0; while( monthToCompare == thisMonth ) { startTime = new Date( startTime.getTime() - ( 1000 * 60 * 60 * 24 * 7 ) ); monthToCompare ... | function isLastDayOfWeekOfMonth(){ //get the day number for today. var startTime = document.getElementById( "start-date-picker" ).value; var oldStartTime = startTime; var thisMonth = startTime.getMonth(); var monthToCompare = thisMonth; var weekNumber = 0; while( monthToCompare == thisMonth ) { ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.