rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
if (!fn) fn = MSG_VAL_TLSCRIPT;
|
function FrameRecord (frame){ if (!(frame instanceof jsdIStackFrame)) throw new BadMojo (ERR_INVALID_PARAM, "value"); this.setColumnPropertyName ("stack-col-0", "functionName"); this.setColumnPropertyName ("stack-col-2", "location"); var fn = frame.script.functionName; var sourceRec = console.scripts[frame.script.fileName]; if (sourceRec) { this.location = sourceRec.shortName + ":" + frame.line; var scriptRec = sourceRec.locateChildByScript(frame.script); if (!scriptRec) dd ("no scriptrec"); else if (fn == "anonymous") fn = scriptRec.functionName; } else dd ("no sourcerec"); this.functionName = fn; this.frame = frame; this.reserveChildren(); this.scopeRec = new ValueRecord (frame.scope, MSG_WORD_SCOPE, ""); this.appendChild (this.scopeRec); this.thisRec = new ValueRecord (frame.thisValue, MSG_WORD_THIS, ""); this.property = console.stackView.atomFrame; this.appendChild (this.thisRec);}
|
|
.createInstance(Ci.nsIFileProtocolHandler);
|
.getService(Ci.nsIFileProtocolHandler);
|
G_File.fromFileURI = function(uri) { // Ensure they use file:// url's: discourages platform-specific paths if (uri.indexOf("file://") != 0) throw new Error("File path must be a file:// URL"); var fileHandler = Cc["@mozilla.org/network/protocol;1?name=file"] .createInstance(Ci.nsIFileProtocolHandler); return fileHandler.getFileFromURLSpec(uri);}
|
function fromUnicode (msg)
|
function fromUnicode (msg, charset)
|
function fromUnicode (msg){ if (!("ucConverter" in client)) return msg; /* XXX set charset again to force the encoder to reset, see bug 114923 */ client.ucConverter.charset = client.CHARSET; return client.ucConverter.ConvertFromUnicode(msg);}
|
client.ucConverter.charset = client.CHARSET;
|
if (typeof charset == "undefined") client.ucConverter.charset = client.CHARSET; else client.ucConverter.charset = charset;
|
function fromUnicode (msg){ if (!("ucConverter" in client)) return msg; /* XXX set charset again to force the encoder to reset, see bug 114923 */ client.ucConverter.charset = client.CHARSET; return client.ucConverter.ConvertFromUnicode(msg);}
|
if (!allIncluded) picker.appendFilters(FILTER_ALL);
|
function futils_nosepicker(initialPath, typeList, attribs){ const classes = Components.classes; const interfaces = Components.interfaces; const PICKER_CTRID = "@mozilla.org/filepicker;1"; const LOCALFILE_CTRID = "@mozilla.org/file/local;1"; const nsIFilePicker = interfaces.nsIFilePicker; const nsILocalFile = interfaces.nsILocalFile; var picker = classes[PICKER_CTRID].createInstance(nsIFilePicker); if (typeof attribs == "object") { for (var a in attribs) picker[a] = attribs[a]; } else throw "bad type for param |attribs|"; if (initialPath) { var localFile; if (typeof initialPath == "string") { localFile = classes[LOCALFILE_CTRID].createInstance(nsILocalFile); localFile.initWithPath(initialPath); } else { if (!(initialPath instanceof nsILocalFile)) throw "bad type for argument |initialPath|"; localFile = initialPath; } picker.displayDirectory = localFile } if (typeof typeList == "string") typeList = typeList.split(" "); if (typeList instanceof Array) { for (var i in typeList) { switch (typeList[i]) { case "$all": picker.appendFilters(FILTER_ALL); break; case "$html": picker.appendFilters(FILTER_HTML); break; case "$text": picker.appendFilters(FILTER_TEXT); break; case "$images": picker.appendFilters(FILTER_IMAGES); break; case "$xml": picker.appendFilters(FILTER_XML); break; case "$xul": picker.appendFilters(FILTER_XUL); break; default: picker.appendFilter(typeList[i], typeList[i]); break; } } } return picker;}
|
|
this.hasher_ = Cc["@mozilla.org/security/hash;1"] .createInstance(Ci.nsICryptoHash); this.initialized_ = false;
|
this.hasher_ = null;
|
function G_CryptoHasher() { this.debugZone = "cryptohasher"; this.decoder_ = new G_Base64(); this.hasher_ = Cc["@mozilla.org/security/hash;1"] .createInstance(Ci.nsICryptoHash); this.initialized_ = false;}
|
} else if ( node.tagName == "IMG" ) {
|
} else if ( node.nodeType == Node.ELEMENT_NODE && node.localName.ToUpperCase() == "IMG" ) {
|
gatherTextUnder : function ( root ) { var text = ""; var node = root.firstChild; var depth = 1; while ( node && depth > 0 ) { // See if this node is text. if ( node.nodeName == "#text" ) { // Add this text to our collection. text += " " + node.data; } else if ( node.tagName == "IMG" ) { // If it has an alt= attribute, use that. altText = node.getAttribute( "alt" ); if ( altText && altText != "" ) { text = altText; break; } } // Find next node to test. // First, see if this node has children. if ( node.hasChildNodes() ) { // Go to first child. node = node.firstChild; depth++; } else { // No children, try next sibling. if ( node.nextSibling ) { node = node.nextSibling; } else { // Last resort is our next oldest uncle/aunt. node = node.parentNode.nextSibling; depth--; } } } // Strip leading whitespace. text = text.replace( /^\s+/, "" ); // Strip trailing whitespace. text = text.replace( /\s+$/, "" ); // Compress remaining whitespace. text = text.replace( /\s+/g, " " ); return text; },
|
altText = node.getAttribute( "alt" );
|
var altText = node.getAttribute( "alt" );
|
gatherTextUnder : function ( root ) { var text = ""; var node = root.firstChild; var depth = 1; while ( node && depth > 0 ) { // See if this node is text. if ( node.nodeName == "#text" ) { // Add this text to our collection. text += " " + node.data; } else if ( node.nodeType == Node.ELEMENT_NODE && node.localName.toUpperCase() == "IMG" ) { // If it has an alt= attribute, use that. altText = node.getAttribute( "alt" ); if ( altText && altText != "" ) { text = altText; break; } } // Find next node to test. // First, see if this node has children. if ( node.hasChildNodes() ) { // Go to first child. node = node.firstChild; depth++; } else { // No children, try next sibling. if ( node.nextSibling ) { node = node.nextSibling; } else { // Last resort is our next oldest uncle/aunt. node = node.parentNode.nextSibling; depth--; } } } // Strip leading whitespace. text = text.replace( /^\s+/, "" ); // Strip trailing whitespace. text = text.replace( /\s+$/, "" ); // Compress remaining whitespace. text = text.replace( /\s+/g, " " ); return text; },
|
} else if ( node.nodeType == Node.ELEMENT_NODE && node.localName.toUpperCase() == "IMG" ) {
|
} else if ( node instanceof HTMLImageElement ) {
|
function gatherTextUnder ( root ) { var text = ""; var node = root.firstChild; var depth = 1; while ( node && depth > 0 ) { // See if this node is text. if ( node.nodeType == Node.TEXT_NODE ) { // Add this text to our collection. text += " " + node.data; } else if ( node.nodeType == Node.ELEMENT_NODE && node.localName.toUpperCase() == "IMG" ) { // If it has an alt= attribute, use that. var altText = node.getAttribute( "alt" ); if ( altText && altText != "" ) { text = altText; break; } } // Find next node to test. // First, see if this node has children. if ( node.hasChildNodes() ) { // Go to first child. node = node.firstChild; depth++; } else { // No children, try next sibling. if ( node.nextSibling ) { node = node.nextSibling; } else { // Last resort is our next oldest uncle/aunt. node = node.parentNode.nextSibling; depth--; } } } // Strip leading whitespace. text = text.replace( /^\s+/, "" ); // Strip trailing whitespace. text = text.replace( /\s+$/, "" ); // Compress remaining whitespace. text = text.replace( /\s+/g, " " ); return text;}
|
writeLineToLog('gc: ' + ex);
|
function gc(){ try { // Thanks to dveditz netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); var jsdIDebuggerService = Components.interfaces.jsdIDebuggerService; var service = Components.classes['@mozilla.org/js/jsd/debugger-service;1']. getService(jsdIDebuggerService); service.GC(); } catch(ex) { // Thanks to [email protected] var tmp = Math.PI * 1e500, tmp2; for (var i = 0; i != 1 << 15; ++i) { tmp2 = tmp * 1.5; } }}
|
|
dump("GenerateAttachmentsString()\n"); attachments = "";
|
var attachments = ""; var body = document.getElementById('bucketBody'); var item, row, cell, text, colon;
|
function GenerateAttachmentsString(){ dump("GenerateAttachmentsString()\n"); attachments = ""; selectNode = document.getElementById('attachments'); if (selectNode == null) return attachments; options = selectNode.options; if (options == null) return attachments; if (options.length == 0) return attachments; attachments = options[0].text; for (i=1;i<options.length;i++) { attachments = attachments + "," + options[i].text; } return attachments;}
|
selectNode = document.getElementById('attachments'); if (selectNode == null) return attachments; options = selectNode.options; if (options == null) return attachments; if (options.length == 0) return attachments; attachments = options[0].text; for (i=1;i<options.length;i++) { attachments = attachments + "," + options[i].text;
|
for (var index = 0; index < body.childNodes.length; index++) { item = body.childNodes[index]; if (item.childNodes && item.childNodes.length) { row = item.childNodes[0]; if (row.childNodes && row.childNodes.length) { cell = row.childNodes[0]; if (cell.childNodes && cell.childNodes.length) { text = cell.childNodes[0]; if (text && text.data && text.data.length) { if (attachments == "") attachments = text.data; else attachments = attachments + "," + text.data; } } } }
|
function GenerateAttachmentsString(){ dump("GenerateAttachmentsString()\n"); attachments = ""; selectNode = document.getElementById('attachments'); if (selectNode == null) return attachments; options = selectNode.options; if (options == null) return attachments; if (options.length == 0) return attachments; attachments = options[0].text; for (i=1;i<options.length;i++) { attachments = attachments + "," + options[i].text; } return attachments;}
|
else if ( formName == "2stpwrap.htm" )
|
else if ( formName == "2step.htm" )
|
function generateControls(){ var editMode = false; var showAcctsetEdit = false; var showRegFileEdit = false; var showISPFileEdit = false; var showExit = true; var showHelp = true; var showBack = true; var showNext = true; var showConnectServer = false; var showConnectISP = false; var showConnectNow = false; var showDownload = false; var showConnectLater = false; var showAgain = false; var showDone = false; var showRestart = false; var showSetupShortcut = false; var showInternet = false; var showScreenToggle = false; var screenVisible = true; var showScreenOptions = false; netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" ); if ( parent && parent.parent && parent.parent.globals ) { editMode = ( parent.parent.globals.document.vars.editMode.value.toLowerCase() == "yes" ) ? true : false; }// var formName = parent.content.location.toString(); var formName = "" + parent.content.location; if ( formName != null && formName != "" && formName != "about:blank" ) { if ( ( x = formName.lastIndexOf( "/" ) ) > 0 ) formName = formName.substring( x + 1, formName.length ); if ( editMode == true ) { var section = null; var variable = null; var pageNum = findPageOffset( formName ); if ( pageNum >= 0 ) { section = pages[ pageNum ][ 0 ].section; variable = pages[ pageNum ][ 0 ].variable; if ( section!=null && section!="" && variable!=null && variable!="" ) { showScreenToggle = true; var theFile = parent.parent.globals.getAcctSetupFilename( self ); var theFlag = parent.parent.globals.GetNameValuePair( theFile, section, variable ); theFlag = theFlag.toLowerCase(); if ( theFlag == "no" ) screenVisible = false; } } } if ( formName == "main.htm" ) { showBack = false; showNext = false; if ( navigator.javaEnabled() == false ) { showNext = false; editMode = false; showAcctsetEdit = false; showISPFileEdit = false; showRegFileEdit = false; document.writeln( "<CENTER><STRONG>Java support is disabled!<P>\n" ); document.writeln( "Choose Options | Network Preferences and enable Java, then try again.</STRONG></CENTER>\n" ); } else if ( !navigator.mimeTypes[ "application/x-netscape-autoconfigure-dialer" ] ) { showNext = false; editMode = false; showAcctsetEdit = false; showISPFileEdit = false; showRegFileEdit = false; document.writeln( "<CENTER><STRONG>The 'Account Setup Plugin' is not installed!<P>\n" ); document.writeln( "Please install the plugin, then run 'Account Setup' again.</STRONG></CENTER>\n" ); } else if ( parent.parent.globals.document.setupPlugin == null ) { showNext = false; editMode = false; } if ( editMode == true ) { showAcctsetEdit = true; showScreenOptions = true; } } else if ( editMode == true && formName == "useAcct.htm" ) { showScreenOptions = true; } else if ( editMode == true && formName == "servers.htm" ) { showScreenOptions = false; } else if ( editMode == true && formName == "billing.htm" ) { showScreenOptions = true; } else if ( formName == "accounts.htm" ) { showNext = false; } else if ( formName == "compare.htm" ) { } else if ( formName == "connect1.htm" ) { showNext = false; showConnectServer = true; if ( editMode == true ) showScreenOptions = true; } else if ( formName == "download.htm" ) { showNext = false; showConnectServer = true; if ( editMode == true ) showScreenOptions = true; } else if ( formName == "connect2.htm" ) { showNext = false; showExit = false; showConnectNow = true; showConnectLater = true; } else if ( formName == "1step.htm" ) { showNext = false; showExit = false; showHelp = false; if ( editMode == true ) showBack = true; } else if ( formName == "2stpwrap.htm" ) { showNext = false; showConnectISP = true; if ( editMode == true ) showScreenOptions = true; } else if ( formName == "register.htm" ) { showHelp = false; showBack = false; showNext = false; if ( editMode == true ) showBack = true; } else if ( formName == "ok.htm" ) { showScreenOptions = true; showBack = false; showExit = false; showNext = false; showInternet = true; showDone = true; if ( editMode == true ) showBack = true; } else if ( formName == "okreboot.htm" ) { showScreenOptions = true; showBack = false; showNext = false; showExit = false; showDone = false; showRestart = true; if ( editMode == true ) showBack = true; } else if ( formName == "error.htm" ) { showBack = true; showExit = true; showNext = false; showAgain = true; showDone = false; if ( editMode == true ) showBack = true; } else if ( formName == "later.htm" ) { showBack = false; showExit = false; showNext = false; showDone = true; if ( editMode == true ) showBack = true; } else if ( formName == "intro1.htm" ) { showSetupShortcut = false; } else if ( formName == "settings.htm" ) { showBack = true; showNext = false; editMode = false; } else if ( formName == "editregs.htm" ) { showBack = true; showNext = false; editMode = false; } else if ( formName == "editisps.htm" ) { showBack = true; showNext = false; editMode = false; } else if ( formName == "aboutbox.htm" ) { showHelp = false; showNext = false; showBack = true; } else if ( formName == "namepw.htm" ) { showScreenOptions = true; } else if ( formName == "asktty.htm" ) { showScreenOptions = false; showBack = true; showNext = false; editMode = false; } else if ( formName == "askserv.htm" ) { showScreenOptions = false; showBack = true; showNext = false; editMode = false; } else if ( formName == "asksvinf.htm" ) { showScreenOptions = false; showBack = true; showNext = false; editMode = false; } else if ( formName == "showphon.htm" ) { showScreenOptions = false; showBack = true; showNext = false; editMode = false; } else if ( formName == "editcc.htm" ) { showBack = true; showNext = false; editMode = false; } else if ( formName == "addnci.htm" ) { showBack = true; showNext = false; editMode = false; } else if ( formName == "addias.htm" ) { showBack = true; showNext = false; editMode = false; } else if ( formName == "editfour.htm" ) { showBack = true; showNext = false; editMode = false; } if ( document && document.layers && document.layers[ "controls" ] && document.layers[ "controls" ].document && document.layers[ "controls" ].document.layers && document.layers[ "controls" ].document.layers.length > 0 ) { document.layers[ "controls" ].layers[ "help" ].visibility = ( ( showHelp == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "exit" ].visibility = ( ( showExit == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "back" ].visibility = ( ( showBack == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "next" ].visibility = ( ( showNext == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "connectnow" ].visibility = ( ( showConnectNow == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "download" ].visibility = ( ( showDownload == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "connectserver" ].visibility = ( ( showConnectServer == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "connectisp" ].visibility = ( ( showConnectISP == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "connectagain" ].visibility = ( ( showAgain == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "done" ].visibility = ( ( showDone == true) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "restart" ].visibility = ( ( showRestart == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "connectlater" ].visibility = ( ( showConnectLater == true ) ? "show" : "hide" ); document.layers[ "controls" ].layers[ "setup" ].visibility = ( ( showSetupShortcut == true ) ? "show" : "hide" ); //NEW - Generate the controls for the toolbar, if it exists if ( ( !theToolBar ) || ( theToolBar == null ) || ( !theToolBar.location ) || ( theToolBar.closed ) ) { //alert("opening toolbar"); theToolBar = openToolBar(); } else { //alert("toolbar open, generating controls" + theToolBar); generateToolBarControls(); } } else { setTimeout( "generateControls()", 1000 ); } } else { setTimeout( "generateControls()", 1000 ); }}
|
if ( editCard.generateDisplayName ) { var displayName; var firstNameField = document.getElementById('FirstName'); var lastNameField = document.getElementById('LastName'); var displayNameField = document.getElementById('DisplayName');
|
if ( editCard.generateDisplayName ) { var displayName;
|
function GenerateDisplayName(){ if ( editCard.generateDisplayName ) { var displayName; var firstNameField = document.getElementById('FirstName'); var lastNameField = document.getElementById('LastName'); var displayNameField = document.getElementById('DisplayName'); /* todo: i18N work todo here */ /* this used to be XP_GetString(MK_ADDR_FIRST_LAST_SEP) */ var separator = ""; if ( lastNameField.value && firstNameField.value ) { if ( editCard.displayLastNameFirst ) separator = editCard.lastFirstSeparator; else separator = editCard.firstLastSeparator; } if ( editCard.displayLastNameFirst ) displayName = lastNameField.value + separator + firstNameField.value; else displayName = firstNameField.value + separator + lastNameField.value; displayNameField.value = displayName; top.window.title = gAddressBookBundle.getFormattedString(editCard.titleProperty, [ displayName ]); }}
|
var separator = ""; if ( lastNameField.value && firstNameField.value ) { if ( editCard.displayLastNameFirst ) separator = editCard.lastFirstSeparator; else separator = editCard.firstLastSeparator; } if ( editCard.displayLastNameFirst ) displayName = lastNameField.value + separator + firstNameField.value; else displayName = firstNameField.value + separator + lastNameField.value; displayNameField.value = displayName;
|
var firstNameField = document.getElementById('FirstName'); var lastNameField = document.getElementById('LastName'); var displayNameField = document.getElementById('DisplayName'); var separator = ""; if ( lastNameField.value && firstNameField.value ) { if ( editCard.displayLastNameFirst ) separator = editCard.lastFirstSeparator; else separator = editCard.firstLastSeparator; } if ( editCard.displayLastNameFirst ) displayName = lastNameField.value + separator + firstNameField.value; else displayName = firstNameField.value + separator + lastNameField.value; displayNameField.value = displayName;
|
function GenerateDisplayName(){ if ( editCard.generateDisplayName ) { var displayName; var firstNameField = document.getElementById('FirstName'); var lastNameField = document.getElementById('LastName'); var displayNameField = document.getElementById('DisplayName'); /* todo: i18N work todo here */ /* this used to be XP_GetString(MK_ADDR_FIRST_LAST_SEP) */ var separator = ""; if ( lastNameField.value && firstNameField.value ) { if ( editCard.displayLastNameFirst ) separator = editCard.lastFirstSeparator; else separator = editCard.firstLastSeparator; } if ( editCard.displayLastNameFirst ) displayName = lastNameField.value + separator + firstNameField.value; else displayName = firstNameField.value + separator + lastNameField.value; displayNameField.value = displayName; top.window.title = gAddressBookBundle.getFormattedString(editCard.titleProperty, [ displayName ]); }}
|
top.window.title = Bundle.formatStringFromName(editCard.titleProperty, [ displayName ], 1);
|
top.window.title = gAddressBookBundle.getFormattedString(editCard.titleProperty, [ displayName ]);
|
function GenerateDisplayName(){ if ( editCard.generateDisplayName ) { var displayName; var firstNameField = document.getElementById('FirstName'); var lastNameField = document.getElementById('LastName'); var displayNameField = document.getElementById('DisplayName'); /* todo: i18N work todo here */ /* this used to be XP_GetString(MK_ADDR_FIRST_LAST_SEP) */ var separator = ""; if ( lastNameField.value && firstNameField.value ) { if ( editCard.displayLastNameFirst ) separator = editCard.lastFirstSeparator; else separator = editCard.firstLastSeparator; } if ( editCard.displayLastNameFirst ) displayName = lastNameField.value + separator + firstNameField.value; else displayName = firstNameField.value + separator + lastNameField.value; displayNameField.value = displayName; top.window.title = Bundle.formatStringFromName(editCard.titleProperty, [ displayName ], 1); }}
|
generateOutline: function(baseFolder, parent)
|
generateOutline: function(baseFolder, parent, indentLevel)
|
generateOutline: function(baseFolder, parent) { var folderEnumerator = baseFolder.GetSubFolders(); var done = false; while (!done) { var folder = folderEnumerator.currentItem().QueryInterface(Components.interfaces.nsIMsgFolder); if (folder && !folder.getFlag(MSG_FOLDER_FLAG_TRASH)) { var outline; if(folder.hasSubFolders) { // Make a mostly empty outline element outline = parent.ownerDocument.createElement("outline"); outline.setAttribute("text",folder.prettiestName); this.generateOutline(folder, outline); // recurse parent.appendChild(outline); } else { // Add outline elements with xmlUrls var feeds = this.getFeedsInFolder(folder); for(feed in feeds) { debug("feed: " + feeds[feed]); outline = this.opmlFeedToOutline(feeds[feed],parent.ownerDocument); parent.appendChild(outline); } } } try { folderEnumerator.next(); } catch (ex) { done = true; } } },
|
this.generateOutline(folder, outline);
|
this.generateOutline(folder, outline, indentLevel+2); this.generatePPSpace(parent, indentString); this.generatePPSpace(outline, indentString);
|
generateOutline: function(baseFolder, parent) { var folderEnumerator = baseFolder.GetSubFolders(); var done = false; while (!done) { var folder = folderEnumerator.currentItem().QueryInterface(Components.interfaces.nsIMsgFolder); if (folder && !folder.getFlag(MSG_FOLDER_FLAG_TRASH)) { var outline; if(folder.hasSubFolders) { // Make a mostly empty outline element outline = parent.ownerDocument.createElement("outline"); outline.setAttribute("text",folder.prettiestName); this.generateOutline(folder, outline); // recurse parent.appendChild(outline); } else { // Add outline elements with xmlUrls var feeds = this.getFeedsInFolder(folder); for(feed in feeds) { debug("feed: " + feeds[feed]); outline = this.opmlFeedToOutline(feeds[feed],parent.ownerDocument); parent.appendChild(outline); } } } try { folderEnumerator.next(); } catch (ex) { done = true; } } },
|
debug("feed: " + feeds[feed]);
|
generateOutline: function(baseFolder, parent) { var folderEnumerator = baseFolder.GetSubFolders(); var done = false; while (!done) { var folder = folderEnumerator.currentItem().QueryInterface(Components.interfaces.nsIMsgFolder); if (folder && !folder.getFlag(MSG_FOLDER_FLAG_TRASH)) { var outline; if(folder.hasSubFolders) { // Make a mostly empty outline element outline = parent.ownerDocument.createElement("outline"); outline.setAttribute("text",folder.prettiestName); this.generateOutline(folder, outline); // recurse parent.appendChild(outline); } else { // Add outline elements with xmlUrls var feeds = this.getFeedsInFolder(folder); for(feed in feeds) { debug("feed: " + feeds[feed]); outline = this.opmlFeedToOutline(feeds[feed],parent.ownerDocument); parent.appendChild(outline); } } } try { folderEnumerator.next(); } catch (ex) { done = true; } } },
|
|
this.generatePPSpace(parent, indentString);
|
generateOutline: function(baseFolder, parent) { var folderEnumerator = baseFolder.GetSubFolders(); var done = false; while (!done) { var folder = folderEnumerator.currentItem().QueryInterface(Components.interfaces.nsIMsgFolder); if (folder && !folder.getFlag(MSG_FOLDER_FLAG_TRASH)) { var outline; if(folder.hasSubFolders) { // Make a mostly empty outline element outline = parent.ownerDocument.createElement("outline"); outline.setAttribute("text",folder.prettiestName); this.generateOutline(folder, outline); // recurse parent.appendChild(outline); } else { // Add outline elements with xmlUrls var feeds = this.getFeedsInFolder(folder); for(feed in feeds) { debug("feed: " + feeds[feed]); outline = this.opmlFeedToOutline(feeds[feed],parent.ownerDocument); parent.appendChild(outline); } } } try { folderEnumerator.next(); } catch (ex) { done = true; } } },
|
|
if (aElement.disabled!="true")
|
if ( !aElement.getAttribute("disabled","true") )
|
generic_Set: function ( aElement, aDataObject ) { if( aElement ) { for( var property in aDataObject ) { aElement.setAttribute( property, aDataObject[property] ); } if (aElement.disabled!="true") aElement.removeAttribute("disabled"); } },
|
windowLocked = true; CommandUpdate_MsgCompose();
|
windowLocked = true; CommandUpdate_MsgCompose(); disableEditableFields();
|
function GenericSendMessage( msgType ){ dump("GenericSendMessage from XUL\n"); dump("Identity = " + getCurrentIdentity() + "\n"); if (msgCompose != null) { var msgCompFields = msgCompose.compFields; if (msgCompFields) { Recipients2CompFields(msgCompFields); var subject = document.getElementById("msgSubject").value; msgCompFields.subject = subject; dump("attachments = " + GenerateAttachmentsString() + "\n"); try { msgCompFields.attachments = GenerateAttachmentsString(); } catch (ex) { dump("failed to SetAttachments\n"); } if (msgType == msgCompDeliverMode.Now || msgType == msgCompDeliverMode.Later) { //Do we need to check the spelling? if (prefs.GetBoolPref("mail.SpellCheckBeforeSend")) goDoCommand('cmd_spelling'); //Check if we have a subject, else ask user for confirmation if (subject == "") { if (!gPromptService) { gPromptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(); gPromptService = gPromptService.QueryInterface(Components.interfaces.nsIPromptService); } if (gPromptService) { var result = {value:gComposeMsgsBundle.getString("defaultSubject")}; if (gPromptService.prompt( window, gComposeMsgsBundle.getString("subjectDlogTitle"), gComposeMsgsBundle.getString("subjectDlogMessage"), result, null, {value:0} )) { msgCompFields.subject = result.value; var subjectInputElem = document.getElementById("msgSubject"); subjectInputElem.value = result.value; } else return; } } // Before sending the message, check what to do with HTML message, eventually abort. var convert = DetermineConvertibility(); var action = DetermineHTMLAction(convert); if (action == msgCompSendFormat.AskUser) { var recommAction = convert == msgCompConvertible.No ? msgCompSendFormat.AskUser : msgCompSendFormat.PlainText; var result2 = {action:recommAction, convertible:convert, abort:false}; window.openDialog("chrome://messenger/content/messengercompose/askSendFormat.xul", "askSendFormatDialog", "chrome,modal,titlebar,centerscreen", result2); if (result2.abort) return; action = result2.action; } switch (action) { case msgCompSendFormat.PlainText: msgCompFields.forcePlainText = true; msgCompFields.useMultipartAlternative = false; break; case msgCompSendFormat.HTML: msgCompFields.forcePlainText = false; msgCompFields.useMultipartAlternative = false; break; case msgCompSendFormat.Both: msgCompFields.forcePlainText = false; msgCompFields.useMultipartAlternative = true; break; default: dump("\###SendMessage Error: invalid action value\n"); return; } } try { windowLocked = true; CommandUpdate_MsgCompose(); var progress = Components.classes["@mozilla.org/messenger/progress;1"].createInstance(Components.interfaces.nsIMsgProgress); if (progress) { progress.registerListener(progressListener); sendOrSaveOperationInProgress = true; } msgCompose.SendMsg(msgType, getCurrentIdentity(), progress); } catch (ex) { dump("failed to SendMsg: " + ex + "\n"); windowLocked = false; CommandUpdate_MsgCompose(); } } } else dump("###SendMessage Error: composeAppCore is null!\n");}
|
dump("failed to SendMsg: " + ex + "\n"); windowLocked = false; CommandUpdate_MsgCompose();
|
dump("failed to SendMsg: " + ex + "\n"); windowLocked = false; enableEditableFields(); CommandUpdate_MsgCompose();
|
function GenericSendMessage( msgType ){ dump("GenericSendMessage from XUL\n"); dump("Identity = " + getCurrentIdentity() + "\n"); if (msgCompose != null) { var msgCompFields = msgCompose.compFields; if (msgCompFields) { Recipients2CompFields(msgCompFields); var subject = document.getElementById("msgSubject").value; msgCompFields.subject = subject; dump("attachments = " + GenerateAttachmentsString() + "\n"); try { msgCompFields.attachments = GenerateAttachmentsString(); } catch (ex) { dump("failed to SetAttachments\n"); } if (msgType == msgCompDeliverMode.Now || msgType == msgCompDeliverMode.Later) { //Do we need to check the spelling? if (prefs.GetBoolPref("mail.SpellCheckBeforeSend")) goDoCommand('cmd_spelling'); //Check if we have a subject, else ask user for confirmation if (subject == "") { if (!gPromptService) { gPromptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(); gPromptService = gPromptService.QueryInterface(Components.interfaces.nsIPromptService); } if (gPromptService) { var result = {value:gComposeMsgsBundle.getString("defaultSubject")}; if (gPromptService.prompt( window, gComposeMsgsBundle.getString("subjectDlogTitle"), gComposeMsgsBundle.getString("subjectDlogMessage"), result, null, {value:0} )) { msgCompFields.subject = result.value; var subjectInputElem = document.getElementById("msgSubject"); subjectInputElem.value = result.value; } else return; } } // Before sending the message, check what to do with HTML message, eventually abort. var convert = DetermineConvertibility(); var action = DetermineHTMLAction(convert); if (action == msgCompSendFormat.AskUser) { var recommAction = convert == msgCompConvertible.No ? msgCompSendFormat.AskUser : msgCompSendFormat.PlainText; var result2 = {action:recommAction, convertible:convert, abort:false}; window.openDialog("chrome://messenger/content/messengercompose/askSendFormat.xul", "askSendFormatDialog", "chrome,modal,titlebar,centerscreen", result2); if (result2.abort) return; action = result2.action; } switch (action) { case msgCompSendFormat.PlainText: msgCompFields.forcePlainText = true; msgCompFields.useMultipartAlternative = false; break; case msgCompSendFormat.HTML: msgCompFields.forcePlainText = false; msgCompFields.useMultipartAlternative = false; break; case msgCompSendFormat.Both: msgCompFields.forcePlainText = false; msgCompFields.useMultipartAlternative = true; break; default: dump("\###SendMessage Error: invalid action value\n"); return; } } try { windowLocked = true; CommandUpdate_MsgCompose(); var progress = Components.classes["@mozilla.org/messenger/progress;1"].createInstance(Components.interfaces.nsIMsgProgress); if (progress) { progress.registerListener(progressListener); sendOrSaveOperationInProgress = true; } msgCompose.SendMsg(msgType, getCurrentIdentity(), progress); } catch (ex) { dump("failed to SendMsg: " + ex + "\n"); windowLocked = false; CommandUpdate_MsgCompose(); } } } else dump("###SendMessage Error: composeAppCore is null!\n");}
|
if (promptService)
|
if (!gPromptService) { gPromptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(); gPromptService = gPromptService.QueryInterface(Components.interfaces.nsIPromptService); } if (gPromptService)
|
function GenericSendMessage( msgType ){ dump("GenericSendMessage from XUL\n"); dump("Identity = " + getCurrentIdentity() + "\n"); if (msgCompose != null) { var msgCompFields = msgCompose.compFields; if (msgCompFields) { Recipients2CompFields(msgCompFields); var subject = document.getElementById("msgSubject").value; msgCompFields.subject = subject; dump("attachments = " + GenerateAttachmentsString() + "\n"); try { msgCompFields.attachments = GenerateAttachmentsString(); } catch (ex) { dump("failed to SetAttachments\n"); } if (msgType == msgCompDeliverMode.Now || msgType == msgCompDeliverMode.Later) { //Do we need to check the spelling? if (prefs.GetBoolPref("mail.SpellCheckBeforeSend")) goDoCommand('cmd_spelling'); //Check if we have a subject, else ask user for confirmation if (subject == "") { if (promptService) { var result = {value:gComposeMsgsBundle.getString("defaultSubject")}; if (promptService.prompt( window, gComposeMsgsBundle.getString("subjectDlogTitle"), gComposeMsgsBundle.getString("subjectDlogMessage"), result, null, {value:0} )) { msgCompFields.subject = result.value; var subjectInputElem = document.getElementById("msgSubject"); subjectInputElem.value = result.value; } else return; } } // Before sending the message, check what to do with HTML message, eventually abort. var convert = DetermineConvertibility(); var action = DetermineHTMLAction(convert); if (action == msgCompSendFormat.AskUser) { var recommAction = convert == msgCompConvertible.No ? msgCompSendFormat.AskUser : msgCompSendFormat.PlainText; var result2 = {action:recommAction, convertible:convert, abort:false}; window.openDialog("chrome://messenger/content/messengercompose/askSendFormat.xul", "askSendFormatDialog", "chrome,modal,titlebar,centerscreen", result2); if (result2.abort) return; action = result2.action; } switch (action) { case msgCompSendFormat.PlainText: msgCompFields.forcePlainText = true; msgCompFields.useMultipartAlternative = false; break; case msgCompSendFormat.HTML: msgCompFields.forcePlainText = false; msgCompFields.useMultipartAlternative = false; break; case msgCompSendFormat.Both: msgCompFields.forcePlainText = false; msgCompFields.useMultipartAlternative = true; break; default: dump("\###SendMessage Error: invalid action value\n"); return; } } try { windowLocked = true; CommandUpdate_MsgCompose(); var progress = Components.classes["@mozilla.org/messenger/progress;1"].createInstance(Components.interfaces.nsIMsgProgress); if (progress) { progress.registerListener(progressListener); sendOrSaveOperationInProgress = true; } msgCompose.SendMsg(msgType, getCurrentIdentity(), progress); } catch (ex) { dump("failed to SendMsg: " + ex + "\n"); windowLocked = false; CommandUpdate_MsgCompose(); } } } else dump("###SendMessage Error: composeAppCore is null!\n");}
|
if (promptService.prompt(
|
if (gPromptService.prompt(
|
function GenericSendMessage( msgType ){ dump("GenericSendMessage from XUL\n"); dump("Identity = " + getCurrentIdentity() + "\n"); if (msgCompose != null) { var msgCompFields = msgCompose.compFields; if (msgCompFields) { Recipients2CompFields(msgCompFields); var subject = document.getElementById("msgSubject").value; msgCompFields.subject = subject; dump("attachments = " + GenerateAttachmentsString() + "\n"); try { msgCompFields.attachments = GenerateAttachmentsString(); } catch (ex) { dump("failed to SetAttachments\n"); } if (msgType == msgCompDeliverMode.Now || msgType == msgCompDeliverMode.Later) { //Do we need to check the spelling? if (prefs.GetBoolPref("mail.SpellCheckBeforeSend")) goDoCommand('cmd_spelling'); //Check if we have a subject, else ask user for confirmation if (subject == "") { if (promptService) { var result = {value:gComposeMsgsBundle.getString("defaultSubject")}; if (promptService.prompt( window, gComposeMsgsBundle.getString("subjectDlogTitle"), gComposeMsgsBundle.getString("subjectDlogMessage"), result, null, {value:0} )) { msgCompFields.subject = result.value; var subjectInputElem = document.getElementById("msgSubject"); subjectInputElem.value = result.value; } else return; } } // Before sending the message, check what to do with HTML message, eventually abort. var convert = DetermineConvertibility(); var action = DetermineHTMLAction(convert); if (action == msgCompSendFormat.AskUser) { var recommAction = convert == msgCompConvertible.No ? msgCompSendFormat.AskUser : msgCompSendFormat.PlainText; var result2 = {action:recommAction, convertible:convert, abort:false}; window.openDialog("chrome://messenger/content/messengercompose/askSendFormat.xul", "askSendFormatDialog", "chrome,modal,titlebar,centerscreen", result2); if (result2.abort) return; action = result2.action; } switch (action) { case msgCompSendFormat.PlainText: msgCompFields.forcePlainText = true; msgCompFields.useMultipartAlternative = false; break; case msgCompSendFormat.HTML: msgCompFields.forcePlainText = false; msgCompFields.useMultipartAlternative = false; break; case msgCompSendFormat.Both: msgCompFields.forcePlainText = false; msgCompFields.useMultipartAlternative = true; break; default: dump("\###SendMessage Error: invalid action value\n"); return; } } try { windowLocked = true; CommandUpdate_MsgCompose(); var progress = Components.classes["@mozilla.org/messenger/progress;1"].createInstance(Components.interfaces.nsIMsgProgress); if (progress) { progress.registerListener(progressListener); sendOrSaveOperationInProgress = true; } msgCompose.SendMsg(msgType, getCurrentIdentity(), progress); } catch (ex) { dump("failed to SendMsg: " + ex + "\n"); windowLocked = false; CommandUpdate_MsgCompose(); } } } else dump("###SendMessage Error: composeAppCore is null!\n");}
|
action = DetermineHTMLAction(); if (action == msgCompSendFormat.AskUser) { var result = {action:msgCompSendFormat.PlainText, abort:false}; window.openDialog("chrome: "askSendFormatDialog", "chrome,modal", result); if (result.abort) return; action = result.action; } switch (action) { case msgCompSendFormat.PlainText: msgCompFields.SetTheForcePlainText(true); msgCompFields.SetUseMultipartAlternativeFlag(false); break; case msgCompSendFormat.HTML: msgCompFields.SetTheForcePlainText(false); msgCompFields.SetUseMultipartAlternativeFlag(false); break; case msgCompSendFormat.Both: msgCompFields.SetTheForcePlainText(false); msgCompFields.SetUseMultipartAlternativeFlag(true); break; default: dump("\###SendMessage Error: invalid action value\n"); return; }
|
function GenericSendMessage( msgType ){ dump("GenericSendMessage from XUL\n"); dump("Identity = " + getCurrentIdentity() + "\n"); if (msgCompose != null) { var msgCompFields = msgCompose.compFields; if (msgCompFields) { Recipients2CompFields(msgCompFields); msgCompFields.SetSubject(document.getElementById("msgSubject").value); dump("attachments = " + GenerateAttachmentsString() + "\n"); try { msgCompFields.SetAttachments(GenerateAttachmentsString()); } catch (ex) { dump("failed to SetAttachments\n"); } try { msgCompose.SendMsg(msgType, getCurrentIdentity(), null); } catch (ex) { dump("failed to SendMsg\n"); } } } else dump("###SendMessage Error: composeAppCore is null!\n");}
|
|
msgCompose.SendMsg(msgType, getCurrentIdentity(), null);
|
msgCompose.SendMsg(msgType, getCurrentIdentity());
|
function GenericSendMessage( msgType ){ dump("GenericSendMessage from XUL\n"); dump("Identity = " + getCurrentIdentity() + "\n"); if (msgCompose != null) { var msgCompFields = msgCompose.compFields; if (msgCompFields) { Recipients2CompFields(msgCompFields); var subject = document.getElementById("msgSubject").value; msgCompFields.subject = subject; dump("attachments = " + GenerateAttachmentsString() + "\n"); try { msgCompFields.attachments = GenerateAttachmentsString(); } catch (ex) { dump("failed to SetAttachments\n"); } if (msgType == msgCompDeliverMode.Now || msgType == msgCompDeliverMode.Later) { //Do we need to check the spelling? if (prefs.GetBoolPref("mail.SpellCheckBeforeSend")) goDoCommand('cmd_spelling'); //Check if we have a subject, else ask user for confirmation if (subject == "") { if (commonDialogsService) { var result = {value:0}; if (commonDialogsService.Prompt( window, gComposeMsgsBundle.getString("subjectDlogTitle"), gComposeMsgsBundle.getString("subjectDlogMessage"), gComposeMsgsBundle.getString("defaultSubject"), result )) { msgCompFields.subject = result.value; var subjectInputElem = document.getElementById("msgSubject"); subjectInputElem.value = result.value; } else return; } } // Before sending the message, check what to do with HTML message, eventually abort. var convert = DetermineConvertibility(); var action = DetermineHTMLAction(convert); if (action == msgCompSendFormat.AskUser) { var recommAction = convert == msgCompConvertible.No ? msgCompSendFormat.AskUser : msgCompSendFormat.PlainText; var result2 = {action:recommAction, convertible:convert, abort:false}; window.openDialog("chrome://messenger/content/messengercompose/askSendFormat.xul", "askSendFormatDialog", "chrome,modal,titlebar,centerscreen", result2); if (result2.abort) return; action = result2.action; } switch (action) { case msgCompSendFormat.PlainText: msgCompFields.forcePlainText = true; msgCompFields.useMultipartAlternative = false; break; case msgCompSendFormat.HTML: msgCompFields.forcePlainText = false; msgCompFields.useMultipartAlternative = false; break; case msgCompSendFormat.Both: msgCompFields.forcePlainText = false; msgCompFields.useMultipartAlternative = true; break; default: dump("\###SendMessage Error: invalid action value\n"); return; } } try { windowLocked = true; CommandUpdate_MsgCompose(); msgCompose.SendMsg(msgType, getCurrentIdentity(), null); contentChanged = false; msgCompose.bodyModified = false; } catch (ex) { dump("failed to SendMsg\n"); windowLocked = false; CommandUpdate_MsgCompose(); } } } else dump("###SendMessage Error: composeAppCore is null!\n");}
|
dump("failed to SendMsg\n");
|
dump("failed to SendMsg: " + ex + "\n");
|
function GenericSendMessage( msgType ){ dump("GenericSendMessage from XUL\n"); dump("Identity = " + getCurrentIdentity() + "\n"); if (msgCompose != null) { var msgCompFields = msgCompose.compFields; if (msgCompFields) { Recipients2CompFields(msgCompFields); var subject = document.getElementById("msgSubject").value; msgCompFields.subject = subject; dump("attachments = " + GenerateAttachmentsString() + "\n"); try { msgCompFields.attachments = GenerateAttachmentsString(); } catch (ex) { dump("failed to SetAttachments\n"); } if (msgType == msgCompDeliverMode.Now || msgType == msgCompDeliverMode.Later) { //Do we need to check the spelling? if (prefs.GetBoolPref("mail.SpellCheckBeforeSend")) goDoCommand('cmd_spelling'); //Check if we have a subject, else ask user for confirmation if (subject == "") { if (commonDialogsService) { var result = {value:0}; if (commonDialogsService.Prompt( window, gComposeMsgsBundle.getString("subjectDlogTitle"), gComposeMsgsBundle.getString("subjectDlogMessage"), gComposeMsgsBundle.getString("defaultSubject"), result )) { msgCompFields.subject = result.value; var subjectInputElem = document.getElementById("msgSubject"); subjectInputElem.value = result.value; } else return; } } // Before sending the message, check what to do with HTML message, eventually abort. var convert = DetermineConvertibility(); var action = DetermineHTMLAction(convert); if (action == msgCompSendFormat.AskUser) { var recommAction = convert == msgCompConvertible.No ? msgCompSendFormat.AskUser : msgCompSendFormat.PlainText; var result2 = {action:recommAction, convertible:convert, abort:false}; window.openDialog("chrome://messenger/content/messengercompose/askSendFormat.xul", "askSendFormatDialog", "chrome,modal,titlebar,centerscreen", result2); if (result2.abort) return; action = result2.action; } switch (action) { case msgCompSendFormat.PlainText: msgCompFields.forcePlainText = true; msgCompFields.useMultipartAlternative = false; break; case msgCompSendFormat.HTML: msgCompFields.forcePlainText = false; msgCompFields.useMultipartAlternative = false; break; case msgCompSendFormat.Both: msgCompFields.forcePlainText = false; msgCompFields.useMultipartAlternative = true; break; default: dump("\###SendMessage Error: invalid action value\n"); return; } } try { windowLocked = true; CommandUpdate_MsgCompose(); msgCompose.SendMsg(msgType, getCurrentIdentity(), null); contentChanged = false; msgCompose.bodyModified = false; } catch (ex) { dump("failed to SendMsg\n"); windowLocked = false; CommandUpdate_MsgCompose(); } } } else dump("###SendMessage Error: composeAppCore is null!\n");}
|
windowLocked = false; CommandUpdate_MsgCompose();
|
function GenericSendMessage( msgType ){ dump("GenericSendMessage from XUL\n"); dump("Identity = " + getCurrentIdentity() + "\n"); if (msgCompose != null) { var msgCompFields = msgCompose.compFields; if (msgCompFields) { Recipients2CompFields(msgCompFields); var subject = document.getElementById("msgSubject").value; msgCompFields.SetSubject(subject); dump("attachments = " + GenerateAttachmentsString() + "\n"); try { msgCompFields.SetAttachments(GenerateAttachmentsString()); } catch (ex) { dump("failed to SetAttachments\n"); } if (msgType == msgCompDeliverMode.Now || msgType == msgCompDeliverMode.Later) { //Do we need to check the spelling? if (prefs.GetBoolPref("mail.SpellCheckBeforeSend")) goDoCommand('cmd_spelling'); //Check if we have a subject, else ask user for confirmation if (subject == "") { if (commonDialogsService) { var result = {value:0}; if (commonDialogsService.Prompt( window, Bundle.GetStringFromName("subjectDlogTitle"), Bundle.GetStringFromName("subjectDlogMessage"), Bundle.GetStringFromName("defaultSubject"), result )) { msgCompFields.SetSubject(result.value); var subjectInputElem = document.getElementById("msgSubject"); subjectInputElem.value = result.value; } else return; } } // Before sending the message, check what to do with HTML message, eventually abort. action = DetermineHTMLAction(); if (action == msgCompSendFormat.AskUser) { var result = {action:msgCompSendFormat.PlainText, abort:false}; window.openDialog("chrome://messenger/content/messengercompose/askSendFormat.xul", "askSendFormatDialog", "chrome,modal", result); if (result.abort) return; action = result.action; } switch (action) { case msgCompSendFormat.PlainText: msgCompFields.SetTheForcePlainText(true); msgCompFields.SetUseMultipartAlternativeFlag(false); break; case msgCompSendFormat.HTML: msgCompFields.SetTheForcePlainText(false); msgCompFields.SetUseMultipartAlternativeFlag(false); break; case msgCompSendFormat.Both: msgCompFields.SetTheForcePlainText(false); msgCompFields.SetUseMultipartAlternativeFlag(true); break; default: dump("\###SendMessage Error: invalid action value\n"); return; } } try { msgCompose.SendMsg(msgType, getCurrentIdentity(), null); contentChanged = false; msgCompose.bodyModified = false; } catch (ex) { dump("failed to SendMsg\n"); } } } else dump("###SendMessage Error: composeAppCore is null!\n");}
|
|
alert("point not found");
|
suggest(aLoc);
|
function geocode(aLoc) { var gcoder = new GClientGeocoder(); gcoder.getLatLng(aLoc, function (point) { if (!point) { //mapHelper.suggest(aLoc); alert("point not found"); } else { map.setZoom(10); map.panTo(point); map.removeOverlay(marker); marker = new GMarker(point, {draggable: true}); map.addOverlay(marker); //GEvent.addListener(marker, "dragend", function() { mapHelper.onDragEnd(); }); } });}
|
this._request = new PROT_XMLHttpRequest();
|
this._request = PROT_NewXMLHttpRequest();
|
get: function(page, callback) { this._request.abort(); // abort() is asynchronous, so this._request = new PROT_XMLHttpRequest(); this._callback = callback; var asynchronous = true; this._request.open("GET", page, asynchronous); if (this._stripCookies) new PROT_CookieStripper(this._request.channel); // Create a closure var self = this; this._request.onreadystatechange = function() { self.readyStateChange(self); } this._request.send(null); },
|
controller.handleFailure(req);
|
this.handleFailure(req);
|
get : function(aURL, aCallback) { var _t = this; var req = this._getRequest(); req.overrideMimeType("text/plain"); // don't parse XML, this is js req.onerror = function(event) { _t.handleFailure(event.target); event.stopPropagation(); }; req.onload = function(event) { _t.handleSuccess(event.target); event.stopPropagation(); }; if (aCallback) { req.callback = aCallback; } req.open("GET", aURL, true); try { req.send(null); } catch (e) { // work around send sending errors, but not the callback controller.handleFailure(req); } return req; },
|
get mDragService()
|
get: function (aFlavourSet, aRetrievalFunc, aAnyFlag)
|
get mDragService() { if (!this._mDS) { const kDSContractID = "@mozilla.org/widget/dragservice;1"; const kDSIID = Components.interfaces.nsIDragService; this._mDS = Components.classes[kDSContractID].getService(kDSIID); } return this._mDS; },
|
if (!this._mDS)
|
if (!aRetrievalFunc) throw "No data retrieval handler provided!"; var supportsArray = aRetrievalFunc(aFlavourSet); var dataArray = []; var count = supportsArray.Count(); for (var i = 0; i < count; i++)
|
get mDragService() { if (!this._mDS) { const kDSContractID = "@mozilla.org/widget/dragservice;1"; const kDSIID = Components.interfaces.nsIDragService; this._mDS = Components.classes[kDSContractID].getService(kDSIID); } return this._mDS; },
|
const kDSContractID = "@mozilla.org/widget/dragservice;1"; const kDSIID = Components.interfaces.nsIDragService; this._mDS = Components.classes[kDSContractID].getService(kDSIID);
|
var trans = supportsArray.GetElementAt(i); if (!trans) continue; trans = trans.QueryInterface(Components.interfaces.nsITransferable); var data = { }; var length = { }; var currData = null; if (aAnyFlag) { var flavour = { }; trans.getAnyTransferData(flavour, data, length); if (data && flavour) { var selectedFlavour = aFlavourSet.flavourTable[flavour.value]; if (selectedFlavour) dataArray[i] = FlavourToXfer(data.value, length.value, selectedFlavour); } } else { var firstFlavour = aFlavourSet.flavours[0]; trans.getTransferData(firstFlavour, data, length); if (data && firstFlavour) dataArray[i] = FlavourToXfer(data.value, length.value, firstFlavour); }
|
get mDragService() { if (!this._mDS) { const kDSContractID = "@mozilla.org/widget/dragservice;1"; const kDSIID = Components.interfaces.nsIDragService; this._mDS = Components.classes[kDSContractID].getService(kDSIID); } return this._mDS; },
|
return this._mDS;
|
return new TransferDataSet(dataArray);
|
get mDragService() { if (!this._mDS) { const kDSContractID = "@mozilla.org/widget/dragservice;1"; const kDSIID = Components.interfaces.nsIDragService; this._mDS = Components.classes[kDSContractID].getService(kDSIID); } return this._mDS; },
|
get defaultString() { return this.mSelectedFilter; },
|
get defaultString() { return this.mDefaultString; },
|
get defaultString() { return this.mSelectedFilter; },
|
if (this.mContentDisposition) {
|
if ("mContentDisposition" in this) {
|
get suggestedFileName() { var fileName = ""; if (this.mContentDisposition) { const mhpContractID = "@mozilla.org/network/mime-hdrparam;1" const mhpIID = Components.interfaces.nsIMIMEHeaderParam; const mhp = Components.classes[mhpContractID].getService(mhpIID); var dummy = { value: null }; // To make JS engine happy. var charset = getCharsetforSave(null); try { fileName = mhp.getParameter(this.mContentDisposition, "filename", charset, true, dummy); } catch (e) { try { fileName = mhp.getParameter(this.mContentDisposition, "name", charset, true, dummy); } catch (e) { } } } fileName = fileName.replace(/^"|"$/g, ""); return fileName; }
|
new OperationListener());
|
new OperationListener(), null);
|
function GET(url, filename){ var file = makeFile(filename); var outstream = createInstance("@mozilla.org/network/file-output-stream;1", "nsIFileOutputStream"); outstream.init(file, 0x02 | 0x08, 0644, 0); var buffered = createInstance("@mozilla.org/network/buffered-output-stream;1", "nsIBufferedOutputStream"); buffered.init(outstream, 64 * 1024); davSvc.getToOutputStream(new Resource(url), buffered, new OperationListener()); runEventPump();}
|
document.getElementById("bookmarks-chevron").parentNode
|
document.getElementById("overflow-padder")
|
get mObservers () { if (!this._observers) { this._observers = [ document.getElementById("bookmarks-ptf"), document.getElementById("bookmarks-menu").parentNode, document.getElementById("bookmarks-chevron").parentNode ] } return this._observers; },
|
return IniObjectSerializer.encode(this._closedWindows);
|
return this._closedWindows;
|
get closedWindowData() { return IniObjectSerializer.encode(this._closedWindows); },
|
return Components.classes["@mozilla.org/preferences;1"] .getService(Components.interfaces.nsIPref);
|
return Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch);
|
get mPrefService() { return Components.classes["@mozilla.org/preferences;1"] .getService(Components.interfaces.nsIPref); },
|
get openWindowWithArgs() { return true; }
|
get wrappedJSObject() { return this; },
|
get openWindowWithArgs() { return true; }
|
this.sourceEvent = SRCEVT_BACKGROUND; if (this.update.selectedPatch && this.update.selectedPatch.state == STATE_PENDING) return document.getElementById("finishedBackground");
|
var p = this.update.selectedPatch; if (p) { switch (p.state) { case STATE_PENDING: this.sourceEvent = SRCEVT_BACKGROUND; return document.getElementById("finishedBackground"); case STATE_SUCCEEDED: return document.getElementById("installed"); case STATE_FAILED: return document.getElementById("errors"); } }
|
get startPage() { if (window.arguments) { var arg0 = window.arguments[0]; if (arg0 instanceof Components.interfaces.nsIUpdate) { // If the first argument is a nsIUpdate object, we are notifying the // user that the background checking found an update that requires // their permission to install, and it's ready for download. this.update = arg0; this.sourceEvent = SRCEVT_BACKGROUND; if (this.update.selectedPatch && this.update.selectedPatch.state == STATE_PENDING) return document.getElementById("finishedBackground"); return document.getElementById("updatesfound"); } } else { var um = Components.classes["@mozilla.org/updates/update-manager;1"]. getService(Components.interfaces.nsIUpdateManager); if (um.activeUpdate) { this.update = um.activeUpdate; return document.getElementById("downloading"); } } return document.getElementById("checking"); },
|
get resourceURL() { return this.mResourceURL;} ,
|
get suppressAlarms() { return false; },
|
get resourceURL() { return this.mResourceURL;} ,
|
return getCalendarManager().getCalendarPref(this, "READONLY") == 'true';
|
throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
|
get readOnly() { return getCalendarManager().getCalendarPref(this, "READONLY") == 'true'; },
|
dump("getter for loaded called\n");
|
debug("getter for loaded called\n");
|
get loaded() { dump("getter for loaded called\n"); return false; },
|
get selectedIndices() { var indices = []; var rangeCount = this.mTree.view.selection.getRangeCount(); for (var i = 0; i < rangeCount; i++) { var start = {}; var end = {}; this.mTree.view.selection.getRangeAt(i,start,end); for (var c = start.value; c <= end.value; c++) { indices.push(c); } } return indices; }
|
get subject() { return this.mSubject },
|
get selectedIndices() { var indices = []; var rangeCount = this.mTree.view.selection.getRangeCount(); for (var i = 0; i < rangeCount; i++) { var start = {}; var end = {}; this.mTree.view.selection.getRangeAt(i,start,end); for (var c = start.value; c <= end.value; c++) { indices.push(c); } } return indices; }
|
get data() { if (this.m_exc != null) throw this.m_exc; return this.m_data;
|
get exception() { return this.m_exc;
|
get data() { if (this.m_exc != null) throw this.m_exc; return this.m_data; },
|
get value() { if (!this._value) { if (this._pb.prefHasUserValue(this._pref)) { var valueString = this._pb.getCharPref(this._pref); this._value = this._serializable.deserialize(valueString); } else this._value = this._defaultValue; } return this._value;
|
get value() { return this.searchFilter.value;
|
get value() { if (!this._value) { if (this._pb.prefHasUserValue(this._pref)) { var valueString = this._pb.getCharPref(this._pref); this._value = this._serializable.deserialize(valueString); } else this._value = this._defaultValue; } return this._value; },
|
get readOnly() { throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
|
get canRefresh() { return true;
|
get readOnly() { throw Components.results.NS_ERROR_NOT_IMPLEMENTED; },
|
dataObject.checked = wsm.contentArea.document.getElementById( aElementID ).checked;
|
var checked = wsm.contentArea.document.getElementById( aElementID ).checked; dataObject.checked = element.getAttribute("reversed") == "true" ? !checked : checked;
|
get_Checkbox: function ( aElementID ) { var element = wsm.contentArea.document.getElementById( aElementID ); var dataObject = wsm.generic_Get( element ); if( dataObject ) { dataObject.checked = wsm.contentArea.document.getElementById( aElementID ).checked; return dataObject; } return null; },
|
function get_destination_channel(destinationDirectoryLocation, login, password)
|
function get_destination_channel(destinationDirectoryLocation)
|
function get_destination_channel(destinationDirectoryLocation, login, password){ var ioService = GetIOService(); if (!ioService) { return null; } // create a channel for the destination location destChannel = create_channel_from_url(ioService, destinationDirectoryLocation, login, password); if (!destChannel) { dump("can't create dest channel\n"); return null; } try { dump("about to set callbacks\n"); destChannel.notificationCallbacks = window.docshell; // docshell dump("notification callbacks set\n"); } catch(e) { dump(e+"\n"); } try { switch(destChannel.URI.scheme) { case 'http': case 'https': return destChannel.QueryInterface( Components.interfaces.nsIHttpChannel ); case 'ftp': return destChannel.QueryInterface( Components.interfaces.nsIFTPChannel ); case 'file': return destChannel.QueryInterface( Components.interfaces.nsIFileChannel ); default: return null; } } catch( e ) { return null; }}
|
destChannel = create_channel_from_url(ioService, destinationDirectoryLocation, login, password);
|
destChannel = create_channel_from_url(ioService, destinationDirectoryLocation);
|
function get_destination_channel(destinationDirectoryLocation, login, password){ var ioService = GetIOService(); if (!ioService) { return null; } // create a channel for the destination location destChannel = create_channel_from_url(ioService, destinationDirectoryLocation, login, password); if (!destChannel) { dump("can't create dest channel\n"); return null; } try { dump("about to set callbacks\n"); destChannel.notificationCallbacks = window.docshell; // docshell dump("notification callbacks set\n"); } catch(e) { dump(e+"\n"); } try { switch(destChannel.URI.scheme) { case 'http': case 'https': return destChannel.QueryInterface( Components.interfaces.nsIHttpChannel ); case 'ftp': return destChannel.QueryInterface( Components.interfaces.nsIFTPChannel ); case 'file': return destChannel.QueryInterface( Components.interfaces.nsIFileChannel ); default: return null; } } catch( e ) { return null; }}
|
destChannel.notificationCallbacks = window.docshell;
|
destChannel.notificationCallbacks = notificationCallbacks;
|
function get_destination_channel(destinationDirectoryLocation, login, password){ var ioService = GetIOService(); if (!ioService) { return null; } // create a channel for the destination location destChannel = create_channel_from_url(ioService, destinationDirectoryLocation, login, password); if (!destChannel) { dump("can't create dest channel\n"); return null; } try { dump("about to set callbacks\n"); destChannel.notificationCallbacks = window.docshell; // docshell dump("notification callbacks set\n"); } catch(e) { dump(e+"\n"); } try { switch(destChannel.URI.scheme) { case 'http': case 'https': return destChannel.QueryInterface( Components.interfaces.nsIHttpChannel ); case 'ftp': return destChannel.QueryInterface( Components.interfaces.nsIFTPChannel ); case 'file': return destChannel.QueryInterface( Components.interfaces.nsIFileChannel ); default: return null; } } catch( e ) { return null; }}
|
function get_destination_channel(destinationDirectoryLocation, fileName, login, password)
|
function get_destination_channel(destinationDirectoryLocation, login, password)
|
function get_destination_channel(destinationDirectoryLocation, fileName, login, password){ var ioService = GetIOService(); if (!ioService) { return null; } // create a channel for the destination location var fullurl = destinationDirectoryLocation + fileName; destChannel = create_channel_from_url(ioService, fullurl, login, password); if (!destChannel) { dump("can't create dest channel\n"); return null; } try { dump("about to set callbacks\n"); destChannel.notificationCallbacks = window.docshell; // docshell dump("notification callbacks set\n"); } catch(e) { dump(e+"\n"); } try { switch(destChannel.URI.scheme) { case 'http': case 'https': return destChannel.QueryInterface( Components.interfaces.nsIHttpChannel ); case 'ftp': return destChannel.QueryInterface( Components.interfaces.nsIFTPChannel ); case 'file': return destChannel.QueryInterface( Components.interfaces.nsIFileChannel ); default: return null; } } catch( e ) { return null; }}
|
var fullurl = destinationDirectoryLocation + fileName;
|
var fullurl = destinationDirectoryLocation;
|
function get_destination_channel(destinationDirectoryLocation, fileName, login, password){ var ioService = GetIOService(); if (!ioService) { return null; } // create a channel for the destination location var fullurl = destinationDirectoryLocation + fileName; destChannel = create_channel_from_url(ioService, fullurl, login, password); if (!destChannel) { dump("can't create dest channel\n"); return null; } try { dump("about to set callbacks\n"); destChannel.notificationCallbacks = window.docshell; // docshell dump("notification callbacks set\n"); } catch(e) { dump(e+"\n"); } try { switch(destChannel.URI.scheme) { case 'http': case 'https': return destChannel.QueryInterface( Components.interfaces.nsIHttpChannel ); case 'ftp': return destChannel.QueryInterface( Components.interfaces.nsIFTPChannel ); case 'file': return destChannel.QueryInterface( Components.interfaces.nsIFileChannel ); default: return null; } } catch( e ) { return null; }}
|
dataObject.data = element.getAttribute( "data" );
|
dataObject.value = element.getAttribute( "value" );
|
get_Menulist: function ( aElementID ) { var element = wsm.contentArea.document.getElementById( aElementID ); // retrieve all generic attributes var dataObject = wsm.generic_Get( element ); // retrieve all menulist specific attributes if( dataObject ) { dataObject.data = element.getAttribute( "data" ); return dataObject; } return null; },
|
dataObject.data = element.getAttribute( "data" );
|
dataObject.value = element.getAttribute( "value" );
|
get_Radiogroup: function ( aElementID ) { var element = wsm.contentArea.document.getElementById( aElementID ); var dataObject = wsm.generic_Get( element ); if( dataObject ) { dataObject.data = element.getAttribute( "data" ); return dataObject; } return null; },
|
var prefs = Components.classes['@mozilla.org/preferences;1']; if (prefs) { prefs = prefs.getService();
|
var prefs = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); var locale; try { url = prefs.getCharPref("sidebar.customize.all_panels.url"); url = url.replace(/%SIDEBAR_VERSION%/g, SIDEBAR_VERSION); } catch(ex) { debug("Unable to get remote url pref. What now? "+ex);
|
function get_remote_datasource_url() { var url = ''; var prefs = Components.classes['@mozilla.org/preferences;1']; if (prefs) { prefs = prefs.getService(); } if (prefs) { prefs = prefs.QueryInterface(Components.interfaces.nsIPref); } if (prefs) { var locale; try { url = prefs.CopyCharPref("sidebar.customize.all_panels.url"); url = url.replace(/%SIDEBAR_VERSION%/g, SIDEBAR_VERSION); } catch(ex) { debug("Unable to get remote url pref. What now? "+ex); } try { locale = prefs.getLocalizedUnicharPref("intl.content.langcode"); } catch(ex) { try { debug("No lang code pref, intl.content.langcode."); debug("Use locale from user agent string instead"); locale = prefs.getLocalizedUnicharPref("general.useragent.locale"); } catch(ex) { debug("Unable to get system locale. What now? "+ex); } } locale = locale.toLowerCase(); url = url.replace(/%LOCALE%/g, locale); debug("Remote url is " + url); } return url;}
|
if (prefs) { prefs = prefs.QueryInterface(Components.interfaces.nsIPref);
|
try { locale = prefs.getComplexValue("intl.content.langcode", Components.interfaces.nsIPrefLocalizedString); } catch(ex) { try { debug("No lang code pref, intl.content.langcode."); debug("Use locale from user agent string instead"); locale = prefs.getComplexValue("general.useragent.locale", Components.interfaces.nsIPrefLocalizedString); } catch(ex) { debug("Unable to get system locale. What now? "+ex); }
|
function get_remote_datasource_url() { var url = ''; var prefs = Components.classes['@mozilla.org/preferences;1']; if (prefs) { prefs = prefs.getService(); } if (prefs) { prefs = prefs.QueryInterface(Components.interfaces.nsIPref); } if (prefs) { var locale; try { url = prefs.CopyCharPref("sidebar.customize.all_panels.url"); url = url.replace(/%SIDEBAR_VERSION%/g, SIDEBAR_VERSION); } catch(ex) { debug("Unable to get remote url pref. What now? "+ex); } try { locale = prefs.getLocalizedUnicharPref("intl.content.langcode"); } catch(ex) { try { debug("No lang code pref, intl.content.langcode."); debug("Use locale from user agent string instead"); locale = prefs.getLocalizedUnicharPref("general.useragent.locale"); } catch(ex) { debug("Unable to get system locale. What now? "+ex); } } locale = locale.toLowerCase(); url = url.replace(/%LOCALE%/g, locale); debug("Remote url is " + url); } return url;}
|
if (prefs) { var locale; try { url = prefs.CopyCharPref("sidebar.customize.all_panels.url"); url = url.replace(/%SIDEBAR_VERSION%/g, SIDEBAR_VERSION); } catch(ex) { debug("Unable to get remote url pref. What now? "+ex); } try { locale = prefs.getLocalizedUnicharPref("intl.content.langcode"); } catch(ex) { try { debug("No lang code pref, intl.content.langcode."); debug("Use locale from user agent string instead");
|
locale = locale.toLowerCase(); url = url.replace(/%LOCALE%/g, locale);
|
function get_remote_datasource_url() { var url = ''; var prefs = Components.classes['@mozilla.org/preferences;1']; if (prefs) { prefs = prefs.getService(); } if (prefs) { prefs = prefs.QueryInterface(Components.interfaces.nsIPref); } if (prefs) { var locale; try { url = prefs.CopyCharPref("sidebar.customize.all_panels.url"); url = url.replace(/%SIDEBAR_VERSION%/g, SIDEBAR_VERSION); } catch(ex) { debug("Unable to get remote url pref. What now? "+ex); } try { locale = prefs.getLocalizedUnicharPref("intl.content.langcode"); } catch(ex) { try { debug("No lang code pref, intl.content.langcode."); debug("Use locale from user agent string instead"); locale = prefs.getLocalizedUnicharPref("general.useragent.locale"); } catch(ex) { debug("Unable to get system locale. What now? "+ex); } } locale = locale.toLowerCase(); url = url.replace(/%LOCALE%/g, locale); debug("Remote url is " + url); } return url;}
|
locale = prefs.getLocalizedUnicharPref("general.useragent.locale"); } catch(ex) { debug("Unable to get system locale. What now? "+ex); } } locale = locale.toLowerCase(); url = url.replace(/%LOCALE%/g, locale); debug("Remote url is " + url); }
|
debug("Remote url is " + url);
|
function get_remote_datasource_url() { var url = ''; var prefs = Components.classes['@mozilla.org/preferences;1']; if (prefs) { prefs = prefs.getService(); } if (prefs) { prefs = prefs.QueryInterface(Components.interfaces.nsIPref); } if (prefs) { var locale; try { url = prefs.CopyCharPref("sidebar.customize.all_panels.url"); url = url.replace(/%SIDEBAR_VERSION%/g, SIDEBAR_VERSION); } catch(ex) { debug("Unable to get remote url pref. What now? "+ex); } try { locale = prefs.getLocalizedUnicharPref("intl.content.langcode"); } catch(ex) { try { debug("No lang code pref, intl.content.langcode."); debug("Use locale from user agent string instead"); locale = prefs.getLocalizedUnicharPref("general.useragent.locale"); } catch(ex) { debug("Unable to get system locale. What now? "+ex); } } locale = locale.toLowerCase(); url = url.replace(/%LOCALE%/g, locale); debug("Remote url is " + url); } return url;}
|
return GetAbResultsTree().treeBoxObject;
|
return gAbResultsTree.treeBoxObject;
|
function GetAbResultsBoxObject(){ return GetAbResultsTree().treeBoxObject;}
|
var rdf = Components.classes["component: if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); if (rdf && ds) { var src = rdf.GetResource(url, true); var prop = rdf.GetResource("http: var target = ds.GetTarget(src, prop, true); if (target) target = target.QueryInterface(Components.interfaces.nsIRDFLiteral); if (target) target = target.Value; if (target) url = target; } } catch(ex) { } return(url);
|
var rdf_uri = "component: var rdf = Components.classes[rdf_uri].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); if (rdf && ds) { var src = rdf.GetResource(url, true); var prop = rdf.GetResource(NC + "URL", true); var target = ds.GetTarget(src, prop, true); if (target) target = target.QueryInterface(Components.interfaces.nsIRDFLiteral); if (target) target = target.Value; if (target) url = target; } } catch(ex) { } return url;
|
function getAbsoluteID(root, node){ var url = node.getAttribute("ref"); if ((url == null) || (url == "")) { url = node.getAttribute("id"); } try { var rootNode = document.getElementById(root); var ds = null; if (rootNode) { ds = rootNode.database; } // add support for anonymous resources such as Internet Search results, // IE favorites under Win32, and NetPositive URLs under BeOS var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); if (rdf && ds) { var src = rdf.GetResource(url, true); var prop = rdf.GetResource("http://home.netscape.com/NC-rdf#URL", true); var target = ds.GetTarget(src, prop, true); if (target) target = target.QueryInterface(Components.interfaces.nsIRDFLiteral); if (target) target = target.Value; if (target) url = target; } } catch(ex) { } return(url);}
|
var URL = ioService.newURI(doc.location.href, null);
|
var URL = ioService.newURI(doc.location.href, null, null);
|
function getAbsoluteURL(url, node){ if (!url || !node) return ""; var urlArr = new Array(url); var doc = node.ownerDocument; if (node.nodeType == Node.ATTRIBUTE_NODE) node = node.ownerElement; while (node && node.nodeType == Node.ELEMENT_NODE) { var att = node.getAttributeNS(XMLNS, "base"); if (att != "") urlArr.unshift(att); node = node.parentNode; } // Look for a <base>. var baseTags = doc.getElementsByTagNameNS(XHTMLNS, "base"); if (baseTags && baseTags.length) { urlArr.unshift(baseTags[baseTags.length - 1].getAttribute("href")); } // resolve everything from bottom up, starting with document location var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService); var URL = ioService.newURI(doc.location.href, null); for (var i=0; i<urlArr.length; i++) { URL.spec = URL.resolve(urlArr[i]); } return URL.spec;}
|
var URL = ioService.newURI(doc.location.href, null);
|
var URL = ioService.newURI(doc.location.href, null, null);
|
function getAbsoluteURL(url, node){ if (!url || !node) return ""; var urlArr = new Array(url); var doc = node.ownerDocument; if (node.nodeType == Node.ATTRIBUTE_NODE) node = node.ownerElement; while (node && node.nodeType == Node.ELEMENT_NODE) { if (node.getAttributeNS(XMLNS, "base") != "") urlArr.unshift(node.getAttributeNS(XMLNS, "base")); node = node.parentNode; } // Look for a <base>. var baseTags = getHTMLElements(doc,"base"); if (baseTags && baseTags.length) { urlArr.unshift(baseTags[baseTags.length - 1].getAttribute("href")); } // resolve everything from bottom up, starting with document location var ioService = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); var URL = ioService.newURI(doc.location.href, null); for (var i=0; i<urlArr.length; i++) { URL.spec = URL.resolve(urlArr[i]); } return URL.spec;}
|
return;
|
return null;
|
function getAccountFromServerId(serverId) { // get the account by dipping into RDF and then into the acount manager var serverResource = RDF.GetResource(serverId); try { var serverFolder = serverResource.QueryInterface(Components.interfaces.nsIMsgFolder); } catch (ex) { return; } var incomingServer = serverFolder.server; var account = accountManager.FindAccountForServer(incomingServer); return account;}
|
return null;
|
function getAccountFromServerId(serverId) { // get the account by dipping into RDF and then into the acount manager var serverResource = RDF.GetResource(serverId); try { var serverFolder = serverResource.QueryInterface(Components.interfaces.nsIMsgFolder); var incomingServer = serverFolder.server; var account = accountManager.FindAccountForServer(incomingServer); return account; } catch (ex) { return null; }}
|
|
return null;
|
function getAccountFromServerId(serverId) { // get the account by dipping into RDF and then into the acount manager var serverResource = RDF.GetResource(serverId); try { var serverFolder = serverResource.QueryInterface(Components.interfaces.nsIMsgFolder); var incomingServer = serverFolder.server; var account = accountManager.FindAccountForServer(incomingServer); return account; } catch (ex) { return null; }}
|
|
var serverFolder = serverResource.QueryInterface(Components.interfaces.nsIMsgFolder);
|
var serverFolder = serverResource.QueryInterface(Components.interfaces.nsIMsgFolder); var incomingServer = serverFolder.server; var account = accountManager.FindAccountForServer(incomingServer); return account;
|
function getAccountFromServerId(serverId) { // get the account by dipping into RDF and then into the acount manager var serverResource = RDF.GetResource(serverId); try { var serverFolder = serverResource.QueryInterface(Components.interfaces.nsIMsgFolder); } catch (ex) { return null; } var incomingServer = serverFolder.server; var account = accountManager.FindAccountForServer(incomingServer); return account;}
|
var incomingServer = serverFolder.server; var account = accountManager.FindAccountForServer(incomingServer); return account;
|
function getAccountFromServerId(serverId) { // get the account by dipping into RDF and then into the acount manager var serverResource = RDF.GetResource(serverId); try { var serverFolder = serverResource.QueryInterface(Components.interfaces.nsIMsgFolder); } catch (ex) { return null; } var incomingServer = serverFolder.server; var account = accountManager.FindAccountForServer(incomingServer); return account;}
|
|
return PROT_GlobalStore.getPref_("safebrowsing.provider.0.reportURL");
|
return PROT_GlobalStore.getPref_("browser.safebrowsing.provider.0.reportURL");
|
PROT_GlobalStore.getActionReportURL = function() { return PROT_GlobalStore.getPref_("safebrowsing.provider.0.reportURL");}
|
getAdditionalDataForItem: function (item) { if (item.flags & CAL_ITEM_FLAG_HAS_ATTENDEES) {
|
getAdditionalDataForItem: function (item, flags) { if (flags & CAL_ITEM_FLAG_HAS_ATTENDEES) {
|
getAdditionalDataForItem: function (item) { if (item.flags & CAL_ITEM_FLAG_HAS_ATTENDEES) { this.mSelectAttendeesForItem.params.event_id = item.id; while (this.mSelectAttendeesForItem.step()) { var attendee = this.mNewAttendeeFromRow(this.mSelectAttendeesForItem.row); item.addAttendee(attendee); } this.mSelectAttendeesForItem.reset(); } if (item.flags & CAL_ITEM_FLAG_HAS_PROPERTIES) { this.mSelectPropertiesForItem.params.item_id = item.id; // ... } if (item.flags & CAL_ITEM_FLAG_HAS_RECURRENCE) { this.mSelectRecurrenceForItem.params.item_id = item.id; if (this.mSelectRecurrenceForItem.step()) { var row = this.mSelectRecurrenceForItem.row; var rec = item.rec; rec.recur_type = row.recur_type; rec.count = row.count; var rtypes = [calIRecurrenceInfo.CAL_RECUR_BYSECOND, "second", calIRecurrenceInfo.CAL_RECUR_BYMINUTE, "minute", calIRecurrenceInfo.CAL_RECUR_BYHOUR, "hour", calIRecurrenceInfo.CAL_RECUR_BYDAY, "day", calIRecurrenceInfo.CAL_RECUR_BYMONTHDAY, "monthday", calIRecurrenceInfo.CAL_RECUR_BYYEARDAY, "yearday", calIRecurrenceInfo.CAL_RECUR_BYWEEKNO, "weekno", calIRecurrenceInfo.CAL_RECUR_BYMONTH, "month", calIRecurrenceInfo.CAL_RECUR_BYSETPOS, "setpos"]; for (var i = 0; i < rtypes.length; i += 2) { if (row[rtypes[i+1]]) { var rstr = row[rtypes[i+1]].split(","); var rarray = []; for (var j = 0; j < rstr.length; j++) { rarray[j] = parseInt(rstr[j]); } rec.setComponent (rtypes[i], rarray.length, rarray); } } } else { dump ("+++ Expected to find recurrence for item " + item.id + ", but found none\n"); } this.mSelectRecurrenceForItem.reset(); } },
|
if (item.flags & CAL_ITEM_FLAG_HAS_PROPERTIES) {
|
if (flags & CAL_ITEM_FLAG_HAS_PROPERTIES) {
|
getAdditionalDataForItem: function (item) { if (item.flags & CAL_ITEM_FLAG_HAS_ATTENDEES) { this.mSelectAttendeesForItem.params.event_id = item.id; while (this.mSelectAttendeesForItem.step()) { var attendee = this.mNewAttendeeFromRow(this.mSelectAttendeesForItem.row); item.addAttendee(attendee); } this.mSelectAttendeesForItem.reset(); } if (item.flags & CAL_ITEM_FLAG_HAS_PROPERTIES) { this.mSelectPropertiesForItem.params.item_id = item.id; // ... } if (item.flags & CAL_ITEM_FLAG_HAS_RECURRENCE) { this.mSelectRecurrenceForItem.params.item_id = item.id; if (this.mSelectRecurrenceForItem.step()) { var row = this.mSelectRecurrenceForItem.row; var rec = item.rec; rec.recur_type = row.recur_type; rec.count = row.count; var rtypes = [calIRecurrenceInfo.CAL_RECUR_BYSECOND, "second", calIRecurrenceInfo.CAL_RECUR_BYMINUTE, "minute", calIRecurrenceInfo.CAL_RECUR_BYHOUR, "hour", calIRecurrenceInfo.CAL_RECUR_BYDAY, "day", calIRecurrenceInfo.CAL_RECUR_BYMONTHDAY, "monthday", calIRecurrenceInfo.CAL_RECUR_BYYEARDAY, "yearday", calIRecurrenceInfo.CAL_RECUR_BYWEEKNO, "weekno", calIRecurrenceInfo.CAL_RECUR_BYMONTH, "month", calIRecurrenceInfo.CAL_RECUR_BYSETPOS, "setpos"]; for (var i = 0; i < rtypes.length; i += 2) { if (row[rtypes[i+1]]) { var rstr = row[rtypes[i+1]].split(","); var rarray = []; for (var j = 0; j < rstr.length; j++) { rarray[j] = parseInt(rstr[j]); } rec.setComponent (rtypes[i], rarray.length, rarray); } } } else { dump ("+++ Expected to find recurrence for item " + item.id + ", but found none\n"); } this.mSelectRecurrenceForItem.reset(); } },
|
if (item.flags & CAL_ITEM_FLAG_HAS_RECURRENCE) {
|
if (flags & CAL_ITEM_FLAG_HAS_RECURRENCE) { dump ("item " + item.id + " has recurrence\n");
|
getAdditionalDataForItem: function (item) { if (item.flags & CAL_ITEM_FLAG_HAS_ATTENDEES) { this.mSelectAttendeesForItem.params.event_id = item.id; while (this.mSelectAttendeesForItem.step()) { var attendee = this.mNewAttendeeFromRow(this.mSelectAttendeesForItem.row); item.addAttendee(attendee); } this.mSelectAttendeesForItem.reset(); } if (item.flags & CAL_ITEM_FLAG_HAS_PROPERTIES) { this.mSelectPropertiesForItem.params.item_id = item.id; // ... } if (item.flags & CAL_ITEM_FLAG_HAS_RECURRENCE) { this.mSelectRecurrenceForItem.params.item_id = item.id; if (this.mSelectRecurrenceForItem.step()) { var row = this.mSelectRecurrenceForItem.row; var rec = item.rec; rec.recur_type = row.recur_type; rec.count = row.count; var rtypes = [calIRecurrenceInfo.CAL_RECUR_BYSECOND, "second", calIRecurrenceInfo.CAL_RECUR_BYMINUTE, "minute", calIRecurrenceInfo.CAL_RECUR_BYHOUR, "hour", calIRecurrenceInfo.CAL_RECUR_BYDAY, "day", calIRecurrenceInfo.CAL_RECUR_BYMONTHDAY, "monthday", calIRecurrenceInfo.CAL_RECUR_BYYEARDAY, "yearday", calIRecurrenceInfo.CAL_RECUR_BYWEEKNO, "weekno", calIRecurrenceInfo.CAL_RECUR_BYMONTH, "month", calIRecurrenceInfo.CAL_RECUR_BYSETPOS, "setpos"]; for (var i = 0; i < rtypes.length; i += 2) { if (row[rtypes[i+1]]) { var rstr = row[rtypes[i+1]].split(","); var rarray = []; for (var j = 0; j < rstr.length; j++) { rarray[j] = parseInt(rstr[j]); } rec.setComponent (rtypes[i], rarray.length, rarray); } } } else { dump ("+++ Expected to find recurrence for item " + item.id + ", but found none\n"); } this.mSelectRecurrenceForItem.reset(); } },
|
var rec = item.rec;
|
var rec = new CalRecurrenceInfo();
|
getAdditionalDataForItem: function (item) { if (item.flags & CAL_ITEM_FLAG_HAS_ATTENDEES) { this.mSelectAttendeesForItem.params.event_id = item.id; while (this.mSelectAttendeesForItem.step()) { var attendee = this.mNewAttendeeFromRow(this.mSelectAttendeesForItem.row); item.addAttendee(attendee); } this.mSelectAttendeesForItem.reset(); } if (item.flags & CAL_ITEM_FLAG_HAS_PROPERTIES) { this.mSelectPropertiesForItem.params.item_id = item.id; // ... } if (item.flags & CAL_ITEM_FLAG_HAS_RECURRENCE) { this.mSelectRecurrenceForItem.params.item_id = item.id; if (this.mSelectRecurrenceForItem.step()) { var row = this.mSelectRecurrenceForItem.row; var rec = item.rec; rec.recur_type = row.recur_type; rec.count = row.count; var rtypes = [calIRecurrenceInfo.CAL_RECUR_BYSECOND, "second", calIRecurrenceInfo.CAL_RECUR_BYMINUTE, "minute", calIRecurrenceInfo.CAL_RECUR_BYHOUR, "hour", calIRecurrenceInfo.CAL_RECUR_BYDAY, "day", calIRecurrenceInfo.CAL_RECUR_BYMONTHDAY, "monthday", calIRecurrenceInfo.CAL_RECUR_BYYEARDAY, "yearday", calIRecurrenceInfo.CAL_RECUR_BYWEEKNO, "weekno", calIRecurrenceInfo.CAL_RECUR_BYMONTH, "month", calIRecurrenceInfo.CAL_RECUR_BYSETPOS, "setpos"]; for (var i = 0; i < rtypes.length; i += 2) { if (row[rtypes[i+1]]) { var rstr = row[rtypes[i+1]].split(","); var rarray = []; for (var j = 0; j < rstr.length; j++) { rarray[j] = parseInt(rstr[j]); } rec.setComponent (rtypes[i], rarray.length, rarray); } } } else { dump ("+++ Expected to find recurrence for item " + item.id + ", but found none\n"); } this.mSelectRecurrenceForItem.reset(); } },
|
rec.recur_type = row.recur_type; rec.count = row.count;
|
rec.recurType = row.recur_type; rec.recurCount = row.count; rec.interval = row.interval;
|
getAdditionalDataForItem: function (item) { if (item.flags & CAL_ITEM_FLAG_HAS_ATTENDEES) { this.mSelectAttendeesForItem.params.event_id = item.id; while (this.mSelectAttendeesForItem.step()) { var attendee = this.mNewAttendeeFromRow(this.mSelectAttendeesForItem.row); item.addAttendee(attendee); } this.mSelectAttendeesForItem.reset(); } if (item.flags & CAL_ITEM_FLAG_HAS_PROPERTIES) { this.mSelectPropertiesForItem.params.item_id = item.id; // ... } if (item.flags & CAL_ITEM_FLAG_HAS_RECURRENCE) { this.mSelectRecurrenceForItem.params.item_id = item.id; if (this.mSelectRecurrenceForItem.step()) { var row = this.mSelectRecurrenceForItem.row; var rec = item.rec; rec.recur_type = row.recur_type; rec.count = row.count; var rtypes = [calIRecurrenceInfo.CAL_RECUR_BYSECOND, "second", calIRecurrenceInfo.CAL_RECUR_BYMINUTE, "minute", calIRecurrenceInfo.CAL_RECUR_BYHOUR, "hour", calIRecurrenceInfo.CAL_RECUR_BYDAY, "day", calIRecurrenceInfo.CAL_RECUR_BYMONTHDAY, "monthday", calIRecurrenceInfo.CAL_RECUR_BYYEARDAY, "yearday", calIRecurrenceInfo.CAL_RECUR_BYWEEKNO, "weekno", calIRecurrenceInfo.CAL_RECUR_BYMONTH, "month", calIRecurrenceInfo.CAL_RECUR_BYSETPOS, "setpos"]; for (var i = 0; i < rtypes.length; i += 2) { if (row[rtypes[i+1]]) { var rstr = row[rtypes[i+1]].split(","); var rarray = []; for (var j = 0; j < rstr.length; j++) { rarray[j] = parseInt(rstr[j]); } rec.setComponent (rtypes[i], rarray.length, rarray); } } } else { dump ("+++ Expected to find recurrence for item " + item.id + ", but found none\n"); } this.mSelectRecurrenceForItem.reset(); } },
|
var rtypes = [calIRecurrenceInfo.CAL_RECUR_BYSECOND, "second", calIRecurrenceInfo.CAL_RECUR_BYMINUTE, "minute", calIRecurrenceInfo.CAL_RECUR_BYHOUR, "hour", calIRecurrenceInfo.CAL_RECUR_BYDAY, "day", calIRecurrenceInfo.CAL_RECUR_BYMONTHDAY, "monthday", calIRecurrenceInfo.CAL_RECUR_BYYEARDAY, "yearday", calIRecurrenceInfo.CAL_RECUR_BYWEEKNO, "weekno", calIRecurrenceInfo.CAL_RECUR_BYMONTH, "month", calIRecurrenceInfo.CAL_RECUR_BYSETPOS, "setpos"];
|
if (item instanceof kCalIEvent) rec.recurStart = item.startDate; else if (item instanceof kCalITodo) rec.recurStart = item.entryTime; var rtypes = [kCalIRecurrenceInfo.CAL_RECUR_BYSECOND, "second", kCalIRecurrenceInfo.CAL_RECUR_BYMINUTE, "minute", kCalIRecurrenceInfo.CAL_RECUR_BYHOUR, "hour", kCalIRecurrenceInfo.CAL_RECUR_BYDAY, "day", kCalIRecurrenceInfo.CAL_RECUR_BYMONTHDAY, "monthday", kCalIRecurrenceInfo.CAL_RECUR_BYYEARDAY, "yearday", kCalIRecurrenceInfo.CAL_RECUR_BYWEEKNO, "weekno", kCalIRecurrenceInfo.CAL_RECUR_BYMONTH, "month", kCalIRecurrenceInfo.CAL_RECUR_BYSETPOS, "setpos"];
|
getAdditionalDataForItem: function (item) { if (item.flags & CAL_ITEM_FLAG_HAS_ATTENDEES) { this.mSelectAttendeesForItem.params.event_id = item.id; while (this.mSelectAttendeesForItem.step()) { var attendee = this.mNewAttendeeFromRow(this.mSelectAttendeesForItem.row); item.addAttendee(attendee); } this.mSelectAttendeesForItem.reset(); } if (item.flags & CAL_ITEM_FLAG_HAS_PROPERTIES) { this.mSelectPropertiesForItem.params.item_id = item.id; // ... } if (item.flags & CAL_ITEM_FLAG_HAS_RECURRENCE) { this.mSelectRecurrenceForItem.params.item_id = item.id; if (this.mSelectRecurrenceForItem.step()) { var row = this.mSelectRecurrenceForItem.row; var rec = item.rec; rec.recur_type = row.recur_type; rec.count = row.count; var rtypes = [calIRecurrenceInfo.CAL_RECUR_BYSECOND, "second", calIRecurrenceInfo.CAL_RECUR_BYMINUTE, "minute", calIRecurrenceInfo.CAL_RECUR_BYHOUR, "hour", calIRecurrenceInfo.CAL_RECUR_BYDAY, "day", calIRecurrenceInfo.CAL_RECUR_BYMONTHDAY, "monthday", calIRecurrenceInfo.CAL_RECUR_BYYEARDAY, "yearday", calIRecurrenceInfo.CAL_RECUR_BYWEEKNO, "weekno", calIRecurrenceInfo.CAL_RECUR_BYMONTH, "month", calIRecurrenceInfo.CAL_RECUR_BYSETPOS, "setpos"]; for (var i = 0; i < rtypes.length; i += 2) { if (row[rtypes[i+1]]) { var rstr = row[rtypes[i+1]].split(","); var rarray = []; for (var j = 0; j < rstr.length; j++) { rarray[j] = parseInt(rstr[j]); } rec.setComponent (rtypes[i], rarray.length, rarray); } } } else { dump ("+++ Expected to find recurrence for item " + item.id + ", but found none\n"); } this.mSelectRecurrenceForItem.reset(); } },
|
item.recurrenceInfo = rec;
|
getAdditionalDataForItem: function (item) { if (item.flags & CAL_ITEM_FLAG_HAS_ATTENDEES) { this.mSelectAttendeesForItem.params.event_id = item.id; while (this.mSelectAttendeesForItem.step()) { var attendee = this.mNewAttendeeFromRow(this.mSelectAttendeesForItem.row); item.addAttendee(attendee); } this.mSelectAttendeesForItem.reset(); } if (item.flags & CAL_ITEM_FLAG_HAS_PROPERTIES) { this.mSelectPropertiesForItem.params.item_id = item.id; // ... } if (item.flags & CAL_ITEM_FLAG_HAS_RECURRENCE) { this.mSelectRecurrenceForItem.params.item_id = item.id; if (this.mSelectRecurrenceForItem.step()) { var row = this.mSelectRecurrenceForItem.row; var rec = item.rec; rec.recur_type = row.recur_type; rec.count = row.count; var rtypes = [calIRecurrenceInfo.CAL_RECUR_BYSECOND, "second", calIRecurrenceInfo.CAL_RECUR_BYMINUTE, "minute", calIRecurrenceInfo.CAL_RECUR_BYHOUR, "hour", calIRecurrenceInfo.CAL_RECUR_BYDAY, "day", calIRecurrenceInfo.CAL_RECUR_BYMONTHDAY, "monthday", calIRecurrenceInfo.CAL_RECUR_BYYEARDAY, "yearday", calIRecurrenceInfo.CAL_RECUR_BYWEEKNO, "weekno", calIRecurrenceInfo.CAL_RECUR_BYMONTH, "month", calIRecurrenceInfo.CAL_RECUR_BYSETPOS, "setpos"]; for (var i = 0; i < rtypes.length; i += 2) { if (row[rtypes[i+1]]) { var rstr = row[rtypes[i+1]].split(","); var rarray = []; for (var j = 0; j < rstr.length; j++) { rarray[j] = parseInt(rstr[j]); } rec.setComponent (rtypes[i], rarray.length, rarray); } } } else { dump ("+++ Expected to find recurrence for item " + item.id + ", but found none\n"); } this.mSelectRecurrenceForItem.reset(); } },
|
|
}
|
},
|
getAlignedTimezone: function( tzid ) { // check whether it is one of cs: if (tzid.indexOf("/mozilla.org/") == 0) { // cut mozilla prefix: assuming that the latter string portion // semantically equals the demanded timezone tzid = tzid.substring( // next slash after "/mozilla.org/" tzid.indexOf("/", "/mozilla.org/".length) + 1 ); } if (!this.session.isSupportedTimezone(tzid)) { // xxx todo: we could further on search for a matching region, // e.g. CET (in TZNAME), but for now stick to // user's default if not supported directly var ret = this.defaultTimezone; // use calendar's default: this.log(tzid + " not supported, falling back to default: " + ret); return ret; } else // is ok (supported): return tzid; }
|
if (tzid.indexOf("/mozilla.org/20050126_1/") == 0 || !this.session.isSupportedTimezone(tzid)) {
|
if (tzid.indexOf("/mozilla.org/") == 0) { tzid = tzid.substring( tzid.indexOf("/", "/mozilla.org/".length) + 1 ); } if (!this.session.isSupportedTimezone(tzid)) { var ret = this.defaultTimezone;
|
getAlignedTimezone: function( tzid ) { // check whether it is one of cs: if (tzid.indexOf("/mozilla.org/20050126_1/") == 0 || !this.session.isSupportedTimezone(tzid)) { // use calendar's default: return this.defaultTimezone; } else // is ok (supported): return tzid; }
|
return this.defaultTimezone;
|
this.log( tzid + " not supported, falling back to default: " + ret); return ret;
|
getAlignedTimezone: function( tzid ) { // check whether it is one of cs: if (tzid.indexOf("/mozilla.org/20050126_1/") == 0 || !this.session.isSupportedTimezone(tzid)) { // use calendar's default: return this.defaultTimezone; } else // is ok (supported): return tzid; }
|
commands = ["open", "find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "rename", "separator", "bm_fileBookmark", "separator", "newfolder",
|
commands = ["open", "find", "separator", "bm_cut", "bm_copylink", "bm_copy", "bm_paste", "bm_delete", "separator", "rename", "separator", "bm_fileBookmark", "separator", "newfolder",
|
getAllCmds: function (aNodeID) { var type = this.resolveType(aNodeID); if (!type) { if (aNodeID == "NC:PersonalToolbarFolder" || aNodeID == "NC:BookmarksRoot") type = "http://home.netscape.com/NC-rdf#Folder"; else return null; } var commands = []; switch (type) { case "http://home.netscape.com/NC-rdf#BookmarkSeparator": commands = ["find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "bm_fileBookmark", "separator", "newfolder"]; break; case "http://home.netscape.com/NC-rdf#Bookmark": commands = ["open", "find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "rename", "separator", "bm_fileBookmark", "separator", "newfolder", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#Folder": commands = ["openfolder", "openfolderinnewwindow", "find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "rename", "separator", "bm_fileBookmark", "separator", "newfolder", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavoriteFolder": commands = ["open", "find", "separator", "bm_copy", "separator", "rename", "separator", "bm_fileBookmark", "separator", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavorite": commands = ["open", "find", "separator", "bm_copy"]; break; case "http://home.netscape.com/NC-rdf#FileSystemObject": commands = ["open", "find", "separator", "bm_copy"]; break; default: var source = this.RDF.GetResource(aNodeID); return this.db.GetAllCmds(source); } return new CommandArrayEnumerator(commands); },
|
commands = ["open", "find", "separator", "bm_copy"];
|
commands = ["open", "find", "separator", "bm_copylink", "bm_copy"];
|
getAllCmds: function (aNodeID) { var type = this.resolveType(aNodeID); if (!type) { if (aNodeID == "NC:PersonalToolbarFolder" || aNodeID == "NC:BookmarksRoot") type = "http://home.netscape.com/NC-rdf#Folder"; else return null; } var commands = []; switch (type) { case "http://home.netscape.com/NC-rdf#BookmarkSeparator": commands = ["find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "bm_fileBookmark", "separator", "newfolder"]; break; case "http://home.netscape.com/NC-rdf#Bookmark": commands = ["open", "find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "rename", "separator", "bm_fileBookmark", "separator", "newfolder", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#Folder": commands = ["openfolder", "openfolderinnewwindow", "find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "rename", "separator", "bm_fileBookmark", "separator", "newfolder", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavoriteFolder": commands = ["open", "find", "separator", "bm_copy", "separator", "rename", "separator", "bm_fileBookmark", "separator", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavorite": commands = ["open", "find", "separator", "bm_copy"]; break; case "http://home.netscape.com/NC-rdf#FileSystemObject": commands = ["open", "find", "separator", "bm_copy"]; break; default: var source = this.RDF.GetResource(aNodeID); return this.db.GetAllCmds(source); } return new CommandArrayEnumerator(commands); },
|
"bm_delete", "separator", "newfolder"];
|
"bm_delete", "separator", "bm_fileBookmark", "separator", "newfolder"];
|
getAllCmds: function (aNodeID) { var type = this.resolveType(aNodeID); var commands = []; switch (type) { case "http://home.netscape.com/NC-rdf#BookmarkSeparator": commands = ["find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "newfolder"]; break; case "http://home.netscape.com/NC-rdf#Bookmark": commands = ["open", "find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "rename", "separator", "newfolder", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#Folder": commands = ["openfolder", "openfolderinnewwindow", "find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "rename", "separator", "newfolder", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavoriteFolder": commands = ["open", "find", "separator", "bm_copy", "separator", "rename", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavorite": commands = ["open", "find", "separator", "bm_copy"]; break; case "http://home.netscape.com/NC-rdf#FileSystemObject": commands = ["open", "find", "separator", "bm_copy"]; break; default: var source = this.RDF.GetResource(aNodeID); return this.db.GetAllCmds(source); } return new CommandArrayEnumerator(commands); },
|
"bm_delete", "separator", "rename", "separator", "newfolder",
|
"bm_delete", "separator", "rename", "separator", "bm_fileBookmark", "separator", "newfolder",
|
getAllCmds: function (aNodeID) { var type = this.resolveType(aNodeID); var commands = []; switch (type) { case "http://home.netscape.com/NC-rdf#BookmarkSeparator": commands = ["find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "newfolder"]; break; case "http://home.netscape.com/NC-rdf#Bookmark": commands = ["open", "find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "rename", "separator", "newfolder", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#Folder": commands = ["openfolder", "openfolderinnewwindow", "find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "rename", "separator", "newfolder", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavoriteFolder": commands = ["open", "find", "separator", "bm_copy", "separator", "rename", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavorite": commands = ["open", "find", "separator", "bm_copy"]; break; case "http://home.netscape.com/NC-rdf#FileSystemObject": commands = ["open", "find", "separator", "bm_copy"]; break; default: var source = this.RDF.GetResource(aNodeID); return this.db.GetAllCmds(source); } return new CommandArrayEnumerator(commands); },
|
"separator", "newfolder", "separator", "properties"];
|
"separator", "bm_fileBookmark", "separator", "newfolder", "separator", "properties"];
|
getAllCmds: function (aNodeID) { var type = this.resolveType(aNodeID); var commands = []; switch (type) { case "http://home.netscape.com/NC-rdf#BookmarkSeparator": commands = ["find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "newfolder"]; break; case "http://home.netscape.com/NC-rdf#Bookmark": commands = ["open", "find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "rename", "separator", "newfolder", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#Folder": commands = ["openfolder", "openfolderinnewwindow", "find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "rename", "separator", "newfolder", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavoriteFolder": commands = ["open", "find", "separator", "bm_copy", "separator", "rename", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavorite": commands = ["open", "find", "separator", "bm_copy"]; break; case "http://home.netscape.com/NC-rdf#FileSystemObject": commands = ["open", "find", "separator", "bm_copy"]; break; default: var source = this.RDF.GetResource(aNodeID); return this.db.GetAllCmds(source); } return new CommandArrayEnumerator(commands); },
|
commands = ["open", "find", "separator", "bm_copy", "separator", "rename", "separator", "properties"];
|
commands = ["open", "find", "separator", "bm_copy", "separator", "rename", "separator", "bm_fileBookmark", "separator", "separator", "properties"];
|
getAllCmds: function (aNodeID) { var type = this.resolveType(aNodeID); var commands = []; switch (type) { case "http://home.netscape.com/NC-rdf#BookmarkSeparator": commands = ["find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "newfolder"]; break; case "http://home.netscape.com/NC-rdf#Bookmark": commands = ["open", "find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "rename", "separator", "newfolder", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#Folder": commands = ["openfolder", "openfolderinnewwindow", "find", "separator", "bm_cut", "bm_copy", "bm_paste", "bm_delete", "separator", "rename", "separator", "newfolder", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavoriteFolder": commands = ["open", "find", "separator", "bm_copy", "separator", "rename", "separator", "properties"]; break; case "http://home.netscape.com/NC-rdf#IEFavorite": commands = ["open", "find", "separator", "bm_copy"]; break; case "http://home.netscape.com/NC-rdf#FileSystemObject": commands = ["open", "find", "separator", "bm_copy"]; break; default: var source = this.RDF.GetResource(aNodeID); return this.db.GetAllCmds(source); } return new CommandArrayEnumerator(commands); },
|
function GetAppropriatePercentString()
|
function GetAppropriatePercentString(elementForAtt, elementInDoc)
|
function GetAppropriatePercentString(){ var selection = window.editorShell.editorSelection; if (selection) { if (editorShell.GetElementOrParentByTagName("td",selection.anchorNode)) return GetString("PercentOfCell"); } return GetString("PercentOfWindow");}
|
var selection = window.editorShell.editorSelection; if (selection) { if (editorShell.GetElementOrParentByTagName("td",selection.anchorNode)) return GetString("PercentOfCell"); } return GetString("PercentOfWindow");
|
if (elementForAtt.nodeName == "TD" || elementForAtt.nodeName == "TH") return GetString("PercentOfTable"); if(elementForAtt.nodeName == "TABLE") return GetString("PercentOfWindow"); if(editorShell.GetElementOrParentByTagName("td",elementInDoc)) return GetString("PercentOfCell"); else return GetString("PercentOfWindow");
|
function GetAppropriatePercentString(){ var selection = window.editorShell.editorSelection; if (selection) { if (editorShell.GetElementOrParentByTagName("td",selection.anchorNode)) return GetString("PercentOfCell"); } return GetString("PercentOfWindow");}
|
if(elementForAtt.nodeName == "TABLE") return GetString("PercentOfWindow");
|
function GetAppropriatePercentString(elementForAtt, elementInDoc){ if (elementForAtt.nodeName == "TD" || elementForAtt.nodeName == "TH") return GetString("PercentOfTable");//TEMP: UNTIL InitPixelOrPercentCombobox() has elementInDoc param: if(elementForAtt.nodeName == "TABLE") return GetString("PercentOfWindow"); // Check if element is within a cell if(editorShell.GetElementOrParentByTagName("td",elementInDoc)) return GetString("PercentOfCell"); else return GetString("PercentOfWindow");}
|
|
var attributesCount = {}; var attributes = aMessage.getAttributes(attributesCount); for (var i = 0; i < attributesCount.value; i++) { if (attributes[i] == aAttributeName) { var valuesCount = {}; var values = aMessage.getValues(attributes[i], valuesCount); for (var j = 0; j < valuesCount.value; j++) { var attributeValue = this.mRdfSvc.GetLiteral(values[j]); resultArray.push(attributeValue); }
|
var valuesCount = {}; try { var values = aMessage.getValues(aAttributeName, valuesCount); for (var j = 0; j < valuesCount.value; j++) { var attributeValue = this.mRdfSvc.GetLiteral(values[j]); resultArray.push(attributeValue);
|
getAttributeArray: function(aMessage, aAttributeName) { var resultArray = new Array(); var attributesCount = {}; var attributes = aMessage.getAttributes(attributesCount); for (var i = 0; i < attributesCount.value; i++) { if (attributes[i] == aAttributeName) { var valuesCount = {}; var values = aMessage.getValues(attributes[i], valuesCount); for (var j = 0; j < valuesCount.value; j++) { var attributeValue = this.mRdfSvc.GetLiteral(values[j]); resultArray.push(attributeValue); } } } return resultArray; }
|
} catch (e) {
|
getAttributeArray: function(aMessage, aAttributeName) { var resultArray = new Array(); var attributesCount = {}; var attributes = aMessage.getAttributes(attributesCount); for (var i = 0; i < attributesCount.value; i++) { if (attributes[i] == aAttributeName) { var valuesCount = {}; var values = aMessage.getValues(attributes[i], valuesCount); for (var j = 0; j < valuesCount.value; j++) { var attributeValue = this.mRdfSvc.GetLiteral(values[j]); resultArray.push(attributeValue); } } } return resultArray; }
|
|
var IsCSSPrefChecked = prefs.getBoolPref("editor.use_css");
|
var IsCSSPrefChecked = prefs.getBoolPref(kUseCssPref);
|
function GetBackgroundElementWithColor(){ var editor = GetCurrentTableEditor(); if (!editor) return null; gColorObj.Type = ""; gColorObj.PageColor = ""; gColorObj.TableColor = ""; gColorObj.CellColor = ""; gColorObj.BackgroundColor = ""; gColorObj.SelectedType = ""; var tagNameObj = { value: "" }; var element; try { element = editor.getSelectedOrParentTableElement(tagNameObj, {value:0}); } catch(e) {} if (element && tagNameObj && tagNameObj.value) { gColorObj.BackgroundColor = GetHTMLOrCSSStyleValue(element, "bgcolor", "background-color"); gColorObj.BackgroundColor = ConvertRGBColorIntoHEXColor(gColorObj.BackgroundColor); if (tagNameObj.value.toLowerCase() == "td") { gColorObj.Type = "Cell"; gColorObj.CellColor = gColorObj.BackgroundColor; // Get any color that might be on parent table var table = GetParentTable(element); gColorObj.TableColor = GetHTMLOrCSSStyleValue(table, "bgcolor", "background-color"); gColorObj.TableColor = ConvertRGBColorIntoHEXColor(gColorObj.TableColor); } else { gColorObj.Type = "Table"; gColorObj.TableColor = gColorObj.BackgroundColor; } gColorObj.SelectedType = gColorObj.Type; } else { var prefs = GetPrefs(); var IsCSSPrefChecked = prefs.getBoolPref("editor.use_css"); if (IsCSSPrefChecked && IsHTMLEditor()) { var selection = editor.selection; if (selection) { element = selection.focusNode; while (!editor.nodeIsBlock(element)) element = element.parentNode; } else { element = GetBodyElement(); } } else { element = GetBodyElement(); } if (element) { gColorObj.Type = "Page"; gColorObj.BackgroundColor = GetHTMLOrCSSStyleValue(element, "bgcolor", "background-color"); if (gColorObj.BackgroundColor == "") { gColorObj.BackgroundColor = "transparent"; } else { gColorObj.BackgroundColor = ConvertRGBColorIntoHEXColor(gColorObj.BackgroundColor); } gColorObj.PageColor = gColorObj.BackgroundColor; } } return element;}
|
if (optionalHint.search(tempID.email.toLowerCase()) >= 0) {
|
if (optionalHint.indexOf(tempID.email.toLowerCase()) >= 0) {
|
function getBestIdentity(identities, optionalHint){ var identity = null; try { // if we have more than one identity and a hint to help us pick one if (identities.Count() > 1 && optionalHint) { // normalize case on the optional hint to improve our chances of finding a match optionalHint = optionalHint.toLowerCase(); // iterate over all of the identities var tempID; for (id = 0; id < identities.Count(); id++) { tempID = identities.GetElementAt(id).QueryInterface(Components.interfaces.nsIMsgIdentity); if (optionalHint.search(tempID.email.toLowerCase()) >= 0) { identity = tempID; break; } } // if we could not find an exact email address match within the hint fields then maybe the message // was to a mailing list. In this scenario, we won't have a match based on email address. // Before we just give up, try and search for just a shared domain between the the hint and // the email addresses for our identities. Hey, it is better than nothing and in the case // of multiple matches here, we'll end up picking the first one anyway which is what we would have done // if we didn't do this second search. This helps the case for corporate users where mailing lists will have the same domain // as one of your multiple identities. if (!identity) { for (id = 0; id < identities.Count(); id++) { tempID = identities.GetElementAt(id).QueryInterface(Components.interfaces.nsIMsgIdentity); // extract out the partial domain var start = tempID.email.lastIndexOf("@"); // be sure to include the @ sign in our search to reduce the risk of false positives if (optionalHint.search(tempID.email.slice(start, tempID.email.length).toLowerCase()) >= 0) { identity = tempID; break; } } } } } catch (ex) {dump (ex + "\n");} // still no matches? Give up and pick the first one like we used to. if (!identity) identity = identities.GetElementAt(0).QueryInterface(Components.interfaces.nsIMsgIdentity); return identity;}
|
if (kids) return kids.lastChild;
|
return kids.lastChild || this.tree;
|
getBestItem: function () { var seln = this.getSelection (); if (seln.length < 1) { var kids = ContentUtils.childByLocalName(this.tree, "treechildren"); if (kids) return kids.lastChild; } else return seln[0]; return null; },
|
return null;
|
return this.tree;
|
getBestItem: function () { var seln = this.getSelection (); if (seln.length < 1) { var kids = ContentUtils.childByLocalName(this.tree, "treechildren"); if (kids) return kids.lastChild; } else return seln[0]; return null; },
|
return (gSearchBooleanRadiogroup.selectedItem.getAttribute("data") == "and") ? true : false;
|
return (gSearchBooleanRadiogroup.selectedItem.getAttribute("value") == "and") ? true : false;
|
function getBooleanAnd(){ if (gSearchBooleanRadiogroup.selectedItem) return (gSearchBooleanRadiogroup.selectedItem.getAttribute("data") == "and") ? true : false; // default to false return false;}
|
return this.mPrefService.GetBoolPref(aPrefName);
|
return this.mPrefService.getBoolPref(aPrefName);
|
getBoolPref: function (aPrefName, aDefVal) { try { return this.mPrefService.GetBoolPref(aPrefName); } catch(e) { return aDefVal != undefined ? aDefVal : null; } return null; // quiet warnings },
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.