rem stringlengths 0 126k | add stringlengths 0 441k | context stringlengths 15 136k |
|---|---|---|
if (aSelection.length > this.BATCH_LIMIT && aAction != "move") | if (aSelection.length > kBATCH_LIMIT && aAction != "move") | insertSelection: function (aAction, aSelection, aTarget, aTargetIndex) { var item, removedProps; var index = aTarget.index; var brokenIndex = aTarget.index; if (aSelection.length > 1) gBkmkTxnSvc.startBatch(); if (aSelection.length > this.BATCH_LIMIT && aAction != "move") BMDS.beginUpdateBat... |
var isCancelled = !BookmarksUtils.any(transaction.isValid) | var isCancelled = !BookmarksUtils.any(transaction.isValid); | insertSelection: function (aAction, aSelection, aTarget, aDoCopy) { var transaction = new BookmarkInsertTransaction(aAction); transaction.item = new Array(aSelection.length); transaction.parent = new Array(aSelection.length); transaction.index = new Array(aSelection.length); if (aAction != "... |
gBMtxmgr.doTransaction(transaction); | BMSVC.transactionManager.doTransaction(transaction); | insertSelection: function (aAction, aSelection, aTarget, aDoCopy) { var transaction = new BookmarkInsertTransaction(aAction); transaction.item = new Array(aSelection.length); transaction.parent = new Array(aSelection.length); transaction.index = new Array(aSelection.length); if (aAction != "... |
var transaction = new BookmarkInsertTransaction(aAction); transaction.item = new Array(aSelection.length); transaction.parent = new Array(aSelection.length); transaction.index = new Array(aSelection.length); transaction.removedProp = new Array(aSelection.length); | var item, removedProps; | insertSelection: function (aAction, aSelection, aTarget, aTargetIndex) { var transaction = new BookmarkInsertTransaction(aAction); transaction.item = new Array(aSelection.length); transaction.parent = new Array(aSelection.length); transaction.index = new Array(aSelection.length); transaction.rem... |
transaction.item [i] = rSource; transaction.parent[i] = aTarget.parent; | item = rSource; | insertSelection: function (aAction, aSelection, aTarget, aTargetIndex) { var transaction = new BookmarkInsertTransaction(aAction); transaction.item = new Array(aSelection.length); transaction.parent = new Array(aSelection.length); transaction.index = new Array(aSelection.length); transaction.rem... |
transaction.removedProp[i] = aSelection.prop ? aSelection.prop[i] : null; | removedProps = aSelection.prop ? aSelection.prop[i] : null; | insertSelection: function (aAction, aSelection, aTarget, aTargetIndex) { var transaction = new BookmarkInsertTransaction(aAction); transaction.item = new Array(aSelection.length); transaction.parent = new Array(aSelection.length); transaction.index = new Array(aSelection.length); transaction.rem... |
transaction.index[i] = -1; | index = -1; | insertSelection: function (aAction, aSelection, aTarget, aTargetIndex) { var transaction = new BookmarkInsertTransaction(aAction); transaction.item = new Array(aSelection.length); transaction.parent = new Array(aSelection.length); transaction.index = new Array(aSelection.length); transaction.rem... |
transaction.index [i] = (++index); | index = (++brokenIndex); | insertSelection: function (aAction, aSelection, aTarget, aTargetIndex) { var transaction = new BookmarkInsertTransaction(aAction); transaction.item = new Array(aSelection.length); transaction.parent = new Array(aSelection.length); transaction.index = new Array(aSelection.length); transaction.rem... |
transaction.index [i] = (index++); | index = (brokenIndex++); | insertSelection: function (aAction, aSelection, aTarget, aTargetIndex) { var transaction = new BookmarkInsertTransaction(aAction); transaction.item = new Array(aSelection.length); transaction.parent = new Array(aSelection.length); transaction.index = new Array(aSelection.length); transaction.rem... |
transaction.index [i] = index++; | index = brokenIndex++; | insertSelection: function (aAction, aSelection, aTarget, aTargetIndex) { var transaction = new BookmarkInsertTransaction(aAction); transaction.item = new Array(aSelection.length); transaction.parent = new Array(aSelection.length); transaction.index = new Array(aSelection.length); transaction.rem... |
BMSVC.transactionManager.doTransaction(transaction); | if (aSelection.length > 1) gBkmkTxnSvc.endBatch(); if (aSelection.length > this.BATCH_LIMIT && aAction != "move") BMDS.endUpdateBatch(); | insertSelection: function (aAction, aSelection, aTarget, aTargetIndex) { var transaction = new BookmarkInsertTransaction(aAction); transaction.item = new Array(aSelection.length); transaction.parent = new Array(aSelection.length); transaction.index = new Array(aSelection.length); transaction.rem... |
if (emoticon.search (/\;[-^v]?[\)>\]]/) != -1) | if (emoticon.search(/\>[=:;][-^v]?[(|]/) != -1) type = "face-angry"; else if (emoticon.search(/[=:;][-^v]?[Ss\\\/]/) != -1) type = "face-confused"; else if (emoticon.search(/[B8][-^v]?[)\]]/) != -1) type = "face-cool"; else if (emoticon.search(/[=:;]\~[-^v]?\(/) != -1) type = "face-cry"; else if (emoticon.search(/o[._]... | function insertSmiley (emoticon, containerTag){ var type = "error"; if (emoticon.search (/\;[-^v]?[\)>\]]/) != -1) type = "face-wink"; else if (emoticon.search (/[=:;][-^v]?[\)>\]]/) != -1) type = "face-smile"; else if (emoticon.search (/[=:;][-^v]?[\/\\]/) != -1) type = "face-screw"; ... |
else if (emoticon.search (/[=:;][-^v]?[\)>\]]/) != -1) type = "face-smile"; else if (emoticon.search (/[=:;][-^v]?[\/\\]/) != -1) type = "face-screw"; else if (emoticon.search (/[=:;]\~[-^v]?\(/) != -1) type = "face-cry"; else if (emoticon.search (/[=:;][-^v]?[\(<\[]/) != -1) type = "face-frown"; else if (emoticon.sear... | if (type == "error") { containerTag.appendChild(document.createTextNode(emoticon)); return; } | function insertSmiley (emoticon, containerTag){ var type = "error"; if (emoticon.search (/\;[-^v]?[\)>\]]/) != -1) type = "face-wink"; else if (emoticon.search (/[=:;][-^v]?[\)>\]]/) != -1) type = "face-smile"; else if (emoticon.search (/[=:;][-^v]?[\/\\]/) != -1) type = "face-screw"; ... |
if (window.arguments.length) { | if (window.arguments && window.arguments.length) { | function InspectorApp_initialize(){ inspector = new InspectorApp(); // window.arguments may be either a string or a node. // If passed via a command line handler, it will be a uri string. // If passed via navigator hooks, it will be a dom node to inspect. var initNode, initURI; if (window.arguments.length) { i... |
var url = getInstallURL(); | var url = getInstallURL(aEvent); | function install( aEvent, extName, iconURL, extHash) { if (aEvent.altKey || !window.InstallTrigger) return true; var url = getInstallURL(); if (url && url.match(/^.+\.xpi$/)) { var params = new Array(); params[extName] = { URL: url, IconURL: iconURL, to... |
file = 'file: | file = encodeURI('file: | function installExtension(){ // 1) Prompt the user for the location of the theme to install. Eventually we'll support web locations too. var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); fp.init(window, document.getElementById("installExtensions").getAttribute("filepickertitle")... |
file = 'file: | file = encodeURI('file: | function installTheme(filePath) { var file = ''; file = 'file:///' + escape(filePath.replace(/\\/g,'/')); InstallTrigger.installChrome(InstallTrigger.SKIN, file, getName(file));} |
var rowCount = this.rows; var columnCount = m.columns; result = new IntegerMatrix(rowCount, columnCount); for (var i = 0; i < rowCount; i++) { for (var j = 0; j < columnCount; j++) { result.data[i][j] = this.dotProduct(this.data[i], this.columns, m, j); } } return result; | var rowCount = this.rows; var columnCount = m.columns; var result = new IntegerMatrix(rowCount, columnCount); for (var i = 0; i < rowCount; i++) { for (var j = 0; j < columnCount; j++) { result.data[i][j] = this.dotProduct(this.data[i], this.columns, m, j); } } return result; | function IntegerMatrix_multiplyBy(m){ var rowCount = this.rows; var columnCount = m.columns; result = new IntegerMatrix(rowCount, columnCount); for (var i = 0; i < rowCount; i++) { for (var j = 0; j < columnCount; j++) { result.data[i][j] = this.dotProduct(this.data[i], this.columns, m, j); } } return result;} |
this.outliner.invalidate(); | this.tree.invalidate(); | invalidate: function() { this.outliner.invalidate(); }, |
return (contentType == IRC_MIMETYPE); | return (contentType == (this.isSecure ? IRCS_MIMETYPE : IRC_MIMETYPE)); | function irccl_canHandleContent(contentType, isContentPreferred, desiredContentType){ return (contentType == IRC_MIMETYPE);} |
return (contentType == IRC_MIMETYPE); | return (contentType == (this.isSecure ? IRCS_MIMETYPE : IRC_MIMETYPE)); | function irccl_isPreferred(contentType, desiredContentType){ return (contentType == IRC_MIMETYPE);} |
return new IRCContentListener(); | return new IRCContentListener(true); | function ircclf_createInstance(outer, iid){ if (outer != null) throw Components.results.NS_ERROR_NO_AGGREGATION; if (!iid.equals(nsIURIContentListener) && !iid.equals(nsISupportsWeakReference) && !iid.equals(nsISupports)) { throw Components.results.NS_ERROR_INVALID_ARG; } ... |
function IRCContentListener() {} | function IRCContentListener(isSecure) { this.isSecure = isSecure; } | function IRCContentListener(){} |
return new BogusChannel(URI); | var bogusChan = new BogusChannel(URI, this.isSecure); bogusChan.contentType = (this.isSecure ? IRCS_MIMETYPE : IRC_MIMETYPE); return bogusChan; | function ircph_newChannel(URI){ ios = Components.classes[IOSERVICE_CONTRACTID].getService(nsIIOService); if (!ios.allowPort(URI.port, URI.scheme)) throw Components.results.NS_ERROR_FAILURE; return new BogusChannel(URI);} |
url.init(nsIStandardURL.URLTYPE_STANDARD, 6667, spec, charset, baseURI); | url.init(nsIStandardURL.URLTYPE_STANDARD, (this.isSecure ? 9999 : 6667), spec, charset, baseURI); | function ircph_newURI(spec, charset, baseURI){ var cls = Components.classes[STANDARDURL_CONTRACTID]; var url = cls.createInstance(nsIStandardURL); url.init(nsIStandardURL.URLTYPE_STANDARD, 6667, spec, charset, baseURI); return url.QueryInterface(nsIURI);} |
return new IRCProtocolHandler(); | var protHandler = new IRCProtocolHandler(true); protHandler.scheme = "ircs"; protHandler.defaultPort = 9999; return protHandler; | function ircphf_createInstance(outer, iid){ if (outer != null) throw Components.results.NS_ERROR_NO_AGGREGATION; if (!iid.equals(nsIProtocolHandler) && !iid.equals(nsISupports)) throw Components.results.NS_ERROR_INVALID_ARG; return new IRCProtocolHandler();} |
function IRCProtocolHandler() | function IRCProtocolHandler(isSecure) | function IRCProtocolHandler(){} |
this.isSecure = isSecure; | function IRCProtocolHandler(){} | |
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... |
return result; | if (!result) { return false; } var cookieViewer = this.createInstance ("component: var list = cookieViewer.GetPermissionValue(1); var permissionList = list.split(list[0]); for(var i = 1; i < permissionList.length; i+=2) { permStr = permissionList[i+1]; var type = permStr.substring(0,1); if (type == "-") { /* some h... | isBlockingImages: function () { var pref = this.getService( 'component://netscape/preferences', 'nsIPref' ); var result = false; try { result = pref.GetBoolPref( "imageblocker.enabled" ); } catch(e) { } return result; }, |
RDFC.Init(BMDS, aContainer) | RDFC.Init(BMDS, aContainer); | isChildOfContainer: function (aItem, aContainer) { RDFC.Init(BMDS, aContainer) var rChildren = RDFC.GetElements(); while (rChildren.hasMoreElements()) { if (aItem == rChildren.getNext()) return true; } return false; }, |
if (aTarget.parent.Value == "NC:BookmarksTopRoot") return false; | isCommandEnabled: function (aCommand, aSelection, aTarget) { if (aTarget.parent.Value == "NC:BookmarksTopRoot") return false; var item0, type0; var length = aSelection.length; if (length != 0) { item0 = aSelection.item[0].Value; type0 = aSelection.type[0]; } var i; switch(aCommand... | |
case "cmd_bm_undo": | isCommandEnabled: function (aCommand, aSelection, aTarget) { if (aTarget.parent.Value == "NC:BookmarksTopRoot") return false; var item0, type0; var length = aSelection.length; if (length != 0) { item0 = aSelection.item[0].Value; type0 = aSelection.type[0]; } var i; switch(aCommand... | |
return true; | return BMSVC.transactionManager.numberOfRedoItems > 0; | isCommandEnabled: function (aCommand, aSelection, aTarget) { if (aTarget.parent.Value == "NC:BookmarksTopRoot") return false; var item0, type0; var length = aSelection.length; if (length != 0) { item0 = aSelection.item[0].Value; type0 = aSelection.type[0]; } var i; switch(aCommand... |
return false; | isCommandEnabled: function (aCommand, aSelection, aTarget) { if (aTarget.parent.Value == "NC:BookmarksTopRoot") return false; var item0, type0; var length = aSelection.length; if (length != 0) { item0 = aSelection.item[0].Value; type0 = aSelection.type[0]; } var i; switch(aCommand... | |
return length > 0; | return length > 0 && !aSelection.containsRF; | isCommandEnabled: function (aCommand, aSelection, aTarget) { if (aTarget.parent.Value == "NC:BookmarksTopRoot") return false; var item0, type0; var length = aSelection.length; if (length != 0) { item0 = aSelection.item[0].Value; type0 = aSelection.type[0]; } var i; switch(aCommand... |
return item0 != "NC:PersonalToolbarFolder" && type0 == "Folder"; | return item0 != "NC:PersonalToolbarFolder" && item0 != "NC:BookmarksRoot" && type0 == "Folder"; | isCommandEnabled: function (aCommand, aSelection, aTarget) { var item0, type0; var length = aSelection.length; if (length != 0) { item0 = aSelection.item[0].Value; type0 = aSelection.type[0]; } var i; switch(aCommand) { case "cmd_undo": case "cmd_bm_undo": return BMSVC.transact... |
return true; | return true; case "cmd_bm_openfolder": for (var i=0; i<aSelection.length; ++i) { if (aSelection.type[i] == "Bookmark" || aSelection.type[i] == "BookmarkSeparator") return false; RDFC.Init(BMDS, aSelection.item[i]); var children = RDFC.GetElements(); while (children.hasMoreElements()) { if (BookmarksUtils.resolveType(ch... | isCommandEnabled: function (aCommand, aSelection, aTarget) { var length = aSelection.length; if (length == 0) return false; var isValidTarget = BookmarksUtils.isValidTargetContainer(aTarget.parent) var item0 = aSelection.item[0].Value; var type0 = aSelection.type[0]; var isNotRef = !aS... |
if (aCommand == "cmdEditCopy") { return this.mTree.view.selection.count > 0; } | isCommandEnabled: function(aCommand) { return false; }, | |
return false | return false; | isCommandEnabled: function (aCommand, aSelection, aTarget) { if (aTarget.parent.Value == "NC:BookmarksTopRoot") return false; var item0, type0; var length = aSelection.length; if (length != 0) { item0 = aSelection.item[0].Value; type0 = aSelection.type[0]; } var i; switch(aCommand... |
case "cmd_showFolder": 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; ... | |
case "cmd_printcard": case "cmd_printcardpreview": | 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... | |
case "cmd_selectAll": return true; | isCommandEnabled: function(command) { switch ( command ) { case "cmd_selectAll": return true; case "cmd_cut": case "cmd_copy": case "cmd_paste": return false; default: return false; } }, | |
return false; case "cmd_delete": case "button_delete": if ( command == "cmd_delete" ) goSetMenuValue(command, 'valueFolder'); var folderTree = GetFolderTree(); var startIndex = {}; var endIndex = {}; folderTree.treeBoxObject.selection.getRangeAt(0, startIndex, endIndex); if (startIndex.value >= 0) { var canDeleteThisFo... | isCommandEnabled: function(command) { switch ( command ) { case "cmd_selectAll": return true; case "cmd_cut": case "cmd_copy": case "cmd_paste": return false; default: return false; } }, | |
case "cmd_getNextNMessages": return IsGetNextNMessagesEnabled(); | isCommandEnabled: function(command) { switch ( command ) { case "cmd_reply": case "button_reply": case "cmd_replySender": case "cmd_replyGroup": case "cmd_replyall": case "button_replyall": case "cmd_forward": case "button_forward": case "cmd_forwardInline": case "cmd_forwardAttachment": case "... | |
case "cmd_selectAll": return GetDBView() != null; | isCommandEnabled: function(command) { var enabled = true; switch (command) { case "goto_folder_button": if (GetNumSelectedMessages() != 1) enabled = false; break; case "cmd_delete": case "cmd_shiftDelete": case "button_... | |
case "cmd_findPrev": | 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_printpreview": | 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... | |
return BMSVC.transactionManager.numberOfUndoItems > 0; | return gBkmkTxnSvc.canUndo(); | 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] != ... |
return BMSVC.transactionManager.numberOfRedoItems > 0; | return gBkmkTxnSvc.canRedo(); | 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_undo": case "cmd_redo": return SetupUndoRedoCommand(command); | isCommandEnabled: function(command) { switch ( command ) { case "cmd_selectAll": return true; case "cmd_cut": case "cmd_copy": case "cmd_paste": return false; case "cmd_undo": case "cmd_redo": return SetupUndoRedoCommand(command); default: return false; } }, | |
case "cmd_replace": | isCommandEnabled: function(command) { //For some reason, when editor has the focus, focusedElement is null!. var focusedElement = top.document.commandDispatcher.focusedElement; var composeHTML = msgCompose && msgCompose.composeHTML; switch (command) { //File Menu case "cmd_attachFile": ... | |
return MsgCanFindAgain(); | return true; | 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... |
var composeHTML = msgCompose && msgCompose.composeHTML; | var composeHTML = gMsgCompose && gMsgCompose.composeHTML; | isCommandEnabled: function(command) { //For some reason, when editor has the focus, focusedElement is null!. var focusedElement = top.document.commandDispatcher.focusedElement; var composeHTML = msgCompose && msgCompose.composeHTML; switch (command) { //File Menu case "cmd_attachFile": ... |
return !(gWindowLocked || isOffline); | return !(gWindowLocked || gIsOffline); | isCommandEnabled: function(command) { //For some reason, when editor has the focus, focusedElement is null!. var focusedElement = top.document.commandDispatcher.focusedElement; var composeHTML = msgCompose && msgCompose.composeHTML; switch (command) { //File Menu case "cmd_attachFile": ... |
case "cmd_selectAll": return true; case "cmd_cut": case "cmd_copy": case "cmd_paste": return false; case "cmd_undo": case "cmd_redo": return SetupUndoRedoCommand(command); | isCommandEnabled: function(command) { switch ( command ) { default: return false; } }, | |
selectedItem.getAttribute("toBeUninstalled") != "true" && | opType != OP_NEEDS_UNINSTALL && | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selected; switch (aCommand) { case "cmd_close": return true; case "cmd_useTheme": return selectedItem && !selectedItem.disabled && selectedItem.getAttribute("toBeUninstalled") != "true" && ... |
selectedItem.getAttribute("toBeUninstalled") != "true" && | opType == OP_NONE && | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selected; switch (aCommand) { case "cmd_close": return true; case "cmd_useTheme": return selectedItem && !selectedItem.disabled && selectedItem.getAttribute("toBeUninstalled") != "true" && ... |
selectedItem.getAttribute("toBeInstalled") != "true" && (selectedItem.disabled ? selectedItem.getAttribute("aboutURL") == "" : true); | opType != OP_NEEDS_INSTALL; | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selected; switch (aCommand) { case "cmd_close": return true; case "cmd_useTheme": return selectedItem && !selectedItem.disabled && selectedItem.getAttribute("toBeUninstalled") != "true" && ... |
selectedItem.getAttribute("internalName") != gDefaultTheme); | selectedItem.getAttribute("internalName") != gDefaultTheme && opType != OP_NEEDS_UNINSTALL && selectedItem.getAttribute("locked") != "true" && canWriteToLocation(selectedItem)); | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selected; switch (aCommand) { case "cmd_close": return true; case "cmd_useTheme": return selectedItem && !selectedItem.disabled && selectedItem.getAttribute("toBeUninstalled") != "true" && ... |
selectedItem.getAttribute("toBeUninstalled") != "true" && selectedItem.getAttribute("toBeInstalled") != "true" && | opType != OP_NEEDS_UNINSTALL && | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selected; switch (aCommand) { case "cmd_close": return true; case "cmd_useTheme": return selectedItem && !selectedItem.disabled && selectedItem.getAttribute("toBeUninstalled") != "true" && ... |
selectedItem.getAttribute("toBeUninstalled") != "true" && selectedItem.getAttribute("toBeInstalled") != "true") && canWriteToLocation(selectedItem); | opType != OP_NEEDS_INSTALL && opType != OP_NEEDS_UNINSTALL && opType != OP_NEEDS_UPGRADE && canWriteToLocation(selectedItem)); | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selected; switch (aCommand) { case "cmd_close": return true; case "cmd_useTheme": return selectedItem && !selectedItem.disabled && selectedItem.getAttribute("toBeUninstalled") != "true" && ... |
selectedItem.disabled; | (selectedItem.disabled && opType != OP_NEEDS_ENABLE || opType == OP_NEEDS_DISABLE || opType == OP_NEEDS_UNINSTALL); | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selected; switch (aCommand) { case "cmd_close": return true; case "cmd_useTheme": return selectedItem && !selectedItem.disabled && selectedItem.getAttribute("toBeUninstalled") != "true" && ... |
selectedItem.disabled && selectedItem.getAttribute("toBeUninstalled") != "true" && | opType != OP_NEEDS_ENABLE && opType != OP_NEEDS_INSTALL && opType != OP_NEEDS_UPGRADE && | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selected; switch (aCommand) { case "cmd_close": return true; case "cmd_useTheme": return selectedItem && !selectedItem.disabled && selectedItem.getAttribute("toBeUninstalled") != "true" && ... |
!selectedItem.disabled && selectedItem.getAttribute("toBeUninstalled") != "true" && selectedItem.getAttribute("toBeInstalled") != "true"; | (opType == OP_NONE || opType == OP_NEEDS_ENABLE); | isCommandEnabled: function (aCommand) { var selectedItem = gExtensionsView.selected; switch (aCommand) { case "cmd_close": return true; case "cmd_useTheme": return selectedItem && !selectedItem.disabled && selectedItem.getAttribute("toBeUninstalled") != "true" && ... |
case "cmd_bm_find": | isCommandEnabled: function (aCommand, aSelection, aTarget) { if (aTarget.parent.Value == "NC:BookmarksTopRoot") return false; var item0, type0; var length = aSelection.length; if (length != 0) { item0 = aSelection.item[0].Value; type0 = aSelection.type[0]; } var i; switch(aCommand... | |
dump("ThreadPaneController.isCommandEnabled(" + command + ")\n"); | isCommandEnabled: function(command) { dump("ThreadPaneController.isCommandEnabled(" + command + ")\n"); switch ( command ) { case "cmd_selectAll": return true; case "cmd_delete": case "button_delete": var threadTree = GetThreadTree(); dump("threadTree = " + threadTree + "\n"); var numSele... | |
case "cmd_selectAll": return true; case "cmd_delete": case "button_delete": var threadTree = GetThreadTree(); dump("threadTree = " + threadTree + "\n"); var numSelected = 0; if ( threadTree && threadTree.selectedItems ) numSelected = threadTree.selectedItems.length; if ( command == "cmd_delete" ) { if ( numSelected < ... | isCommandEnabled: function(command) { dump("ThreadPaneController.isCommandEnabled(" + command + ")\n"); switch ( command ) { case "cmd_selectAll": return true; case "cmd_delete": case "button_delete": var threadTree = GetThreadTree(); dump("threadTree = " + threadTree + "\n"); var numSele... | |
var canPaste = this.mPanel.panelset.clipboardFlavor == "inspector/dom-node"; if (canPaste) { var node = this.mPanel.panelset.getClipboardData(); canPaste = node ? node.nodeType != Node.ATTRIBUTE_NODE : false; } return canPaste; | case "cmdEditPasteBefore": return this.isValidChild(parentNode, clipboardNode); case "cmdEditPasteReplace": return this.isValidChild(parentNode, clipboardNode, selectedNode); case "cmdEditPasteFirstChild": case "cmdEditPasteLastChild": return this.isValidChild(selectedNode, clipboardNode); case "cmdEditPasteAsParent": ... | isCommandEnabled: function(aCommand) { switch (aCommand) { case "cmdEditPaste": var canPaste = this.mPanel.panelset.clipboardFlavor == "inspector/dom-node"; if (canPaste) { var node = this.mPanel.panelset.getClipboardData(); canPaste = node ? node.nodeType != Node.ATTRIBUTE_NO... |
case "cmd_markAsShowRemote": return (GetNumSelectedMessages() > 0 && checkMsgHdrPropertyIsNot("remoteContentPolicy", kAllowRemoteContent)); case "cmd_markAsNotPhish": return (GetNumSelectedMessages() > 0 && checkMsgHdrPropertyIsNot("notAPhishMessage", kNotAPhishMessage)); | isCommandEnabled: function(command) { var loadedFolder; switch (command) { case "cmd_createFilterFromPopup": case "cmd_createFilterFromMenu": loadedFolder = GetLoadedMsgFolder(); return (loadedFolder && loadedFolder.server.canHaveFilters); case "cmd_delete": UpdateDeleteCommand();... | |
var cell = window.editorShell.GetElementOrParentByTagName("td", null); return (cell != null && (cell.colSpan > 1 || cell.rowSpan > 1)); | var tagNameObj = new Object; var countObj = new Object; var cell = window.editorShell.GetSelectedOrParentTableElement(tagNameObj, countObj); return ( cell && (tagNameObj.value == "td") && (countObj.value <= 1) && IsSelectionInOneCell() ); | isCommandEnabled: function(aCommand, dummy) { if (window.editorShell && window.editorShell.documentEditable) { var cell = window.editorShell.GetElementOrParentByTagName("td", null); return (cell != null && (cell.colSpan > 1 || cell.rowSpan > 1)); } return false; }, |
case "cmd_renderedHTMLEnabler": | isCommandEnabled: function(command) { //For some reason, when editor has the focus, focusedElement is null!. var focusedElement = top.document.commandDispatcher.focusedElement; var composeHTML = msgCompose && msgCompose.composeHTML; switch (command) { //File Menu case "cmd_attachFile": ... | |
return DoesAccountHaveOfflineSupport()); | return DoesAccountHaveOfflineSupport(); | isCommandEnabled: function(command) { var enabled = new Object(); var checkStatus = new Object(); switch ( command ) { case "cmd_delete": if (isNewsURI(gCurrentMessageUri)) { goSetMenuValue(command, 'valueNewsMessage'); goSetAccessKey(command, 'valueNewsMessageAccessKey'); } else { ... |
case "cmd_rewrap": return !msgCompose.composeHTML && !focusedElement; | 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_canHaveFilter": | case "cmd_createFilterFromPopup": case "cmd_createFilterFromMenu": | isCommandEnabled: function(command) { var enabled = new Object(); var checkStatus = new Object(); switch ( command ) { case "cmd_delete": if (isNewsURI(gCurrentMessageUri)) { goSetMenuValue(command, 'valueNewsMessage'); goSetAccessKey(command, 'valueNewsMessageAccessKey'); } else { ... |
return !windowLocked; | return !gWindowLocked; | isCommandEnabled: function(command) { //For some reason, when editor has the focus, focusedElement is null!. var focusedElement = top.document.commandDispatcher.focusedElement; var composeHTML = msgCompose && msgCompose.composeHTML; switch (command) { //File Menu case "cmd_attachFile": ... |
return !(windowLocked || (ioService && ioService.offline)) | return !(gWindowLocked || (ioService && ioService.offline)) | isCommandEnabled: function(command) { //For some reason, when editor has the focus, focusedElement is null!. var focusedElement = top.document.commandDispatcher.focusedElement; var composeHTML = msgCompose && msgCompose.composeHTML; switch (command) { //File Menu case "cmd_attachFile": ... |
return (window.editorShell != null); | return (window.editorShell && !IsInHTMLSourceMode()); | isCommandEnabled: function(aCommand, dummy) { return (window.editorShell != null); }, |
case "cmd_delete": case "cmd_shiftdelete": | isCommandEnabled: function(command) { var enabled = true; switch (command) { case "goto_folder_button": if (GetNumSelectedMessages() != 1) enabled = false; break; case "button_delete": // this assumes that advanced searches do... | |
{ switch ( command ) { case "cmd_selectAll": return true; case "cmd_delete": case "button_delete": var numSelected = 0; if ( resultsTree && resultsTree.selectedItems ) numSelected = resultsTree.selectedItems.length; if ( command == "cmd_delete" ) { if ( numSelected < 2 ) goSetMenuValue(command, 'valueCard'); else goS... | { switch (command) { case "cmd_selectAll": return true; case "cmd_delete": case "button_delete": var numSelected = 0; if (resultsTree && resultsTree.selectedItems) numSelected = resultsTree.selectedItems.length; if (command == "cmd_delete") { if (numSelected < 2) goSetMenuValue(command, "valueCard"); else goSetMenuVal... | isCommandEnabled: function(command) { //dump('ResultsPaneController::isCommandEnabled(' + command + ')\n'); switch ( command ) { case "cmd_selectAll": return true; case "cmd_delete": case "button_delete": var numSelected = 0; if ( resultsTree && resultsTree.selectedItems ) numSelected = result... |
var focusedTop = Components.lookupMethod(aFocusedWindow, 'top') .call(aFocusedWindow); return (focusedTop == window.content); | return (aFocusedWindow.top == window.content); | function isContentFrame(aFocusedWindow){ if (!aFocusedWindow) return false; var focusedTop = Components.lookupMethod(aFocusedWindow, 'top') .call(aFocusedWindow); return (focusedTop == window.content);} |
{ var contentFrames = _content.frames; if (contentFrames.length) { for (var i = 0; i < contentFrames.length; ++i) { if (aFocusedWindow == contentFrames[i]) return true; } | { var contentFrames = _content.frames; if (contentFrames.length) { for (var i = 0; i < contentFrames.length; ++i) { if (aFocusedWindow == contentFrames[i]) return true; | function isDocumentFrame(aFocusedWindow) { var contentFrames = _content.frames; if (contentFrames.length) { for (var i = 0; i < contentFrames.length; ++i) { if (aFocusedWindow == contentFrames[i]) return true; } } return false; } |
return false; | function isDocumentFrame(aFocusedWindow) { var contentFrames = _content.frames; if (contentFrames.length) { for (var i = 0; i < contentFrames.length; ++i) { if (aFocusedWindow == contentFrames[i]) return true; } } return false; } | |
return false; } | function isDocumentFrame(aFocusedWindow) { var contentFrames = _content.frames; if (contentFrames.length) { for (var i = 0; i < contentFrames.length; ++i) { if (aFocusedWindow == contentFrames[i]) return true; } } return false; } | |
isEditable: function(row, colID) {return false; }, | isEditable: function(row, col) {return false; }, | isEditable: function(row, colID) {return false; }, |
return IsEditorContentHTML() && !IsInHTMLSourceMode(); | return gIsHTMLEditor && !IsInHTMLSourceMode(); | function IsEditingRenderedHTML(){ return IsEditorContentHTML() && !IsInHTMLSourceMode();} |
return aObject instanceof Components.interfaces.oeIICalEvent; | return (aObject instanceof Components.interfaces.oeIICalEvent) && !(aObject instanceof Components.interfaces.oeIICalTodo); | function isEvent ( aObject ){ return aObject instanceof Components.interfaces.oeIICalEvent;} |
return "@mozilla.org/appshell/component/find;1" in Components.classes; | return "@mozilla.org/embedcomp/rangefind;1" in Components.classes && "@mozilla.org/find/find_service;1" in Components.classes; | function IsFindInstalled(){ return "@mozilla.org/appshell/component/find;1" in Components.classes;} |
return this.getProperty(aResource, NC_NS+"FolderGroup") == "true" | return this.getProperty(aResource, NC_NS+"FolderGroup") == "true"; | isFolderGroup: function (aResource) { return this.getProperty(aResource, NC_NS+"FolderGroup") == "true" }, |
var permissionmanager = Components.classes["@mozilla.org/permissionmanager;1"] .getService(Components.interfaces.nsIPermissionManager); return permissionmanager.testForBlocking(this.imageURL, IMAGEPERMISSION); | var nsIPermissionManager = Components.interfaces.nsIPermissionManager; var permissionmanager = Components.classes["@mozilla.org/permissionmanager;1"] .getService(Components.interfaces.nsIPermissionManager); var uri = Components.classes["@mozilla.org/network/standard-url;1"] .createInstance(Components.interfaces.nsIURI)... | isImageBlocked : function() { var permissionmanager = Components.classes["@mozilla.org/permissionmanager;1"] .getService(Components.interfaces.nsIPermissionManager); return permissionmanager.testForBlocking(this.imageURL, IMAGEPERMISSION); }, |
var menuItem = document.createElement("menuitem"); | var menuItem = document.createElementNS("http: | function isImageFile(parent,url){ // note: deleted all the doContextCmd stuff from bookmarks. var menuItem = document.createElement("menuitem"); menuItem.setAttribute("value","Insert Image"); // menuItem.setAttribute("onaction","AutoInsertImage(\'" + url + "\')"); parent.appendChild(menuItem);} |
if (!gEditor) return false; var htmlEditor = gEditor.QueryInterface(Components.interfaces.nsIHTMLEditor); return (htmlEditor && | return (gIsHTMLEditor && | function IsInTable(){ var flags = gEditor.flags; if (!gEditor) return false; var htmlEditor = gEditor.QueryInterface(Components.interfaces.nsIHTMLEditor); return (htmlEditor && !(flags & nsIPlaintextEditor.eEditorReadonlyMask) && IsEditingRenderedHTML() && null != htmlEditor.getElementOrP... |
null != htmlEditor.getElementOrParentByTagName("table", null)); | null != gEditor.getElementOrParentByTagName("table", null)); | function IsInTable(){ var flags = gEditor.flags; if (!gEditor) return false; var htmlEditor = gEditor.QueryInterface(Components.interfaces.nsIHTMLEditor); return (htmlEditor && !(flags & nsIPlaintextEditor.eEditorReadonlyMask) && IsEditingRenderedHTML() && null != htmlEditor.getElementOrP... |
dump("IsInTable?\n"); | function IsInTable(){dump("IsInTable?\n"); return (window.editorShell && window.editorShell.documentEditable && null != window.editorShell.GetElementOrParentByTagName("table", null));} | |
var htmlEditor = gEditor.QueryInterface(Components.interfaces.nsIHTMLEditor); return (gEditor && htmlEditor && | return (gIsHTMLEditor && | function IsInTableCell(){ var flags = gEditor.flags; var htmlEditor = gEditor.QueryInterface(Components.interfaces.nsIHTMLEditor); return (gEditor && htmlEditor && !(flags & nsIPlaintextEditor.eEditorReadonlyMask) && IsEditingRenderedHTML() && null != htmlEditor.getElementOrParentByTagNam... |
null != htmlEditor.getElementOrParentByTagName("td", null)); | null != gEditor.getElementOrParentByTagName("td", null)); | function IsInTableCell(){ var flags = gEditor.flags; var htmlEditor = gEditor.QueryInterface(Components.interfaces.nsIHTMLEditor); return (gEditor && htmlEditor && !(flags & nsIPlaintextEditor.eEditorReadonlyMask) && IsEditingRenderedHTML() && null != htmlEditor.getElementOrParentByTagNam... |
dump("IsInTableCell?\n"); | function IsInTableCell(){dump("IsInTableCell?\n"); return (window.editorShell && window.editorShell.documentEditable && null != window.editorShell.GetElementOrParentByTagName("td", null));} | |
if (ipv4HostRegExp.test(aHostName)) | if (ipv4HostRegExp.test(aHostName) && aHostName != '0.0.0.0') | function isIPv4HostName(aHostName){ var ipv4HostRegExp = new RegExp(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/); // IPv4 if (ipv4HostRegExp.test(aHostName)) return true; else return false;} |
if (ipv4HostRegExp.test(aHostName) && aHostName != '0.0.0.0') return true; else return false; | return ipv4HostRegExp.test(aHostName) && aHostName != '0.0.0.0'; | function isIPv4HostName(aHostName){ var ipv4HostRegExp = new RegExp(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/); // IPv4 // treat 0.0.0.0 as an invalid IP address if (ipv4HostRegExp.test(aHostName) && aHostName != '0.0.0.0') return true; else return false;} |
if(item) return(item.getAttribute("contexthidden") != "true"); | if (item) return !item.hidden; | function IsMenuItemShowing(menuID){ var item = document.getElementById(menuID); if(item) return(item.getAttribute("contexthidden") != "true"); return false;} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.