rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
stringId = "deleteDomain";
text = gHistoryBundle.getFormattedString("deleteDomain", [ gLastDomain ]);
isCommandEnabled: function(command) { var enabled = false; var stringId; var text; switch(command) { case "cmd_deleteByHostname": if (gLastHostname) { stringId = "deleteHost"; enabled = true; } else { stringId = "deleteHostNoSelection"; } text = gHistoryBundle.getFormattedString(stringId, [ gLastHostname ]); gDeleteByHostname.setAttribute("label", text); break; case "cmd_deleteByDomain": if (gLastDomain) { stringId = "deleteDomain"; enabled = true; } else { stringId = "deleteDomainNoSelection"; } text = gHistoryBundle.getFormattedString(stringId, [ gLastDomain ]); gDeleteByDomain.setAttribute("label", text); } return enabled; },
stringId = "deleteDomainNoSelection";
text = gHistoryBundle.getString("deleteDomainNoSelection");
isCommandEnabled: function(command) { var enabled = false; var stringId; var text; switch(command) { case "cmd_deleteByHostname": if (gLastHostname) { stringId = "deleteHost"; enabled = true; } else { stringId = "deleteHostNoSelection"; } text = gHistoryBundle.getFormattedString(stringId, [ gLastHostname ]); gDeleteByHostname.setAttribute("label", text); break; case "cmd_deleteByDomain": if (gLastDomain) { stringId = "deleteDomain"; enabled = true; } else { stringId = "deleteDomainNoSelection"; } text = gHistoryBundle.getFormattedString(stringId, [ gLastDomain ]); gDeleteByDomain.setAttribute("label", text); } return enabled; },
text = gHistoryBundle.getFormattedString(stringId, [ gLastDomain ]); gDeleteByDomain.setAttribute("label", text);
gDeleteByDomain.label = text;
isCommandEnabled: function(command) { var enabled = false; var stringId; var text; switch(command) { case "cmd_deleteByHostname": if (gLastHostname) { stringId = "deleteHost"; enabled = true; } else { stringId = "deleteHostNoSelection"; } text = gHistoryBundle.getFormattedString(stringId, [ gLastHostname ]); gDeleteByHostname.setAttribute("label", text); break; case "cmd_deleteByDomain": if (gLastDomain) { stringId = "deleteDomain"; enabled = true; } else { stringId = "deleteDomainNoSelection"; } text = gHistoryBundle.getFormattedString(stringId, [ gLastDomain ]); gDeleteByDomain.setAttribute("label", text); } return enabled; },
case "cmd_delete": return MessageHasSelectedAttachments(); case "cmd_selectAll": return MessageHasAttachments();
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_attachPage": case "cmd_close": case "cmd_saveDefault": case "cmd_saveAsFile": case "cmd_saveAsDraft": case "cmd_saveAsTemplate": case "cmd_sendButton": case "cmd_sendLater": case "cmd_printSetup": case "cmd_print": case "cmd_sendWithCheck": return !gWindowLocked; case "cmd_sendNow": return !(gWindowLocked || gIsOffline); case "cmd_quit": return true; //Edit Menu case "cmd_pasteQuote": case "cmd_find": case "cmd_findNext": //Disable the editor specific edit commands if the focus is not into the body return !focusedElement; case "cmd_account": case "cmd_preferences": return true; //View Menu case "cmd_showComposeToolbar": return true; case "cmd_showFormatToolbar": return composeHTML; //Insert Menu 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_insertHTML": case "cmd_insertChars": case "cmd_insertBreak": case "cmd_insertBreakAll": return !focusedElement; //Options Menu case "cmd_selectAddress": return !gWindowLocked; case "cmd_spelling": return !focusedElement; case "cmd_outputFormat": return composeHTML;// case "cmd_quoteMessage":// return mailSession && mailSession.topmostMsgWindow; case "cmd_rewrap": return !composeHTML && !focusedElement; //Format Menu 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_code": case "cmd_samp": case "cmd_var": case "cmd_removeList": case "cmd_ul": case "cmd_ol": case "cmd_dt": case "cmd_dd": case "cmd_listProperties": case "cmd_indent": case "cmd_outdent": case "cmd_objectProperties": case "cmd_InsertTable": case "cmd_InsertRowAbove": case "cmd_InsertRowBelow": case "cmd_InsertColumnBefore": case "cmd_InsertColumnAfter": case "cmd_SelectTable": case "cmd_SelectRow": case "cmd_SelectColumn": case "cmd_SelectCell": case "cmd_SelectAllCells": case "cmd_DeleteTable": case "cmd_DeleteRow": case "cmd_DeleteColumn": case "cmd_DeleteCell": case "cmd_DeleteCellContents": case "cmd_NormalizeTable": case "cmd_tableJoinCells": case "cmd_tableSplitCell": case "cmd_editTable": return !focusedElement; default:// dump("##MsgCompose: command " + command + " disabled!\n"); return false; } },
return !(gWindowLocked || (ioService && ioService.offline))
return !(gWindowLocked || isOffline);
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_attachPage": case "cmd_close": case "cmd_saveDefault": case "cmd_saveAsFile": case "cmd_saveAsDraft": case "cmd_saveAsTemplate": case "cmd_sendButton": case "cmd_sendLater":// case "cmd_printSetup": case "cmd_print": return !gWindowLocked; case "cmd_sendNow": return !(gWindowLocked || (ioService && ioService.offline)) case "cmd_quit": return true; //Edit Menu case "cmd_pasteQuote": case "cmd_find": case "cmd_findNext": //Disable the editor specific edit commands if the focus is not into the body return !focusedElement; case "cmd_account": case "cmd_preferences": return true; //View Menu case "cmd_showComposeToolbar": return true; case "cmd_showFormatToolbar": return composeHTML; //Insert Menu 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_insertHTML": case "cmd_insertChars": case "cmd_insertBreak": case "cmd_insertBreakAll": return !focusedElement; //Options Menu case "cmd_selectAddress": return !gWindowLocked; case "cmd_spelling": return !focusedElement; case "cmd_outputFormat": return composeHTML;// case "cmd_quoteMessage":// return mailSession && mailSession.topmostMsgWindow; case "cmd_rewrap": return !composeHTML && !focusedElement; //Format Menu 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_code": case "cmd_samp": case "cmd_var": case "cmd_removeList": case "cmd_ul": case "cmd_ol": case "cmd_dt": case "cmd_dd": case "cmd_listProperties": case "cmd_indent": case "cmd_outdent": case "cmd_objectProperties": case "cmd_InsertTable": case "cmd_InsertRowAbove": case "cmd_InsertRowBelow": case "cmd_InsertColumnBefore": case "cmd_InsertColumnAfter": case "cmd_SelectTable": case "cmd_SelectRow": case "cmd_SelectColumn": case "cmd_SelectCell": case "cmd_SelectAllCells": case "cmd_DeleteTable": case "cmd_DeleteRow": case "cmd_DeleteColumn": case "cmd_DeleteCell": case "cmd_DeleteCellContents": case "cmd_NormalizeTable": case "cmd_tableJoinCells": case "cmd_tableSplitCell": case "cmd_editTable": return !focusedElement; default:// dump("##MsgCompose: command " + command + " disabled!\n"); return false; } },
selectedItem.getAttribute("internalName") != KEY_DEFAULT_THEME);
selectedItem.getAttribute("internalName") != gDefaultTheme);
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" && gCurrentTheme != selectedItem.getAttribute("internalName"); case "cmd_options": return selectedItem && !selectedItem.disabled && selectedItem.getAttribute("toBeUninstalled") != "true" && selectedItem.getAttribute("optionsURL") != ""; case "cmd_about": return selectedItem && selectedItem.getAttribute("toBeInstalled") != "true" && (selectedItem.disabled ? selectedItem.getAttribute("aboutURL") == "" : true); case "cmd_homepage": return selectedItem && selectedItem.getAttribute("homepageURL") != ""; case "cmd_uninstall": if (gWindowState != "extensions") { // uninstall is only available if the selected item isn't the // default theme. return (selectedItem && selectedItem.getAttribute("internalName") != KEY_DEFAULT_THEME); } return selectedItem && selectedItem.getAttribute("toBeUninstalled") != "true" && selectedItem.getAttribute("toBeInstalled") != "true" && selectedItem.getAttribute("locked") != "true" && canWriteToLocation(selectedItem); case "cmd_update": return !selectedItem || (selectedItem && selectedItem.getAttribute("toBeUninstalled") != "true" && selectedItem.getAttribute("toBeInstalled") != "true") && canWriteToLocation(selectedItem); case "cmd_reallyEnable": // controls whether to show Enable or Disable in extensions' context menu return selectedItem && selectedItem.disabled && !gExtensionManager.inSafeMode; case "cmd_enable": //controls wheter the Enable/Disable menuitem is enabled return selectedItem && selectedItem.disabled && !gExtensionManager.inSafeMode && selectedItem.getAttribute("toBeUninstalled") != "true" && selectedItem.getAttribute("compatible") != "false"; case "cmd_disable": return selectedItem && !selectedItem.disabled && selectedItem.getAttribute("toBeUninstalled") != "true" && selectedItem.getAttribute("toBeInstalled") != "true"; case "cmd_movetop": return selectedItem && (gExtensionsView.children[0] != selectedItem); case "cmd_moveup": return selectedItem && (gExtensionsView.children[0] != selectedItem); case "cmd_movedn": var children = gExtensionsView.children; return selectedItem && (children[children.length-1] != selectedItem);#ifndef MOZ_PHOENIX case "cmd_install": return true; #endif } return false; },
selectedItem.disabled && !gExtensionManager.inSafeMode;
selectedItem.disabled;
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" && gCurrentTheme != selectedItem.getAttribute("internalName"); case "cmd_options": return selectedItem && !selectedItem.disabled && selectedItem.getAttribute("toBeUninstalled") != "true" && selectedItem.getAttribute("optionsURL") != ""; case "cmd_about": return selectedItem && selectedItem.getAttribute("toBeInstalled") != "true" && (selectedItem.disabled ? selectedItem.getAttribute("aboutURL") == "" : true); case "cmd_homepage": return selectedItem && selectedItem.getAttribute("homepageURL") != ""; case "cmd_uninstall": if (gWindowState != "extensions") { // uninstall is only available if the selected item isn't the // default theme. return (selectedItem && selectedItem.getAttribute("internalName") != KEY_DEFAULT_THEME); } return selectedItem && selectedItem.getAttribute("toBeUninstalled") != "true" && selectedItem.getAttribute("toBeInstalled") != "true" && selectedItem.getAttribute("locked") != "true" && canWriteToLocation(selectedItem); case "cmd_update": return !selectedItem || (selectedItem && selectedItem.getAttribute("toBeUninstalled") != "true" && selectedItem.getAttribute("toBeInstalled") != "true") && canWriteToLocation(selectedItem); case "cmd_reallyEnable": // controls whether to show Enable or Disable in extensions' context menu return selectedItem && selectedItem.disabled && !gExtensionManager.inSafeMode; case "cmd_enable": //controls wheter the Enable/Disable menuitem is enabled return selectedItem && selectedItem.disabled && !gExtensionManager.inSafeMode && selectedItem.getAttribute("toBeUninstalled") != "true" && selectedItem.getAttribute("compatible") != "false"; case "cmd_disable": return selectedItem && !selectedItem.disabled && selectedItem.getAttribute("toBeUninstalled") != "true" && selectedItem.getAttribute("toBeInstalled") != "true"; case "cmd_movetop": return selectedItem && (gExtensionsView.children[0] != selectedItem); case "cmd_moveup": return selectedItem && (gExtensionsView.children[0] != selectedItem); case "cmd_movedn": var children = gExtensionsView.children; return selectedItem && (children[children.length-1] != selectedItem);#ifndef MOZ_PHOENIX case "cmd_install": return true; #endif } return false; },
!gExtensionManager.inSafeMode &&
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" && gCurrentTheme != selectedItem.getAttribute("internalName"); case "cmd_options": return selectedItem && !selectedItem.disabled && selectedItem.getAttribute("toBeUninstalled") != "true" && selectedItem.getAttribute("optionsURL") != ""; case "cmd_about": return selectedItem && selectedItem.getAttribute("toBeInstalled") != "true" && (selectedItem.disabled ? selectedItem.getAttribute("aboutURL") == "" : true); case "cmd_homepage": return selectedItem && selectedItem.getAttribute("homepageURL") != ""; case "cmd_uninstall": if (gWindowState != "extensions") { // uninstall is only available if the selected item isn't the // default theme. return (selectedItem && selectedItem.getAttribute("internalName") != KEY_DEFAULT_THEME); } return selectedItem && selectedItem.getAttribute("toBeUninstalled") != "true" && selectedItem.getAttribute("toBeInstalled") != "true" && selectedItem.getAttribute("locked") != "true" && canWriteToLocation(selectedItem); case "cmd_update": return !selectedItem || (selectedItem && selectedItem.getAttribute("toBeUninstalled") != "true" && selectedItem.getAttribute("toBeInstalled") != "true") && canWriteToLocation(selectedItem); case "cmd_reallyEnable": // controls whether to show Enable or Disable in extensions' context menu return selectedItem && selectedItem.disabled && !gExtensionManager.inSafeMode; case "cmd_enable": //controls wheter the Enable/Disable menuitem is enabled return selectedItem && selectedItem.disabled && !gExtensionManager.inSafeMode && selectedItem.getAttribute("toBeUninstalled") != "true" && selectedItem.getAttribute("compatible") != "false"; case "cmd_disable": return selectedItem && !selectedItem.disabled && selectedItem.getAttribute("toBeUninstalled") != "true" && selectedItem.getAttribute("toBeInstalled") != "true"; case "cmd_movetop": return selectedItem && (gExtensionsView.children[0] != selectedItem); case "cmd_moveup": return selectedItem && (gExtensionsView.children[0] != selectedItem); case "cmd_movedn": var children = gExtensionsView.children; return selectedItem && (children[children.length-1] != selectedItem);#ifndef MOZ_PHOENIX case "cmd_install": return true; #endif } return false; },
return CheckOnline();
return MailOfflineMgr.isOnline();
isCommandEnabled: function(command) { switch ( command ) { case "cmd_createFilterFromPopup": case "cmd_createFilterFromMenu": var loadedFolder = GetLoadedMsgFolder(); if (!(loadedFolder && loadedFolder.server.canHaveFilters)) return false; case "cmd_delete": UpdateDeleteCommand(); // fall through case "button_delete": case "cmd_shiftDelete": var loadedFolder = GetLoadedMsgFolder(); return gCurrentMessageUri && loadedFolder && (loadedFolder.canDeleteMessages || isNewsURI(gCurrentFolderUri)); case "button_junk": UpdateJunkToolbarButton(); // fall through case "cmd_markAsJunk": case "cmd_markAsNotJunk": case "cmd_recalculateJunkScore": // can't do junk on news yet return (!isNewsURI(gCurrentFolderUri)); 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 "cmd_editAsNew": case "cmd_print": case "cmd_printpreview": case "button_print": case "cmd_saveAsFile": case "cmd_saveAsTemplate": case "cmd_viewPageSource": case "cmd_reload": case "cmd_find": case "cmd_tag": case "button_mark": case "cmd_markAsRead": case "cmd_markAllRead": case "cmd_markThreadAsRead": case "cmd_markReadByDate": return(true); case "cmd_markAsFlagged": case "button_file": case "cmd_file": return ( gCurrentMessageUri != null); case "cmd_printSetup": return true; case "cmd_getNewMessages": case "button_getNewMessages": case "cmd_getMsgsForAuthAccounts": return IsGetNewMessagesEnabled(); case "cmd_getNextNMessages": return IsGetNextNMessagesEnabled(); case "cmd_downloadFlagged": case "cmd_downloadSelected": case "cmd_synchronizeOffline": return CheckOnline(); case "cmd_settingsOffline": return IsAccountOfflineEnabled(); case "cmd_close": case "cmd_nextMsg": case "button_next": case "cmd_nextUnreadMsg": case "cmd_nextUnreadThread": case "button_previous": case "cmd_previousMsg": case "cmd_previousUnreadMsg": return true; case "cmd_findAgain": case "cmd_findPrevious": case "cmd_goForward": case "cmd_goBack": return true; 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); case "cmd_search": var loadedFolder = GetLoadedMsgFolder(); if (!loadedFolder) return false; return loadedFolder.server.canSearchMessages; case "cmd_undo": case "cmd_redo": return SetupUndoRedoCommand(command); case "cmd_moveToFolderAgain": return (pref.getCharPref("mail.last_msg_movecopy_target_uri")); case "cmd_applyFilters": case "cmd_runJunkControls": case "cmd_deleteJunk": return false; default: return false; } },
dump('ResultsPaneController::IsCommandEnabled(' + command + ')\n');
IsCommandEnabled: function(command) { switch ( command ) { case "cmd_selectAll": return true; case "cmd_delete": var resultsTree = document.getElementById('resultsTree'); var numSelected = 0; if ( resultsTree && resultsTree.selectedItems ) numSelected = resultsTree.selectedItems.length; if ( numSelected < 2 ) goSetMenuValue(command, 'valueCard'); else goSetMenuValue(command, 'valueCards'); return (numSelected > 0); default: return false; } },
case "cmd_label0": case "cmd_label1": case "cmd_label2": case "cmd_label3": case "cmd_label4": case "cmd_label5": 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": UpdateDeleteCommand(); // fall through case "button_delete": case "cmd_shiftDelete": var loadedFolder = GetLoadedMsgFolder(); return gCurrentMessageUri && loadedFolder && loadedFolder.canDeleteMessages; 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 "cmd_editAsNew": case "cmd_print": case "button_print": case "cmd_saveAsFile": case "cmd_saveAsTemplate": case "cmd_viewPageSource": case "cmd_reload": case "cmd_find": case "button_mark": case "cmd_markAsRead": case "cmd_markAllRead": case "cmd_markThreadAsRead": case "cmd_markAsFlagged": case "button_file": case "cmd_file": return ( gCurrentMessageUri != null); case "cmd_printSetup": return true; case "cmd_getNewMessages": case "button_getNewMessages": case "cmd_getMsgsForAuthAccounts": return IsGetNewMessagesEnabled(); case "cmd_getNextNMessages": return IsGetNextNMessagesEnabled(); case "cmd_downloadFlagged": case "cmd_downloadSelected": case "cmd_synchronizeOffline": return CheckOnline(); case "cmd_settingsOffline": return IsAccountOfflineEnabled(); case "cmd_close": case "cmd_nextMsg": case "button_next": case "cmd_nextUnreadMsg": case "cmd_nextUnreadThread": case "cmd_previousMsg": case "cmd_previousUnreadMsg": return true; case "cmd_findAgain": return MsgCanFindAgain(); case "cmd_search": var loadedFolder = GetLoadedMsgFolder(); if (!loadedFolder) return false; return loadedFolder.server.canSearchMessages; case "cmd_undo": case "cmd_redo": return SetupUndoRedoCommand(command); default: return false; } },
case "cmd_getMsgsForAuthAccounts":
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 "cmd_editAsNew": case "cmd_delete": case "button_delete": case "cmd_shiftDelete": case "cmd_print": case "cmd_saveAsFile": case "cmd_saveAsTemplate": case "cmd_viewPageSource": case "cmd_reload": case "cmd_find": case "cmd_findAgain": case "cmd_markAsRead": case "cmd_markAllRead": case "cmd_markThreadAsRead": case "cmd_markAsFlagged": case "cmd_file": if ( command == "cmd_delete") { if (isNewsURI(gCurrentMessageUri)) { goSetMenuValue(command, 'valueNewsMessage'); } else { goSetMenuValue(command, 'valueMessage'); } } return ( gCurrentMessageUri != null); case "cmd_getNewMessages": return IsGetNewMessagesEnabled(); case "cmd_getNextNMessages": return IsGetNextNMessagesEnabled(); default: return false; } },
return aTarget.localName == "menu" || (aTarget.localName == "toolbarbutton") && (aTarget.getAttribute("container") == "true" || aTarget.getAttribute("group") == "true");
return aTarget.localName == "menu" || aTarget.localName == "toolbarbutton" && aTarget.getAttribute("type") == "menu";
isContainer: function (aTarget) { return aTarget.localName == "menu" || (aTarget.localName == "toolbarbutton") && (aTarget.getAttribute("container") == "true" || aTarget.getAttribute("group") == "true"); }
folder = BookmarksUtils.getParentOfContainer(folder);
folder = BookmarksUtils.getParentOfResource(folder);
isContainerChildOrSelf: function (aContainer, aSelection) { var folder = aContainer; do { for (var i=0; i<aSelection.length; ++i) { if (aSelection.isContainer[i] && aSelection.item[i] == folder) return true; } folder = BookmarksUtils.getParentOfContainer(folder); if (!folder) return false; // sanity check } while (folder.Value != "NC:BookmarksRoot") return false; },
if (!aFocusedWindow) return false;
function isContentFrame(aFocusedWindow){ var focusedTop = Components.lookupMethod(aFocusedWindow, 'top') .call(aFocusedWindow); return (focusedTop == window.content);}
if (node.nodeType == node.TEXT_NODE && node.nodeValue.length == 0) {
if (rangeFragment.childNodes.length == 1 && node.nodeType == node.TEXT_NODE && node.nodeValue.length == 0) {
isContentSelection : function() { var focusedWindow = document.commandDispatcher.focusedWindow; var selection = focusedWindow.getSelection(); if (selection.rangeCount == 0) { return false; } var rangeFragment = selection.getRangeAt(0).cloneContents(); if (rangeFragment.childNodes.length == 0) { return false; } // The selection object may also report an empty text node if there is no selection. var node = rangeFragment.childNodes[0]; if (node.nodeType == node.TEXT_NODE && node.nodeValue.length == 0) { return false; } return true; },
dump("IsCurrentLoadedFolder: has msgFolder\n");
function IsCurrentLoadedFolder(folder){ msgfolder = folder.QueryInterface(Components.interfaces.nsIMsgFolder); if(msgfolder) { dump("IsCurrentLoadedFolder: has msgFolder\n"); var folderResource = msgfolder.QueryInterface(Components.interfaces.nsIRDFResource); if(folderResource) { dump("IsCurrentLoadedFolder: has folderResource\n"); var folderURI = folderResource.Value; var currentLoadedFolder = GetThreadTreeFolder(); var currentURI = currentLoadedFolder.getAttribute('ref'); dump("IsCurrentLoadedFolder: folderURI = " + folderURI + "\n"); dump("IsCurrentLoadedFolder: currentURI = " + currentURI + "\n"); return(currentURI == folderURI); } } return false;}
dump("IsCurrentLoadedFolder: has folderResource\n");
function IsCurrentLoadedFolder(folder){ msgfolder = folder.QueryInterface(Components.interfaces.nsIMsgFolder); if(msgfolder) { dump("IsCurrentLoadedFolder: has msgFolder\n"); var folderResource = msgfolder.QueryInterface(Components.interfaces.nsIRDFResource); if(folderResource) { dump("IsCurrentLoadedFolder: has folderResource\n"); var folderURI = folderResource.Value; var currentLoadedFolder = GetThreadTreeFolder(); var currentURI = currentLoadedFolder.getAttribute('ref'); dump("IsCurrentLoadedFolder: folderURI = " + folderURI + "\n"); dump("IsCurrentLoadedFolder: currentURI = " + currentURI + "\n"); return(currentURI == folderURI); } } return false;}
dump("IsCurrentLoadedFolder: folderURI = " + folderURI + "\n"); dump("IsCurrentLoadedFolder: currentURI = " + currentURI + "\n");
function IsCurrentLoadedFolder(folder){ msgfolder = folder.QueryInterface(Components.interfaces.nsIMsgFolder); if(msgfolder) { dump("IsCurrentLoadedFolder: has msgFolder\n"); var folderResource = msgfolder.QueryInterface(Components.interfaces.nsIRDFResource); if(folderResource) { dump("IsCurrentLoadedFolder: has folderResource\n"); var folderURI = folderResource.Value; var currentLoadedFolder = GetThreadTreeFolder(); var currentURI = currentLoadedFolder.getAttribute('ref'); dump("IsCurrentLoadedFolder: folderURI = " + folderURI + "\n"); dump("IsCurrentLoadedFolder: currentURI = " + currentURI + "\n"); return(currentURI == folderURI); } } return false;}
if (!this.exists()) { jslibError(null, "(file doesn't exist)", "NS_ERROR_FAILURE", JS_FILESYSTEM_FILE+":isDir"); return false; } return this.mFileInst.isDirectory();
var rv = false; try { rv = this.mFileInst.isDirectory(); } catch (e) { rv = false; } return rv;
isDir : function(){ if (!this.exists()) { jslibError(null, "(file doesn't exist)", "NS_ERROR_FAILURE", JS_FILESYSTEM_FILE+":isDir"); return false; } return this.mFileInst.isDirectory();},
var contentFrames = window.content.frames;
var contentFrames = window._content.frames;
function isDocumentFrame(aFocusedWindow){ var contentFrames = window.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, colID) {return false; },
isEditable: function(row, colID) {return false},
if (!this.exists()) { jslibError(null, "(file doesn't exist)", "NS_ERROR_FAILURE", JS_FILESYSTEM_FILE+":isDir"); return false; } return this.mFileInst.isExecutable();
var rv = false; try { rv = this.mFileInst.isExecutable(); } catch (e) { rv = false; } return rv;
isExec : function(){ if (!this.exists()) { jslibError(null, "(file doesn't exist)", "NS_ERROR_FAILURE", JS_FILESYSTEM_FILE+":isDir"); return false; } return this.mFileInst.isExecutable();},
if (!this.exists()) { jslibError(null, "(file doesn't exist)", "NS_ERROR_FAILURE", JS_FILESYSTEM_FILE+":isDir"); return false; } return this.mFileInst.isFile();
var rv = false; try { rv = this.mFileInst.isFile(); } catch (e) { rv = false; } return rv;
isFile : function(){ if (!this.exists()) { jslibError(null, "(file doesn't exist)", "NS_ERROR_FAILURE", JS_FILESYSTEM_FILE+":isDir"); return false; } return this.mFileInst.isFile();},
var findClass = Components.classes["component:
var findClass = Components.classes["@mozilla.org/appshell/component/find;1"];
function IsFindInstalled(){ if (gSoughtFind) return gHaveFind; var findClass = Components.classes["component://netscape/appshell/component/find"]; gHaveFind = (findClass != null); gSoughtFind = true; dump("Have Find = "+gHaveFind+"\n"); return gHaveFind;}
function isHTMLElement(ele)
DWRUtil.isHTMLElement = function(ele)
function isHTMLElement(ele){ // There must be a better way if (is_gecko) { return typeof ele == "object" && ele instanceof HTMLElement; } else { // assume it is an html element if has an outerhtml property return typeof ele == "object" && ele.nodeName != null; }}
if (is_gecko)
if (DWRUtil.isGecko)
function isHTMLElement(ele){ // There must be a better way if (is_gecko) { return typeof ele == "object" && ele instanceof HTMLElement; } else { // assume it is an html element if has an outerhtml property return typeof ele == "object" && ele.nodeName != null; }}
return typeof ele == "object" && ele.nodeName != null;
return typeof ele == "object" && ele.nodeName;
function isHTMLElement(ele){ // There must be a better way if (is_gecko) { return typeof ele == "object" && ele instanceof HTMLElement; } else { // assume it is an html element if has an outerhtml property return typeof ele == "object" && ele.nodeName != null; }}
function isHTMLInputElement(ele)
DWRUtil.isHTMLInputElement = function(ele)
function isHTMLInputElement(ele){ // There must be a better way if (is_gecko) { return typeof ele == "object" && ele instanceof HTMLInputElement; } else { return typeof ele == "object" && ele.nodeName.toLowerCase() == "input"; }}
if (is_gecko)
if (DWRUtil.isGecko)
function isHTMLInputElement(ele){ // There must be a better way if (is_gecko) { return typeof ele == "object" && ele instanceof HTMLInputElement; } else { return typeof ele == "object" && ele.nodeName.toLowerCase() == "input"; }}
return typeof ele == "object" && ele.nodeName.toLowerCase() == "input";
return typeof ele == "object" && ele.nodeName && ele.nodeName.toLowerCase() == "input";
function isHTMLInputElement(ele){ // There must be a better way if (is_gecko) { return typeof ele == "object" && ele instanceof HTMLInputElement; } else { return typeof ele == "object" && ele.nodeName.toLowerCase() == "input"; }}
function isHTMLSelectElement(ele)
DWRUtil.isHTMLSelectElement = function(ele)
function isHTMLSelectElement(ele){ // There must be a better way if (is_gecko) { return typeof ele == "object" && ele instanceof HTMLSelectElement; } else { return typeof ele == "object" && ele.nodeName.toLowerCase() == "select"; }}
if (is_gecko)
if (DWRUtil.isGecko)
function isHTMLSelectElement(ele){ // There must be a better way if (is_gecko) { return typeof ele == "object" && ele instanceof HTMLSelectElement; } else { return typeof ele == "object" && ele.nodeName.toLowerCase() == "select"; }}
return typeof ele == "object" && ele.nodeName.toLowerCase() == "select";
return typeof ele == "object" && ele.nodeName && ele.nodeName.toLowerCase() == "select";
function isHTMLSelectElement(ele){ // There must be a better way if (is_gecko) { return typeof ele == "object" && ele instanceof HTMLSelectElement; } else { return typeof ele == "object" && ele.nodeName.toLowerCase() == "select"; }}
return typeof ele == "object" && ele.options;
return typeof ele == "object" && ele.nodeName.toLowerCase() == "select";
function isHTMLSelectElement(ele){ // There must be a better way if (is_gecko) { return typeof ele == "object" && ele instanceof HTMLSelectElement; } else { // assume it is an input element if it has options return typeof ele == "object" && ele.options; }}
function isHTMLTextAreaElement(ele)
DWRUtil.isHTMLTextAreaElement = function(ele)
function isHTMLTextAreaElement(ele){ // There must be a better way if (is_gecko) { return typeof ele == "object" && ele instanceof HTMLTextAreaElement; } else { return typeof ele == "object" && ele.nodeName.toLowerCase() == "textarea"; }}
if (is_gecko)
if (DWRUtil.isGecko)
function isHTMLTextAreaElement(ele){ // There must be a better way if (is_gecko) { return typeof ele == "object" && ele instanceof HTMLTextAreaElement; } else { return typeof ele == "object" && ele.nodeName.toLowerCase() == "textarea"; }}
return typeof ele == "object" && ele.nodeName.toLowerCase() == "textarea";
return typeof ele == "object" && ele.nodeName && ele.nodeName.toLowerCase() == "textarea";
function isHTMLTextAreaElement(ele){ // There must be a better way if (is_gecko) { return typeof ele == "object" && ele instanceof HTMLTextAreaElement; } else { return typeof ele == "object" && ele.nodeName.toLowerCase() == "textarea"; }}
return permissionmanager.testPermission(uri, "image");
return permissionmanager.testPermission(uri, "image") == nsIPermissionManager.DENY_ACTION;
isImageBlocked : function() { 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); uri.spec = this.imageURL; return permissionmanager.testPermission(uri, "image"); },
var startTime = getDateTimeFieldValue( "start-date-text" );
var startTime = document.getElementById( "start-date-picker" ).value;
function isLastDayOfWeekOfMonth(){ //get the day number for today. var startTime = getDateTimeFieldValue( "start-date-text" ); 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 = startTime.getMonth(); weekNumber++; } if( weekNumber > 3 ) { var nextWeek = new Date( oldStartTime.getTime() + ( 1000 * 60 * 60 * 24 * 7 ) ); if( nextWeek.getMonth() != thisMonth ) { //its the last week of the month return( true ); } } return( false );}
var startTime = document.getElementById( "start-date-picker" ).value;
var startTime = document.getElementById( "start-datetime" ).value;
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 ) { startTime = new Date( startTime.getTime() - ( 1000 * 60 * 60 * 24 * 7 ) ); monthToCompare = startTime.getMonth(); weekNumber++; } if( weekNumber > 3 ) { var nextWeek = new Date( oldStartTime.getTime() + ( 1000 * 60 * 60 * 24 * 7 ) ); if( nextWeek.getMonth() != thisMonth ) { //its the last week of the month return( true ); } } return( false );}
var wrapper = new XPCNativeWrapper(link, "href", "getAttributeNS()");
var wrapper = link;
isLinkType : function ( linktype, link ) { try { // Test for missing protocol property. if ( !link.protocol ) { // We must resort to testing the URL string :-(. var protocol; var wrapper = new XPCNativeWrapper(link, "href", "getAttributeNS()"); if (wrapper.href) { protocol = wrapper.href.substr(0, linktype.length); } else { protocol = wrapper.getAttributeNS("http://www.w3.org/1999/xlink","href"); if (protocol) { protocol = protocol.substr(0, linktype.length); } } return protocol.toLowerCase() === linktype; } else { // Presume all but javascript: urls are saveable. return link.protocol.toLowerCase() === linktype; } } catch (e) { // something was wrong with the link, // so we won't be able to save it anyway return false; } },
if (!messageUri) return false; return (messageUri.substring(0,14) == "news-message:/")
if (!messageUri) return false; else return (messageUri.substring(0,14) == "news-message:/");
function IsNewsMessage(messageUri){ if (!messageUri) return false; return (messageUri.substring(0,14) == "news-message:/")}
var hrefURL = Components.classes["@mozilla.org/network/standard-url;1"]. createInstance(Components.interfaces.nsIURI); hrefURL.spec = href;
var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService); hrefURL = ioService.newURI(href, null, null);
function isPhishingURL(aLinkNode, aSilentMode){ if (!gPrefBranch.getBoolPref("mail.phishing.detection.enabled")) return false; var phishingType = kPhishingNotSuspicious; var href = aLinkNode.href; var linkTextURL = {}; var hrefURL = Components.classes["@mozilla.org/network/standard-url;1"]. createInstance(Components.interfaces.nsIURI); hrefURL.spec = href; // (1) if the host name is an IP address then block the url... // TODO: add support for IPv6 var ipv4HostRegExp = new RegExp(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/); // IPv4 if (ipv4HostRegExp.test(hrefURL.host)) phishingType = kPhishingWithIPAddress; else if (misMatchedHostWithLinkText(aLinkNode, hrefURL, linkTextURL)) phishingType = kPhishingWithMismatchedHosts; var isPhishingURL = phishingType != kPhishingNotSuspicious; if (!aSilentMode) // allow the user to over ride the decision isPhishingURL = confirmSuspiciousURL(phishingType, hrefURL, linkTextURL.value); return isPhishingURL;}
if (!aSilentMode) isPhishingURL = confirmSuspiciousURL(phishingType, hrefURL, linkTextURL.value);
if (!aSilentMode && isPhishingURL) isPhishingURL = confirmSuspiciousURL(phishingType, hrefURL);
function isPhishingURL(aLinkNode, aSilentMode){ if (!gPrefBranch.getBoolPref("mail.phishing.detection.enabled")) return false; var phishingType = kPhishingNotSuspicious; var href = aLinkNode.href; var linkTextURL = {}; var hrefURL = Components.classes["@mozilla.org/network/standard-url;1"]. createInstance(Components.interfaces.nsIURI); hrefURL.spec = href; // (1) if the host name is an IP address then block the url... // TODO: add support for IPv6 var ipv4HostRegExp = new RegExp(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/); // IPv4 if (ipv4HostRegExp.test(hrefURL.host)) phishingType = kPhishingWithIPAddress; else if (misMatchedHostWithLinkText(aLinkNode, hrefURL, linkTextURL)) phishingType = kPhishingWithMismatchedHosts; var isPhishingURL = phishingType != kPhishingNotSuspicious; if (!aSilentMode) // allow the user to over ride the decision isPhishingURL = confirmSuspiciousURL(phishingType, hrefURL, linkTextURL.value); return isPhishingURL;}
isPreferred: function(contentType, command, desiredContentType)
isPreferred: function(contentType, desiredContentType)
isPreferred: function(contentType, command, desiredContentType) { // seems like we should be getting this from helper apps or something switch(contentType) { case "text/html": case "text/xul": case "text/rdf": case "text/xml": case "text/css": case "image/gif": case "image/jpeg": case "image/png": case "image/tiff": case "text/plain": case "application/http-index-format": return true; } return false; },
var catMgr = Components.classes["@mozilla.org/categorymanager;1"] .getService(Components.interfaces.nsICategoryManager); var entry = catMgr.getCategoryEntry("Gecko-Content-Viewers", contentType); if (entry) { return true; } return false;
var webNavInfo = Components.classes["@mozilla.org/webnavigation-info;1"] .getService(Components.interfaces.nsIWebNavigationInfo); return webNavInfo.isTypeSupported(contentType, null);
isPreferred: function(contentType, desiredContentType) { try { var catMgr = Components.classes["@mozilla.org/categorymanager;1"] .getService(Components.interfaces.nsICategoryManager); var entry = catMgr.getCategoryEntry("Gecko-Content-Viewers", contentType); if (entry) { return true; } return false; } catch (e) { // XXX propagate failures other than "NS_ERROR_NOT_AVAILABLE"? // This seems to never get called, so not like it matters.... return false; } },
case "image/tiff":
isPreferred: function(contentType, desiredContentType) { // seems like we should be getting this from helper apps or something switch(contentType) { case "text/html": case "text/xul": case "text/rdf": case "text/xml": case "text/css": case "image/gif": case "image/jpeg": case "image/png": case "image/tiff": case "text/plain": case "application/http-index-format": return true; } return false; },
var folderTree = GetFolderTree();
function IsPropertiesEnabled(command){ try { var folderTree = GetFolderTree(); var folderResource = GetSelectedFolderResource(); // when servers are selected // it should be "Edit | Properties..." if (GetFolderAttribute(folderTree, folderResource, "IsServer") == "true") goSetMenuValue(command, "valueGeneric"); else goSetMenuValue(command, isNewsURI(folderResource.Value) ? "valueNewsgroup" : "valueFolder"); } catch (ex) { // properties menu failure } // properties should be enabled for folders and servers // but not fake accounts if (IsFakeAccount()) return false; var folderTree = GetFolderTree(); var selection = folderTree.treeBoxObject.selection; return (selection.count == 1);}
var prefs = nsJSComponentManager.getService("component:
var prefs = nsJSComponentManager.getService("@mozilla.org/preferences;1",
function isPToolbarDNDEnabled() { var prefs = nsJSComponentManager.getService("component://netscape/preferences", "nsIPref"); var dragAndDropEnabled = false; try { dragAndDropEnabled = prefs.GetBoolPref("browser.enable.tb_dnd"); } catch(e) { } return dragAndDropEnabled; }
if (tags[1].length < 2 || tags[1].length > 3) return false;
if (tags[1].length < 2 || tags[1].length > 8) return false;
function IsRFC1766LangTag(candidate) { /* reject bogus lang strings, INCLUDING those with HTTP "q" values kludged on the end of them Valid language codes examples: i.e. ja-JP-kansai (Kansai dialect of Japanese) en-US-texas (Texas dialect) i-klingon-tng (did TOS Klingons speak in non-English?) sgn-US-MA (Martha Vineyard's Sign Language) */ var tags = candidate.split('-'); /* if not IANA "i" or a private "x" extension, the primary tag should be a ISO 639 country code, two or three letters long. we don't check if the country code is bogus or not. */ var checkedTags = 0; if (tags[0].toLowerCase() != "x" && tags[0].toLowerCase() != "i") { if (tags[0].length != 2 && tags[0].length != 3) return false; if (!isAlpha(tags[0])) return false; checkedTags++; /* the first subtag can be either a 2 letter ISO 3166 country code, or an IANA registered tag from 3 to 8 characters. */ if (tags.length > 1) { if (tags[1].length < 2 || tags[1].length > 3) return false; if (!isAlphaNum(tags[1])) return false; /* do not allow user-assigned ISO 3166 country codes */ if (tags[1].length == 2 && isAlpha(tags[1])) { var countryCode = tags[1].toUpperCase(); if (countryCode == "AA" || countryCode == "ZZ") return false; if (countryCode[0] == 'X') return false; if (countryCode[0] == 'Q' && countryCode[1] > 'L') return false; } checkedTags++; } } else if (tags.length < 2) return false; else { if ((tags[1].length < 1) || (tags[1].length > 8)) return false; if (!isAlphaNum(tags[1])) return false; checkedTags++; } /* any remaining subtags must be one to eight alphabetic characters */ for (var i = checkedTags; i < tags.length; i++) { if ((tags[1].length < 1) || (tags[i].length > 8)) return false; if (!isAlphaNum(tags[i])) return false; checkedTags++; } return true;}
var isValid = new Array(aSelection.length); for (i=0; i<aSelection.length; ++i) { if (!aSelection.isValid[i] || aSelection.isImmutable[i] || !aSelection.parent [i]) isValid[i] = false; else isValid[i] = true; } return isValid;
return !aSelection.containsImmutable;
isSelectionValidForDeletion: function (aSelection) { var isValid = new Array(aSelection.length); for (i=0; i<aSelection.length; ++i) { if (!aSelection.isValid[i] || aSelection.isImmutable[i] || !aSelection.parent [i]) isValid[i] = false; else isValid[i] = true; } return isValid; },
isSelectionValidForInsertion: function (aSelection, aTarget, aAction)
isSelectionValidForInsertion: function (aSelection, aTarget)
isSelectionValidForInsertion: function (aSelection, aTarget, aAction) { if (!BookmarksUtils.isValidTargetContainer(aTarget.parent, aSelection)) { var isValid = new Array(aSelection.length); for (var i=0; i<aSelection.length; ++i) isValid[i] = false; return isValid; } return aSelection.isValid; },
if (!BookmarksUtils.isValidTargetContainer(aTarget.parent, aSelection)) { var isValid = new Array(aSelection.length); for (var i=0; i<aSelection.length; ++i) isValid[i] = false; return isValid; } return aSelection.isValid;
return BookmarksUtils.isValidTargetContainer(aTarget.parent, aSelection)
isSelectionValidForInsertion: function (aSelection, aTarget, aAction) { if (!BookmarksUtils.isValidTargetContainer(aTarget.parent, aSelection)) { var isValid = new Array(aSelection.length); for (var i=0; i<aSelection.length; ++i) isValid[i] = false; return isValid; } return aSelection.isValid; },
isSeparator: function(index) {return false}
isSeparator: function(index) {return false; }
isSeparator: function(index) {return false}
if ( !ret && console ) console.log( msg, a, b ); Test.push( [ ret, msg ] );
if ( !ret ) Test.push( [ ret, msg + " expected: " + b + " result: " + a ] ); else Test.push( [ ret, msg ] );
function isSet(a, b, msg) { var ret = true; if ( a && b && a.length == b.length ) { for ( var i in a ) if ( a[i] != b[i] ) ret = false; } else ret = false; if ( !ret && console ) console.log( msg, a, b ); Test.push( [ ret, msg ] );}
isSorted : function() { },
isSorted : function() { return true; },
isSorted : function() { },
var folderTree = GetFolderTree(); var db = folderTree.database;
var db = GetFolderDatasource();
function IsSpecialFolder(msgFolder, specialFolderName){ var folderTree = GetFolderTree(); var db = folderTree.database; var folderResource = msgFolder.QueryInterface(Components.interfaces.nsIRDFResource); if(folderResource) { var property = RDF.GetResource('http://home.netscape.com/NC-rdf#SpecialFolder'); if (!property) return false; var result = db.GetTarget(folderResource, property , true); if (!result) return false; result = result.QueryInterface(Components.interfaces.nsIRDFLiteral); if (!result) return false; dump("We are looking for " + specialFolderName + "\n"); dump("special folder name = " + result.Value + "\n"); if(result.Value == specialFolderName) return true; } return false;}
var spellcheckerClass = Components.classes["mozilla.spellchecker.1"];
var spellcheckerClass = Components.classes["@mozilla.org/spellchecker;1"];
function IsSpellCheckerInstalled(){ if (gSoughtSpellChecker) return gHaveSpellChecker; var spellcheckerClass = Components.classes["mozilla.spellchecker.1"]; gHaveSpellChecker = (spellcheckerClass != null); gSoughtSpellChecker = true; dump("Have SpellChecker = "+gHaveSpellChecker+"\n"); return gHaveSpellChecker;}
try { if (!folder) folder = server.rootMsgFolder.getChildNamed(this.feed.name); } catch(e) {}
isStored: function() { // Checks to see if the item has already been stored in its feed's message folder. debug(this.identity + " checking to see if stored"); var server = this.feed.server; var folder = this.feed.folder; try { if (!folder) folder = server.rootMsgFolder.getChildNamed(this.feed.name); } catch(e) {} if (!folder) { debug(this.feed.name + " folder doesn't exist; creating"); debug("creating " + this.feed.name + "as child of " + server.rootMsgFolder + "\n"); server.rootMsgFolder.createSubfolder(this.feed.name, null /* supposed to be a msg window */); folder = server.rootMsgFolder.FindSubFolder(this.feed.name); debug(this.identity + " not stored (folder didn't exist)"); return false; } var ds = getItemsDS(server); var itemURI = this.mURL || ("urn:" + this.id); var itemResource = rdf.GetResource(itemURI); var downloaded = ds.GetTarget(itemResource, FZ_STORED, true); if (!downloaded || downloaded.QueryInterface(Components.interfaces.nsIRDFLiteral).Value == "false") { // HACK ALERT: before we give up, try to work around an entity escaping bug in RDF // See Bug #258465 for more details itemURI = itemURI.replace(/&lt;/g, '<'); itemURI = itemURI.replace(/&gt;/g, '>'); itemURI = itemURI.replace(/&amp;/g, '&'); itemURI = itemURI.replace(/&quot;/g, '"'); debug('Failed to find item, trying entity replacement version: ' + itemURI); itemResource = rdf.GetResource(itemURI); downloaded = ds.GetTarget(itemResource, FZ_STORED, true); if (downloaded) { debug(this.identity + " not stored"); return true; } debug(this.identity + " not stored"); return false; } else { debug(this.identity + " stored"); return true; } },
if (!this.exists()) { jslibError(null, "(file doesn't exist)", "NS_ERROR_FAILURE", JS_FILESYSTEM_FILE+":isDir"); return false; } return this.mFileInst.isSymlink();
var rv = false; try { rv = this.mFileInst.isSymlink(); } catch (e) { rv = false; } return rv;
isSymlink : function(){ if (!this.exists()) { jslibError(null, "(file doesn't exist)", "NS_ERROR_FAILURE", JS_FILESYSTEM_FILE+":isDir"); return false; } return this.mFileInst.isSymlink();},
(attrib != "FILE") &&
isTargetATextBox : function ( node ) { if (node.nodeType != Node.ELEMENT_NODE) return false; if (node.localName.toUpperCase() == "INPUT") { var attrib = ""; var type = node.getAttribute("type"); if (type) attrib = type.toUpperCase(); return( (attrib != "IMAGE") && (attrib != "CHECKBOX") && (attrib != "RADIO") && (attrib != "SUBMIT") && (attrib != "RESET") && (attrib != "FILE") && (attrib != "HIDDEN") && (attrib != "RESET") && (attrib != "BUTTON") ); } else { return(node.localName.toUpperCase() == "TEXTAREA"); } },
var bundle = document.getElementById("contentAreaBundle"); searchSelectText = bundle.getFormattedString("searchText", [searchSelectText]);
searchSelectText = gNavigatorBundle.getFormattedString("searchText", [searchSelectText]);
isTextSelection : function() { var result = false; var selection = this.searchSelected(); var searchSelectText; if (selection != "") { searchSelectText = selection.toString(); if (searchSelectText.length > 15) searchSelectText = searchSelectText.substr(0,15) + "..."; result = true; // format "Search for <selection>" string to show in menu var bundle = document.getElementById("contentAreaBundle"); searchSelectText = bundle.getFormattedString("searchText", [searchSelectText]); this.setItemAttr("context-searchselect", "label", searchSelectText); } return result; },
dd ("** Bogus id '" + id + "' passed to isVisible() **");
dd ("** Bogus id ``" + id + "'' passed to isVisible() **");
function isVisible (id){ var e = document.getElementById(id); if (!e) { dd ("** Bogus id '" + id + "' passed to isVisible() **"); return false; } return (e.getAttribute ("collapsed") != "true");}
href.search (/navigator.xul($|\?)/) == -1));
href.search (/(navigator|browser).xul($|\?)/) == -1));
function isWindowFiltered (window){ var href = window.location.href; var rv = ((href.search (/^chrome:\/\/venkman\//) != -1 && href.search (/test/) == -1) || (console.prefs["enableChromeFilter"] && href.search (/navigator.xul($|\?)/) == -1)); //dd ("isWindowFiltered " + window.location.href + ", returning " + rv); return rv;}
var enabled = gJVMMgr.JavaEnabled();
function javaItemEnabling(){ var enabled = gJVMMgr.JavaEnabled(); var element = document.getElementById("java"); if (enabled) element.removeAttribute("disabled"); else element.setAttribute("disabled", "true");}
if (enabled)
if (navigator.javaEnabled())
function javaItemEnabling(){ var enabled = gJVMMgr.JavaEnabled(); var element = document.getElementById("java"); if (enabled) element.removeAttribute("disabled"); else element.setAttribute("disabled", "true");}
function javascriptEnabledChange(aEnable){ var label = document.getElementById("allowScripts");
function javascriptEnabledChange() { var isEnabled = document.getElementById("enableJavaScript").checked;
function javascriptEnabledChange(aEnable){ var label = document.getElementById("allowScripts"); var advancedButton = document.getElementById("advancedJavascript"); advancedButton.disabled = aEnable;}
advancedButton.disabled = aEnable;
advancedButton.disabled = !isEnabled;
function javascriptEnabledChange(aEnable){ var label = document.getElementById("allowScripts"); var advancedButton = document.getElementById("advancedJavascript"); advancedButton.disabled = aEnable;}
if ( c && c.jquery ) return jQuery(c.get()).find(a);
if ( c && c.jquery ) return c.find(a);
function jQuery(a,c) { // Initalize the extra macro functions if ( !jQuery.initDone ) jQuery.init(); // Shortcut for document ready (because $(document).each() is silly) if ( a && a.constructor == Function && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure t hat a selection was provided a = a || jQuery.context || document; /* * Handle support for overriding other $() functions. Way too many libraries * provide this function to simply ignore it and overwrite it. */ /* // Check to see if this is a possible collision case if ( jQuery._$ && !c && a.constructor == String && // Make sure that the expression is a colliding one !/[^a-zA-Z0-9_-]/.test(a) && // and that there are no elements that match it // (this is the one truly ambiguous case) !document.getElementsByTagName(a).length ) // Use the default method, in case it works some voodoo return jQuery._$( a ); */ // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return a; // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery(c.get()).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); // Watch for when an array is passed in this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); var fn = arguments[ arguments.length - 1 ]; if ( fn && fn.constructor == Function ) this.each(fn);}
function jQuery(a,c) {
jQuery = function(a,c) {
function jQuery(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && a.constructor == Function && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure that a selection was provided a = a || jQuery.context || document; // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return jQuery( jQuery.merge( a, [] ) ); // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery( c ).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); // Watch for when an array is passed in this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); // See if an extra function was provided var fn = arguments[ arguments.length - 1 ]; // If so, execute it in context if ( fn && fn.constructor == Function ) this.each(fn);}
}
};
function jQuery(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && a.constructor == Function && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure that a selection was provided a = a || jQuery.context || document; // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return jQuery( jQuery.merge( a, [] ) ); // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery( c ).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); // Watch for when an array is passed in this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); // See if an extra function was provided var fn = arguments[ arguments.length - 1 ]; // If so, execute it in context if ( fn && fn.constructor == Function ) this.each(fn);}
if ( !jQuery.initDone ) jQuery.init();
function jQuery(a,c) { // Initalize the extra macro functions if ( !jQuery.initDone ) jQuery.init(); // Shortcut for document ready (because $(document).each() is silly) if ( a && a.constructor == Function && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure that a selection was provided a = a || jQuery.context || document; /* * Handle support for overriding other $() functions. Way too many libraries * provide this function to simply ignore it and overwrite it. */ /* // Check to see if this is a possible collision case if ( jQuery._$ && !c && a.constructor == String && // Make sure that the expression is a colliding one !/[^a-zA-Z0-9_-]/.test(a) && // and that there are no elements that match it // (this is the one truly ambiguous case) !document.getElementsByTagName(a).length ) // Use the default method, in case it works some voodoo return jQuery._$( a ); */ // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return $( jQuery.merge( a, [] ) ); // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return $( c ).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); // Watch for when an array is passed in this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); var fn = arguments[ arguments.length - 1 ]; if ( fn && fn.constructor == Function ) this.each(fn);}
this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ?
this.get( a.constructor == Array || a.length && a != window && !a.nodeType && a[0] != undefined && a[0].nodeType ?
var jQuery = function(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && typeof a == "function" && jQuery.fn.ready && !a.nodeType && a[0] == undefined ) // Safari reports typeof on DOM NodeLists as a function return jQuery(document).ready(a); // Make sure that a selection was provided a = a || jQuery.context || document; // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return jQuery( jQuery.merge( a, [] ) ); // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery( c ).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings if ( a.constructor == String ) { var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); } // Watch for when an array is passed in this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); // See if an extra function was provided var fn = arguments[ arguments.length - 1 ]; // If so, execute it in context if ( fn && typeof fn == "function" ) this.each(fn); return this;};
this.get( a.constructor == Array || a.length && a[0] != undefined && a[0].nodeType ?
this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ?
function jQuery(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && a.constructor == Function && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure t hat a selection was provided a = a || jQuery.context || document; /* * Handle support for overriding other $() functions. Way too many libraries * provide this function to simply ignore it and overwrite it. */ /* // Check to see if this is a possible collision case if ( jQuery._$ && !c && a.constructor == String && // Make sure that the expression is a colliding one !/[^a-zA-Z0-9_-]/.test(a) && // and that there are no elements that match it // (this is the one truly ambiguous case) !document.getElementsByTagName(a).length ) // Use the default method, in case it works some voodoo return jQuery._$( a ); */ // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return a; // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery(c.get()).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); // Watch for when an array is passed in this.get( a.constructor == Array || a.length && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); var fn = arguments[ arguments.length - 1 ]; if ( fn && fn.constructor == Function ) this.each(fn);}
this.get( a.constructor == Array || a.length && a[0].nodeType ?
this.get( a.constructor == Array || a.length && a[0] != undefined && a[0].nodeType ?
function jQuery(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && a.constructor == Function && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure t hat a selection was provided a = a || jQuery.context || document; /* * Handle support for overriding other $() functions. Way too many libraries * provide this function to simply ignore it and overwrite it. */ /* // Check to see if this is a possible collision case if ( jQuery._$ && !c && a.constructor == String && // Make sure that the expression is a colliding one !/[^a-zA-Z0-9_-]/.test(a) && // and that there are no elements that match it // (this is the one truly ambiguous case) !document.getElementsByTagName(a).length ) // Use the default method, in case it works some voodoo return jQuery._$( a ); */ // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return a; // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery(c.get()).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); // Watch for when an array is passed in this.get( a.constructor == Array || a.length && a[0].nodeType ? // Assume that it's an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); var fn = arguments[ arguments.length - 1 ]; if ( fn && fn.constructor == Function ) this.each(fn);}
if ( a && a.constructor == Function && jQuery.fn.ready )
if ( a && typeof a == "function" && jQuery.fn.ready )
jQuery = function(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && a.constructor == Function && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure that a selection was provided a = a || jQuery.context || document; // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return jQuery( jQuery.merge( a, [] ) ); // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery( c ).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); // Watch for when an array is passed in this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); // See if an extra function was provided var fn = arguments[ arguments.length - 1 ]; // If so, execute it in context if ( fn && fn.constructor == Function ) this.each(fn);};
if ( fn && fn.constructor == Function )
if ( fn && typeof fn == "function" )
jQuery = function(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && a.constructor == Function && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure that a selection was provided a = a || jQuery.context || document; // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return jQuery( jQuery.merge( a, [] ) ); // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery( c ).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); // Watch for when an array is passed in this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); // See if an extra function was provided var fn = arguments[ arguments.length - 1 ]; // If so, execute it in context if ( fn && fn.constructor == Function ) this.each(fn);};
var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] );
if (typeof a == "string") { var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); }
jQuery = function(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && typeof a == "function" && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure that a selection was provided a = a || jQuery.context || document; // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return jQuery( jQuery.merge( a, [] ) ); // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery( c ).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); // Watch for when an array is passed in this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); // See if an extra function was provided var fn = arguments[ arguments.length - 1 ]; // If so, execute it in context if ( fn && typeof fn == "function" ) this.each(fn);};
if ( a && typeof a == "function" && jQuery.fn.ready )
if ( a && typeof a == "function" && jQuery.fn.ready && !a.nodeType && a[0] == undefined )
var jQuery = function(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && typeof a == "function" && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure that a selection was provided a = a || jQuery.context || document; // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return jQuery( jQuery.merge( a, [] ) ); // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery( c ).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings if ( a.constructor == String ) { var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); } // Watch for when an array is passed in this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); // See if an extra function was provided var fn = arguments[ arguments.length - 1 ]; // If so, execute it in context if ( fn && typeof fn == "function" ) this.each(fn); return this;};
if ( a && typeof a == "function" && jQuery.fn.ready )
if ( a && typeof a == "function" && jQuery.fn.ready && a.length == undefined )
var jQuery = function(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && typeof a == "function" && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure that a selection was provided a = a || jQuery.context || document; // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return jQuery( jQuery.merge( a, [] ) ); // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery( c ).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings if ( a.constructor == String ) { var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); } // Watch for when an array is passed in this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); // See if an extra function was provided var fn = arguments[ arguments.length - 1 ]; // If so, execute it in context if ( fn && typeof fn == "function" ) this.each(fn); return this;};
if ( a && a.constructor == Function ) return $(document).ready(a);
if ( a && a.constructor == Function && jQuery.fn.ready ) return jQuery(document).ready(a);
function jQuery(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && a.constructor == Function ) return $(document).ready(a); // Make sure t hat a selection was provided a = a || jQuery.context || document; /* * Handle support for overriding other $() functions. Way too many libraries * provide this function to simply ignore it and overwrite it. */ // Check to see if this is a possible collision case if ( jQuery._$ && !c && a.constructor == String && // Make sure that the expression is a colliding one !/[^a-zA-Z0-9_-]/.test(a) && // and that there are no elements that match it // (this is the one truly ambiguous case) !document.getElementsByTagName(a).length ) // Use the default method, in case it works some voodoo return jQuery._$( a ); // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return a; // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return $(c.get()).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Watch for when an array is passed in this.get( a.constructor == Array ? // Assume that it's an array of DOM Elements a : // Find the matching elements and save them for later jQuery.find( a, c ) ); var fn = arguments[ arguments.length - 1 ]; if ( fn && fn.constructor == Function ) this.each(fn);}
return $(c.get()).find(a);
return jQuery(c.get()).find(a);
function jQuery(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && a.constructor == Function ) return $(document).ready(a); // Make sure t hat a selection was provided a = a || jQuery.context || document; /* * Handle support for overriding other $() functions. Way too many libraries * provide this function to simply ignore it and overwrite it. */ // Check to see if this is a possible collision case if ( jQuery._$ && !c && a.constructor == String && // Make sure that the expression is a colliding one !/[^a-zA-Z0-9_-]/.test(a) && // and that there are no elements that match it // (this is the one truly ambiguous case) !document.getElementsByTagName(a).length ) // Use the default method, in case it works some voodoo return jQuery._$( a ); // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return a; // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return $(c.get()).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Watch for when an array is passed in this.get( a.constructor == Array ? // Assume that it's an array of DOM Elements a : // Find the matching elements and save them for later jQuery.find( a, c ) ); var fn = arguments[ arguments.length - 1 ]; if ( fn && fn.constructor == Function ) this.each(fn);}
a = a || jQuery.context || document;
a = a || document;
var jQuery = function(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && typeof a == "function" && jQuery.fn.ready && !a.nodeType && a[0] == undefined ) // Safari reports typeof on DOM NodeLists as a function return jQuery(document).ready(a); // Make sure that a selection was provided a = a || jQuery.context || document; // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return jQuery( jQuery.merge( a, [] ) ); // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery( c ).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings if ( typeof a == "string" ) { var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); } // Watch for when an array is passed in this.get( a.constructor == Array || a.length && a != window && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); // See if an extra function was provided var fn = arguments[ arguments.length - 1 ]; // If so, execute it in context if ( fn && typeof fn == "function" ) this.each(fn); return this;};
this.get( a.constructor == Array || a.length && a != window && !a.nodeType && a[0] != undefined && a[0].nodeType ?
this.set( a.constructor == Array || a.length && a != window && !a.nodeType && a[0] != undefined && a[0].nodeType ?
var jQuery = function(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && typeof a == "function" && jQuery.fn.ready && !a.nodeType && a[0] == undefined ) // Safari reports typeof on DOM NodeLists as a function return jQuery(document).ready(a); // Make sure that a selection was provided a = a || jQuery.context || document; // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return jQuery( jQuery.merge( a, [] ) ); // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery( c ).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings if ( typeof a == "string" ) { var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); } // Watch for when an array is passed in this.get( a.constructor == Array || a.length && a != window && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); // See if an extra function was provided var fn = arguments[ arguments.length - 1 ]; // If so, execute it in context if ( fn && typeof fn == "function" ) this.each(fn); return this;};
var fn = arguments[ arguments.length - 1 ]; if ( fn && typeof fn == "function" ) this.each(fn);
var jQuery = function(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && typeof a == "function" && jQuery.fn.ready && !a.nodeType && a[0] == undefined ) // Safari reports typeof on DOM NodeLists as a function return jQuery(document).ready(a); // Make sure that a selection was provided a = a || jQuery.context || document; // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return jQuery( jQuery.merge( a, [] ) ); // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery( c ).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings if ( typeof a == "string" ) { var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); } // Watch for when an array is passed in this.get( a.constructor == Array || a.length && a != window && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); // See if an extra function was provided var fn = arguments[ arguments.length - 1 ]; // If so, execute it in context if ( fn && typeof fn == "function" ) this.each(fn); return this;};
if ( !jQuery.initDone ) jQuery.init();
function jQuery(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && a.constructor == Function && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure t hat a selection was provided a = a || jQuery.context || document; /* * Handle support for overriding other $() functions. Way too many libraries * provide this function to simply ignore it and overwrite it. */ /* // Check to see if this is a possible collision case if ( jQuery._$ && !c && a.constructor == String && // Make sure that the expression is a colliding one !/[^a-zA-Z0-9_-]/.test(a) && // and that there are no elements that match it // (this is the one truly ambiguous case) !document.getElementsByTagName(a).length ) // Use the default method, in case it works some voodoo return jQuery._$( a ); */ // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return a; // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery(c.get()).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); // Watch for when an array is passed in this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); var fn = arguments[ arguments.length - 1 ]; if ( fn && fn.constructor == Function ) this.each(fn);}
if (typeof a == "string") {
if ( a.constructor == String ) {
jQuery = function(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && typeof a == "function" && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure that a selection was provided a = a || jQuery.context || document; // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return jQuery( jQuery.merge( a, [] ) ); // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery( c ).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings if (typeof a == "string") { var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); } // Watch for when an array is passed in this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); // See if an extra function was provided var fn = arguments[ arguments.length - 1 ]; // If so, execute it in context if ( fn && typeof fn == "function" ) this.each(fn);};
return $( jQuery.merge( a, [] ) );
return jQuery( jQuery.merge( a, [] ) );
function jQuery(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && a.constructor == Function && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure that a selection was provided a = a || jQuery.context || document; // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return $( jQuery.merge( a, [] ) ); // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return $( c ).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); // Watch for when an array is passed in this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); // See if an extra function was provided var fn = arguments[ arguments.length - 1 ]; // If so, execute it in context if ( fn && fn.constructor == Function ) this.each(fn);}
return $( c ).find(a);
return jQuery( c ).find(a);
function jQuery(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && a.constructor == Function && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure that a selection was provided a = a || jQuery.context || document; // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return $( jQuery.merge( a, [] ) ); // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return $( c ).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); // Watch for when an array is passed in this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); // See if an extra function was provided var fn = arguments[ arguments.length - 1 ]; // If so, execute it in context if ( fn && fn.constructor == Function ) this.each(fn);}
jQuery = function(a,c) {
function jQuery(a,c) {
jQuery = function(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && typeof a == "function" && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure that a selection was provided a = a || jQuery.context || document; // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return jQuery( jQuery.merge( a, [] ) ); // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery( c ).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings if ( a.constructor == String ) { var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); } // Watch for when an array is passed in this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); // See if an extra function was provided var fn = arguments[ arguments.length - 1 ]; // If so, execute it in context if ( fn && typeof fn == "function" ) this.each(fn);};
};
return this; }
jQuery = function(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && typeof a == "function" && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure that a selection was provided a = a || jQuery.context || document; // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return jQuery( jQuery.merge( a, [] ) ); // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery( c ).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings if ( a.constructor == String ) { var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); } // Watch for when an array is passed in this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); // See if an extra function was provided var fn = arguments[ arguments.length - 1 ]; // If so, execute it in context if ( fn && typeof fn == "function" ) this.each(fn);};
if ( a.jquery ) return a;
if ( a.jquery ) return $( jQuery.merge( a, [] ) );
function jQuery(a,c) { // Initalize the extra macro functions if ( !jQuery.initDone ) jQuery.init(); // Shortcut for document ready (because $(document).each() is silly) if ( a && a.constructor == Function && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure that a selection was provided a = a || jQuery.context || document; /* * Handle support for overriding other $() functions. Way too many libraries * provide this function to simply ignore it and overwrite it. */ /* // Check to see if this is a possible collision case if ( jQuery._$ && !c && a.constructor == String && // Make sure that the expression is a colliding one !/[^a-zA-Z0-9_-]/.test(a) && // and that there are no elements that match it // (this is the one truly ambiguous case) !document.getElementsByTagName(a).length ) // Use the default method, in case it works some voodoo return jQuery._$( a ); */ // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return a; // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return c.find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); // Watch for when an array is passed in this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); var fn = arguments[ arguments.length - 1 ]; if ( fn && fn.constructor == Function ) this.each(fn);}
if ( c && c.jquery ) return c.find(a);
if ( c && c.jquery ) return $( c ).find(a);
function jQuery(a,c) { // Initalize the extra macro functions if ( !jQuery.initDone ) jQuery.init(); // Shortcut for document ready (because $(document).each() is silly) if ( a && a.constructor == Function && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure that a selection was provided a = a || jQuery.context || document; /* * Handle support for overriding other $() functions. Way too many libraries * provide this function to simply ignore it and overwrite it. */ /* // Check to see if this is a possible collision case if ( jQuery._$ && !c && a.constructor == String && // Make sure that the expression is a colliding one !/[^a-zA-Z0-9_-]/.test(a) && // and that there are no elements that match it // (this is the one truly ambiguous case) !document.getElementsByTagName(a).length ) // Use the default method, in case it works some voodoo return jQuery._$( a ); */ // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return a; // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return c.find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Handle HTML strings var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); // Watch for when an array is passed in this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements jQuery.merge( a, [] ) : // Find the matching elements and save them for later jQuery.find( a, c ) ); var fn = arguments[ arguments.length - 1 ]; if ( fn && fn.constructor == Function ) this.each(fn);}
/*
function jQuery(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && a.constructor == Function && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure t hat a selection was provided a = a || jQuery.context || document; /* * Handle support for overriding other $() functions. Way too many libraries * provide this function to simply ignore it and overwrite it. */ // Check to see if this is a possible collision case if ( jQuery._$ && !c && a.constructor == String && // Make sure that the expression is a colliding one !/[^a-zA-Z0-9_-]/.test(a) && // and that there are no elements that match it // (this is the one truly ambiguous case) !document.getElementsByTagName(a).length ) // Use the default method, in case it works some voodoo return jQuery._$( a ); // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return a; // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery(c.get()).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Watch for when an array is passed in this.get( a.constructor == Array ? // Assume that it's an array of DOM Elements a : // Find the matching elements and save them for later jQuery.find( a, c ) ); var fn = arguments[ arguments.length - 1 ]; if ( fn && fn.constructor == Function ) this.each(fn);}
this.get( a.constructor == Array ?
this.get( a.constructor == Array || a.length && a[0].nodeType ?
function jQuery(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && a.constructor == Function && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure t hat a selection was provided a = a || jQuery.context || document; /* * Handle support for overriding other $() functions. Way too many libraries * provide this function to simply ignore it and overwrite it. */ // Check to see if this is a possible collision case if ( jQuery._$ && !c && a.constructor == String && // Make sure that the expression is a colliding one !/[^a-zA-Z0-9_-]/.test(a) && // and that there are no elements that match it // (this is the one truly ambiguous case) !document.getElementsByTagName(a).length ) // Use the default method, in case it works some voodoo return jQuery._$( a ); // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return a; // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery(c.get()).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Watch for when an array is passed in this.get( a.constructor == Array ? // Assume that it's an array of DOM Elements a : // Find the matching elements and save them for later jQuery.find( a, c ) ); var fn = arguments[ arguments.length - 1 ]; if ( fn && fn.constructor == Function ) this.each(fn);}
a :
jQuery.merge( a, [] ) :
function jQuery(a,c) { // Shortcut for document ready (because $(document).each() is silly) if ( a && a.constructor == Function && jQuery.fn.ready ) return jQuery(document).ready(a); // Make sure t hat a selection was provided a = a || jQuery.context || document; /* * Handle support for overriding other $() functions. Way too many libraries * provide this function to simply ignore it and overwrite it. */ // Check to see if this is a possible collision case if ( jQuery._$ && !c && a.constructor == String && // Make sure that the expression is a colliding one !/[^a-zA-Z0-9_-]/.test(a) && // and that there are no elements that match it // (this is the one truly ambiguous case) !document.getElementsByTagName(a).length ) // Use the default method, in case it works some voodoo return jQuery._$( a ); // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return a; // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery(c.get()).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Watch for when an array is passed in this.get( a.constructor == Array ? // Assume that it's an array of DOM Elements a : // Find the matching elements and save them for later jQuery.find( a, c ) ); var fn = arguments[ arguments.length - 1 ]; if ( fn && fn.constructor == Function ) this.each(fn);}
a = a || jQuery.context || document;
function jQuery(a,c) { /* * Handle support for overriding other $() functions. Way too many libraries * provide this function to simply ignore it and overwrite it. */ // Check to see if this is a possible collision case if ( jQuery._$ && !c && a.constructor == String && // Make sure that the expression is a colliding one !/[^a-zA-Z0-9_-]/.test(a) && // and that there are no elements that match it // (this is the one truly ambiguous case) !document.getElementsByTagName(a).length ) // Use the default method, in case it works some voodoo return jQuery._$( a ); // Make sure t hat a selection was provided a = a || jQuery.context || document; // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return a; // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return $(c.get()).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Watch for when an array is passed in this.get( a.constructor == Array ? // Assume that it's an array of DOM Elements a : // Find the matching elements and save them for later jQuery.Select( a, c ) ); var fn = arguments[ arguments.length - 1 ]; if ( fn && fn.constructor == Function ) this.each(fn);}
this.pushStack( a.constructor == Array ?
this.get( a.constructor == Array ?
function jQuery(a,c) { /* * Handle support for overriding other $() functions. Way too many libraries * provide this function to simply ignore it and overwrite it. */ // Check to see if this is a possible collision case if ( jQuery._$ && !c && a.constructor == String && // Make sure that the expression is a colliding one !/[^a-zA-Z0-9_-]/.test(a) && // and that there are no elements that match it // (this is the one truly ambiguous case) !document.getElementsByTagName(a).length ) // Use the default method, in case it works some voodoo return jQuery._$( a ); // Make sure t hat a selection was provided a = a || jQuery.context || document; // Watch for when a jQuery object is passed as the selector if ( a.jquery ) return a; // Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return $(c.get()).find(a); // If the context is global, return a new object if ( window == this ) return new jQuery(a,c); // Watch for when an array is passed in this.pushStack( a.constructor == Array ? // Assume that it's an array of DOM Elements a : // Find the matching elements and save them for later jQuery.Select( a, c ) ); var fn = arguments[ arguments.length - 1 ]; if ( fn && fn.constructor == Function ) this.each(fn);}
newDate = createDateTime();
var newDate = createDateTime();
function jsDateToDateTime(date){ newDate = createDateTime(); newDate.jsDate = date; dump ("date: " + date + " newDate: " + newDate + " newDate.jsDate: "+ newDate.jsDate + "\n"); return newDate;}