rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
this.notifyError( exc );
this.logError( exc );
getCalProps_: function( bAsync ) { try { if (this.m_calProps == null) { var url = this.session.getCommandUrl( "get_calprops" ); url += ("&calid=" + encodeURIComponent(this.calId)); url += "&fmt-out=text%2Fxml"; var this_ = this; ...
function( bAsync )
function( bAsync, bRefresh )
getCalProps_: function( bAsync ) { try { if (this.m_calProps == null) { var url = this.session.getCommandUrl( "get_calprops" ); url += ("&calid=" + encodeURIComponent(this.calId)); url += "&fmt-out=text%2Fxml"; var this_ = this; ...
if (this.m_calProps == null) { var url = this.session.getCommandUrl( "get_calprops" ); url += ("&calid=" + encodeURIComponent(this.calId));
if (bRefresh || !this.m_calProps) { var url = this.getCommandUrl( "get_calprops" );
getCalProps_: function( bAsync ) { try { if (this.m_calProps == null) { var url = this.session.getCommandUrl( "get_calprops" ); url += ("&calid=" + encodeURIComponent(this.calId)); url += "&fmt-out=text%2Fxml"; var this_ = this; ...
throw exc;
if (!bAsync) throw exc;
getCalProps_: function( bAsync ) { try { if (this.m_calProps == null) { var url = this.session.getCommandUrl( "get_calprops" ); url += ("&calid=" + encodeURIComponent(this.calId)); url += "&fmt-out=text%2Fxml"; var this_ = this; ...
return( calendarEvent.location );
return( calendarEvent.getProperty("LOCATION") );
getCellText : function(row,column) { calendarEvent = gEventArray[row]; // Moz1.8 trees require column.id, moz1.7 and earlier trees use column. switch( typeof(column)=="object" ? column.id : column ) { case "unifinder-search-results-tree-col-title": return( calendarEvent.title...
if( calendarEvent.title == "" ) var titleText = "Untitled"; else var titleText = calendarEvent.title; return( titleText );
return( calendarEvent.title );
getCellText : function(row,column) { var columnElement = document.getElementById(column); var sortActive = columnElement.getAttribute("sortActive"); if (sortActive == "true") { this.selectedColumn = column; this.sortDirection = columnElement.getAttribute("sortDirection"); ...
} else if (column.id=="passwordCol") { rv = signons[row].password;
getCellText : function(row,column){ var rv=""; if (column.id=="siteCol") { rv = signons[row].host; } else if (column.id=="userCol") { rv = signons[row].user; } return rv; },
if (column=="siteCol") { rv = permissions[row].rawHost; } else if (column=="statusCol") { rv = permissions[row].capability;
if (column=="domainCol") { rv = cookies[row].rawHost; } else if (column=="nameCol") { rv = cookies[row].name;
getCellText : function(row,column){ var rv=""; if (column=="siteCol") { rv = permissions[row].rawHost; } else if (column=="statusCol") { rv = permissions[row].capability; } return rv; },
var rv;
var rv="";
getCellText : function(row,column){ var rv; if (column=="siteCol") { rv = permissions[row].rawHost; } else if (column=="statusCol") { rv = permissions[row].capability; } return rv; },
return( calendarToDo.parent.name );
return( calendarToDo.calendar.name );
getCellText : function(row,column) { calendarToDo = gTaskArray[row]; if( !calendarToDo ) return false; // Moz1.8 trees require column.id, moz1.7 and earlier trees use column. switch( typeof(column)=="object" ? column.id : column ) { case "unifinder-todo-tree-col-completed":...
gTaskArray.sort(sortEvents);
gTaskArray.sort(sortTasks);
getCellText : function(row,column) { var columnElement = document.getElementById(column); var sortActive = columnElement.getAttribute("sortActive"); if (sortActive == "true") { this.selectedColumn = column; this.sortDirection = columnElement.getAttribute("sortDirection"); ...
var rv;
var rv="";
getCellText : function(row,column){ var rv; if (column=="siteCol") { rv = signons[row].host; } else if (column=="userCol") { rv = signons[row].user; } return rv; },
} else if (column=="passwordCol") {
} else if (column.id=="passwordCol") {
getCellText : function(row,column) { var rv=""; if (column.id=="siteCol") { rv = signons[row].host; } else if (column.id=="userCol") { rv = signons[row].user; } else if (column=="passwordCol") { rv = signons[row].password; } return rv; },
if (calendarEvent.startDate.isDate)
if (calendarEvent.startDate.isDate) {
getCellText : function(row,column) { calendarEvent = gEventArray[row]; // Moz1.8 trees require column.id, moz1.7 and earlier trees use column. switch( typeof(column)=="object" ? column.id : column ) { case "unifinder-search-results-tree-col-title": return( calendarEvent.title...
eventEndDate.normalize(); }
getCellText : function(row,column) { calendarEvent = gEventArray[row]; // Moz1.8 trees require column.id, moz1.7 and earlier trees use column. switch( typeof(column)=="object" ? column.id : column ) { case "unifinder-search-results-tree-col-title": return( calendarEvent.title...
} else if (column=="statusCol") {
} else if (column=="capabilityCol") {
getCellText : function(row,column){ var rv=""; if (column=="siteCol") { rv = permissions[row].rawHost; } else if (column=="statusCol") { rv = permissions[row].capability; } return rv; },
var eventStartDate = calendarEvent.startDate.jsDate; return formatUnifinderEventDateTime(eventStartDate, calendarEvent.isAllDay);
return formatUnifinderEventDateTime(calendarEvent.startDate);
getCellText : function(row,column) { calendarEvent = gEventArray[row]; // Moz1.8 trees require column.id, moz1.7 and earlier trees use column. switch( typeof(column)=="object" ? column.id : column ) { case "unifinder-search-results-tree-col-title": return( calendarEvent.title...
var eventEndDate = calendarEvent.endDate.jsDate;
var eventEndDate = calendarEvent.endDate.clone();
getCellText : function(row,column) { calendarEvent = gEventArray[row]; // Moz1.8 trees require column.id, moz1.7 and earlier trees use column. switch( typeof(column)=="object" ? column.id : column ) { case "unifinder-search-results-tree-col-title": return( calendarEvent.title...
if (calendarEvent.isAllDay) eventEndDate.setDate( eventEndDate.getDate() - 1 ); return formatUnifinderEventDateTime(eventEndDate, calendarEvent.isAllDay);
if (calendarEvent.startDate.isDate) eventEndDate.day = eventEndDate.day - 1; return formatUnifinderEventDateTime(eventEndDate);
getCellText : function(row,column) { calendarEvent = gEventArray[row]; // Moz1.8 trees require column.id, moz1.7 and earlier trees use column. switch( typeof(column)=="object" ? column.id : column ) { case "unifinder-search-results-tree-col-title": return( calendarEvent.title...
return start.toString();
var dateFormatter = Components.classes["@mozilla.org/calendar/datetime-formatter;1"] .getService(Components.interfaces.calIDateTimeFormatter); start = start.getInTimezone(calendarDefaultTimezone()); return dateFormatter.formatDateTime(start);
function getCellText(row, column){ var event = this.events[row]; if (column.id == "col-agenda-item") { if (event instanceof Synthetic) return event.title; return event.title; } if (event instanceof Synthetic) return ""; var start = event.startDate || event.dueDate; retu...
optgroupObject.prototype.getCellText = function getCellText(column) { return column == "SelectTextCol" ? this.element.label : ""; }
getCellText: function getCellText(index, column) { return itemArray[index].getCellText(column); },
optgroupObject.prototype.getCellText = function getCellText(column){ return column == "SelectTextCol" ? this.element.label : "";}
["font.family", defer], ["font.size", defer],
function getChannelPrefManager(channel){ var network = channel.parent.parent; function defer(prefName) { return network.prefs[prefName]; }; function onPrefChanged(prefName, newValue, oldValue) { onChannelPrefChanged (channel, prefName, newValue, oldValue); }; var logDefault...
["bugURL", defer, "appearance.misc"],
function getChannelPrefManager(channel){ var network = channel.parent.parent; function defer(prefName) { return network.prefs[prefName]; }; function makeLogNameChannel() { return makeLogName(channel, "channel"); }; function onPrefChanged(prefName, newValue, oldValue) { on...
["timestamps", defer, "appearance.timestamps"], ["timestampFormat", defer, "appearance.timestamps"],
["timestamps", defer, "appearance.timestamps"], ["timestamps.display", defer, "appearance.timestamps"], ["timestamps.log", defer, "hidden"],
function getChannelPrefManager(channel){ var network = channel.parent.parent; function defer(prefName) { return network.prefs[prefName]; }; function makeLogNameChannel() { return makeLogName(channel, "channel"); }; function onPrefChanged(prefName, newValue, oldValue) { on...
return window._content.document.characterSet;
return window.content.document.characterSet;
function getCharsetforSave(aDocument){ if (aDocument) return aDocument.characterSet; if (document.commandDispatcher.focusedWindow) return document.commandDispatcher.focusedWindow.document.characterSet; return window._content.document.characterSet;}
Components.interfaces.nsIPrefLocalizedString);
Components.interfaces.nsIPrefLocalizedString).data;
function GetCharsetUIString(){ var charset = msgCompose.compFields.characterSet; if (g_send_default_charset == null) { g_send_default_charset = prefs.getComplexValue("mailnews.send_default_charset", Components.interfaces.nsIPrefLocalizedString); } charset = charset.toUpperCase...
for ( var c = 0, cString = ""; c < string.length; c++ ) { cString += string.charCodeAt(c) + ((c+1 < string.length) ? "," : ""); } return cString;
for ( var c = 0, cString = ""; c < string.length; c++ ) { cString += string.charCodeAt(c) + ((c+1 < string.length) ? "," : "");
function getCharValues(string) { for ( var c = 0, cString = ""; c < string.length; c++ ) { cString += string.charCodeAt(c) + ((c+1 < string.length) ? "," : ""); } return cString; }
return cString; }
function getCharValues(string) { for ( var c = 0, cString = ""; c < string.length; c++ ) { cString += string.charCodeAt(c) + ((c+1 < string.length) ? "," : ""); } return cString; }
getClassObject: function (compMgr, cid, iid) { if (!cid.equals(this.myCID)) throw Components.results.NS_ERROR_NO_INTERFACE; if (!iid.equals(Components.interfaces.nsIFactory)) throw Components.results.NS_ERROR_NOT_IMPLEMENTED; return this.myFactory; },
sidebarModule.getClassObject = function (compMgr, cid, iid) { if (!cid.equals(SIDEBAR_CID)) throw Components.results.NS_ERROR_NO_INTERFACE; if (!iid.equals(Components.interfaces.nsIFactory)) throw Components.results.NS_ERROR_NOT_IMPLEMENTED; return sidebarFactory; }
getClassObject: function (compMgr, cid, iid) { if (!cid.equals(this.myCID)) throw Components.results.NS_ERROR_NO_INTERFACE; if (!iid.equals(Components.interfaces.nsIFactory)) throw Components.results.NS_ERROR_NOT_IMPLEMENTED; return this.myFactory; },
case "memory": case "storage": cal = new calWcapCachedCalendar(); break;
getClassObject: function( compMgr, cid, iid ) { if (!this.m_scriptsLoaded) { this.m_scriptsLoaded = true; // load scripts: const scripts = [ "calWcapUtils.js", "calWcapErrors.js", "calWcapRequest.js", "calWcapSession.js", ...
cal = new calWcapCalendar();
cal = new calWcapCalendar( null , new calWcapSession() ); cal.session.defaultCalendar = cal;
getClassObject: function( compMgr, cid, iid ) { if (!this.m_scriptsLoaded) { this.m_scriptsLoaded = true; // load scripts: const scripts = [ "calWcapUtils.js", "calWcapErrors.js", "calWcapRequest.js", "calWcapSession.js", ...
if (cid.equals(ICALPROT_HANDLER_CID)) return ICALProtocolHandlerFactory;
CalendarModule.getClassObject =function (compMgr, cid, iid) { if (cid.equals(CLINE_SERVICE_CID)) return CLineFactory; if (cid.equals(ICALCNT_HANDLER_CID)) return ICALContentHandlerFactory; if (cid.equals(ICALPROT_HANDLER_CID)) return ICALProtocolHandlerFactory; throw Components.results....
if (outer != null)
if (outer)
getClassObject: function( compMgr, cid, iid ) { if (!this.m_scriptsLoaded) { // loading extra scripts from ../js: const scripts = [ "calWcapUtils.js", "calWcapErrors.js", "calWcapRequest.js", "calWcapSession.js", "calWcapCa...
var cal = createWcapCalendar( null , session ); session.defaultCalendar = cal; return cal.QueryInterface( iid );
return session.defaultCalendar.QueryInterface(iid);
getClassObject: function( compMgr, cid, iid ) { if (!this.m_scriptsLoaded) { // loading extra scripts from ../js: const scripts = [ "calWcapUtils.js", "calWcapErrors.js", "calWcapRequest.js", "calWcapSession.js", "calWcapCa...
if (cid.equals(IRCCNT_HANDLER_CID)) return IRCContentHandlerFactory; if (cid.equals(IRCPROT_HANDLER_CID)) return IRCProtocolHandlerFactory;
if (cid.equals(JSDPROT_HANDLER_CID)) return JSDProtocolHandlerFactory;
Module.getClassObject =function (compMgr, cid, iid) { if (cid.equals(CLINE_SERVICE_CID)) return CLineFactory; if (cid.equals(IRCCNT_HANDLER_CID)) return IRCContentHandlerFactory; if (cid.equals(IRCPROT_HANDLER_CID)) return IRCProtocolHandlerFactory; if (!iid.equals(Components.interf...
if (outer)
if (outer != null)
getClassObject: function( compMgr, cid, iid ) { if (!this.m_scriptsLoaded) { // loading extra scripts from ../js: const scripts = [ "calWcapUtils.js", "calWcapErrors.js", "calWcapRequest.js", "calWcapSession.js", "calWcapCa...
return session.defaultCalendar.QueryInterface(iid);
var cal = createWcapCalendar( null , session ); session.defaultCalendar = cal; return cal.QueryInterface( iid );
getClassObject: function( compMgr, cid, iid ) { if (!this.m_scriptsLoaded) { // loading extra scripts from ../js: const scripts = [ "calWcapUtils.js", "calWcapErrors.js", "calWcapRequest.js", "calWcapSession.js", "calWcapCa...
nsClipboard.mClipboard.getData(trans, nsClipboard.mCurrentClipboard)
nsClipboard.mClipboard.getData(trans, nsClipboard.currentClipboard)
getClipboardTransferable: function (aFlavourList) { var supportsArray = nsJSSupportsUtils.createSupportsArray(); var trans = nsTransferable.createTransferable(); for (var flavour in aFlavourList) trans.addDataFlavor(flavour); nsClipboard.mClipboard.getData(trans, nsClipboard.mCurrentCli...
if (colorWell)
if (colorWell && color)
function getColorAndSetColorWell(ColorPickerID, ColorWellID){ var colorWell = document.getElementById(ColorWellID); var colorPicker = document.getElementById(ColorPickerID); if (colorPicker) { // Extract color from colorPicker and assign to colorWell. var color = colorPicker.getAttribute('color'); dump("s...
dump("ColorPicker found\n");
function getColorAndSetColorWell(ColorPickerID, ColorWellID){ var colorWell; if (ColorWellID) colorWell = document.getElementById(ColorWellID); var colorPicker = document.getElementById(ColorPickerID); if (colorPicker) { // Extract color from colorPicker and assign to colorWell. var color = colorPicker.g...
function GetColorAndUpdate(ColorPickerID, ColorWellID, widget)
function GetColorAndUpdate(ColorPickerID, ColorWellID, CheckboxID, popup)
function GetColorAndUpdate(ColorPickerID, ColorWellID, widget){ // Close the colorpicker widget.parentNode.closePopup(); var color = null; if (ColorPickerID) color = getColor(ColorPickerID); SetColor(ColorWellID, color);}
widget.parentNode.closePopup();
popup.closePopup();
function GetColorAndUpdate(ColorPickerID, ColorWellID, widget){ // Close the colorpicker widget.parentNode.closePopup(); var color = null; if (ColorPickerID) color = getColor(ColorPickerID); SetColor(ColorWellID, color);}
SetCheckbox(CheckboxID);
function GetColorAndUpdate(ColorPickerID, ColorWellID, widget){ // Close the colorpicker widget.parentNode.closePopup(); var color = null; if (ColorPickerID) color = getColor(ColorPickerID); SetColor(ColorWellID, color);}
colorWell.style.backgroundColor = colorRef.value;
colorWell.style.backgroundColor = colorRef.getAttribute("value");
function getColorFromWellAndSetValue( menuid ) { var menu = document.getElementById(menuid); // picker container var colorWell = menu.firstChild; // display for picker colour var colorRef = menu.nextSibling; // prefs JS sets this. colorWell.style.backgroundColor = ...
return color;
function getColorFromWellAndSetValue( menuid ) { var menu = document.getElementById(menuid); // picker container var colorWell = menu.firstChild; // display for picker colour var colorRef = menu.nextSibling; // prefs JS sets this. colorWell.style.backgroundColor = ...
var kids = this.mOutliner.getElementsByTagName("outlinercol");
var kids = this.mTree.getElementsByTagName("treecol");
getColumnAt: function(aIndex) { var kids = this.mOutliner.getElementsByTagName("outlinercol"); return aIndex < 0 || aIndex >= kids.length ? kids[kids.length-1] : kids[aIndex]; },
var headers = this.mOutliner.getElementsByTagName("outlinercol");
var headers = this.mTree.getElementsByTagName("treecol");
getColumnIndexFromHeader: function(aHeader) { var headers = this.mOutliner.getElementsByTagName("outlinercol"); for (var i = 0; i < headers.length; ++i) { if (headers[i] == aHeader) return i; } return -1; },
return new cmdEditCopy();
return new cmdEditCopy(this.selectedAttributes);
getCommand: function(aCommand) { switch (aCommand) { case "cmdEditCut": return new cmdEditCut(); case "cmdEditCopy": return new cmdEditCopy(); case "cmdEditPaste": return new cmdEditPaste(); case "cmdEditInsert": return new cmdEditInsert(); case "cmdEditEdit": ...
if (MICSUMSVC.hasMicrosummary(aNodeID)) commands.splice(14, 0, "bm_refreshmicrosummary");
getCommands: function (aNodeID, aParent, aDS) { var type = BookmarksUtils.resolveType(aNodeID, aDS); if (!type) return null; var ptype = null; aParent = (aParent != null) ? aParent : BMSVC.getParent(aNodeID); if (aParent) { ptype = BookmarksUtils.resolveType(aParent, aDS); if (ptype ==...
"bm_cut", "bm_copy", "bm_paste", "bm_separator", "bm_delete", "bm_separator",
"cut", "copy", "paste", "bm_separator", "delete", "bm_separator",
getCommands: function (aNodeID) { var type = BookmarksUtils.resolveType(aNodeID); if (!type) return null; var commands = []; // menu order: // // bm_expandfolder // bm_open, bm_openfolder // bm_openinnewwindow // bm_openinnewtab // --------------------- // bm_newfolder // --...
commands = ["bm_expandfolder", "bm_separator", "bm_delete"];
commands = ["bm_expandfolder", "bm_separator", "delete"];
getCommands: function (aNodeID) { var type = BookmarksUtils.resolveType(aNodeID); if (!type) return null; var commands = []; // menu order: // // bm_expandfolder // bm_open, bm_openfolder // bm_openinnewwindow // bm_openinnewtab // --------------------- // bm_newfolder // --...
"bm_copy"];
"copy"];
getCommands: function (aNodeID) { var type = BookmarksUtils.resolveType(aNodeID); if (!type) return null; var commands = []; // menu order: // // bm_expandfolder // bm_open, bm_openfolder // bm_openinnewwindow // bm_openinnewtab // --------------------- // bm_newfolder // --...
if (this.uri == null)
if (this.sessionUri == null)
getCommandUrl: function( wcapCommand ) { if (this.uri == null) throw new Error("no URI!"); // ensure established session, so userId is set; // (calId defaults to userId) if not set: this.getSessionId(); return (this.uri.spec + wcapCommand + ".wcap?appid=mozilla-li...
return (this.uri.spec + wcapCommand + ".wcap?appid=mozilla-lightning");
return (this.sessionUri.spec + wcapCommand + ".wcap?appid=mozilla-lightning");
getCommandUrl: function( wcapCommand ) { if (this.uri == null) throw new Error("no URI!"); // ensure established session, so userId is set; // (calId defaults to userId) if not set: this.getSessionId(); return (this.uri.spec + wcapCommand + ".wcap?appid=mozilla-li...
if(command == "GetNewMessages" || command == "Copy" || command == "Move" || command == "NewFolder" || command == "MarkAllMessagesRead")
if(command == "GetNewMessages" || command == "DeleteMessages" || command == "Copy" || command == "Move" || command == "NewFolder" || command == "MarkAllMessagesRead")
function GetCompositeDataSource(command){ if(command == "GetNewMessages" || command == "Copy" || command == "Move" || command == "NewFolder" || command == "MarkAllMessagesRead") { var folderTree = GetFolderTree(); return folderTree.database; } else if(command == "DeleteMessages" || command == "MarkMessageRead" ...
else if(command == "DeleteMessages" || command == "MarkMessageRead" ||
else if(command == "MarkMessageRead" ||
function GetCompositeDataSource(command){ if(command == "GetNewMessages" || command == "Copy" || command == "Move" || command == "NewFolder" || command == "MarkAllMessagesRead") { var folderTree = GetFolderTree(); return folderTree.database; } else if(command == "DeleteMessages" || command == "MarkMessageRead" ...
if (editorList && editorList.length > 0) return editorList[0];
if (editorList.item(0)) return editorList.item(0);
function GetCurrentEditorElement(){ var tmpWindow = window; do { // Get the <editor> element(s) var editorList = tmpWindow.document.getElementsByTagName("editor"); // This will change if we support > 1 editor element if (editorList && editorList.length > 0) return editorList[0]; tmpWindow = tmpW...
return console.frames[console._currentFrameIndex];
if ("frames" in console) return console.frames[console._currentFrameIndex]; return null;
function getCurrentFrame(){ return console.frames[console._currentFrameIndex];}
dump("Looking for identity " + identityKey + "\n");
function getCurrentIdentity(){ var msgService = Components.classes['component://netscape/messenger/services/session'].getService(Components.interfaces.nsIMsgMailSession); var accountManager = msgService.accountManager; // fill in Identity combobox var identitySelect = document.getElementById("msgIdentity");...
var msgService = Components.classes['component:
function getCurrentIdentity(){ var msgService = Components.classes['component://netscape/messenger/services/session'].getService(Components.interfaces.nsIMsgMailSession); var accountManager = msgService.accountManager; // fill in Identity combobox var identitySelect = document.getElementById("msgIdentity");...
menuitem = top.document.getElementById(menuitemID);
var menuitem = top.document.getElementById(menuitemID);
function GetCurrentPrefs(){ // prefs if ( cvPrefs == 0 ) cvPrefs = new Object; var prefs = Components.classes["@mozilla.org/preferences-service;1"]; if ( prefs ) { prefs = prefs.getService(); if ( prefs ) prefs = prefs.QueryInterface(Components.interfaces.nsIPrefBranch); } if ( prefs ) { try { cvPrefs.prefs ...
if (pageData.server && pageData.server.deferStorage)
if (getCurrentServerType(pageData) == "pop3" && pageData.server && pageData.server.deferStorage)
function getCurrentServerIsDeferred(pageData) { var serverDeferred = false; if (pageData.server && pageData.server.deferStorage) serverDeferred = pageData.server.deferStorage.value; return serverDeferred;}
var val = prop.valueAsIcalString; if (val.length == 0 || val == "0") return null; var dt = new CalDateTime(); dt.icalString = val; return dt;
return getDatetimeFromIcalString(prop.valueAsIcalString);
function getDatetimeFromIcalProp( prop ){ if (!prop) return null; var val = prop.valueAsIcalString; if (val.length == 0 || val == "0") return null; // assuming timezone is known: var dt = new CalDateTime(); dt.icalString = val;// dt.makeImmutable(); return dt;}
["timestamps", defer, "appearance.timestamps"], ["timestampFormat", defer, "appearance.timestamps"]
["timestamps", defer, "appearance.timestamps"], ["timestamps.display", defer, "appearance.timestamps"], ["timestamps.log", defer, "hidden"]
function getDCCUserPrefManager(user){ function defer(prefName) { return client.prefs[prefName]; }; function makeLogNameUser() { return makeLogName(user, "dccuser"); }; function onPrefChanged(prefName, newValue, oldValue) { onDCCUserPrefChanged(user, prefName, newValue, oldVa...
colors.LinkColor = gPrefs.CopyCharPref("browser.anchor_color"); colors.VisitedLinkColor = gPrefs.CopyCharPref("browser.visited_color");
try { colors.LinkColor = gPrefs.CopyCharPref("browser.anchor_color"); } catch (e) {} try { colors.VisitedLinkColor = gPrefs.CopyCharPref("browser.visited_color"); } catch (e) {}
function GetDefaultBrowserColors(){ var colors = new Object(); if (!colors) return null; //Initialize to avoid JS warnings colors.TextColor = ""; colors.BackgroundColor = ""; var useSysColors = false; try { useSysColors = gPrefs.GetBoolPref("browser.display.use_system_colors"); } catch (e) {} if (!useSysColors)...
return getObjectDetails(client.currentObject, cx);
if (!cx) cx = new Object(); cx.__proto__ = getObjectDetails(client.currentObject); return cx;
function getDefaultContext(cx){ return getObjectDetails(client.currentObject, cx);}
if (aContentType == "text/plain" || aContentType == "application/octet-stream" || aURI.scheme == "ftp") return "";
function getDefaultExtension(aFilename, aURI, aContentType){ // This mirrors some code in nsExternalHelperAppService::DoContent // Use the filename first and then the URI if that fails var mimeInfo = getMIMEInfoForType(aContentType); // First try the extension from the filename const stdURLContractID = "@mozilla...
var dpi = 96; try { dpi = prefBranch.getIntPref("browser.display.screen_resolution"); } catch(ex) { }
var b = document.createElement("box"); b.style.width = "1in"; var dpi = window.getComputedStyle(b, null).width.match(/^\d+/);
function getDefaultFontSize(){ const PREF_CTRID = "@mozilla.org/preferences-service;1"; const nsIPrefService = Components.interfaces.nsIPrefService; const nsIPrefBranch = Components.interfaces.nsIPrefBranch; var prefService = Components.classes[PREF_CTRID].getService(nsIPrefService); var prefB...
#ifdef XP_BEOS return "Desk"; #endif
function getDesktopKey() { #ifdef XP_WIN return "DeskP";#endif#ifdef XP_MACOSX return "UsrDsk";#endif#ifdef XP_OS2 return "Desk";#endif return "Home"; }
array[i] = dirContents.GetNext().QueryInterface(nsILocalFile); i++;
var file = dirContents.GetNext().QueryInterface(nsILocalFile); try { if (file.isDirectory()) { array[i] = file; i++; } else { for (var k = 0; k < splitFilters.length; ++k) { var tmpStr = splitFilters[k]; var matchStr; if (tmpStr == "*.*") { matchStr = ".*"; } else { var tmpArray = tmpStr.match("\*\.(.*)"); var matc...
function getDirectoryContents(parentElement, dirContents){ var i = 0; var array = new Array(); while (dirContents.HasMoreElements()) { array[i] = dirContents.GetNext().QueryInterface(nsILocalFile); i++; } /* sort the array */ array.sort(dirSort); createTree(parentElement, array);}
array.sort(dirSort); createTree(parentElement, array);
if (array.length > 0) { array.sort(dirSort); createTree(parentElement, array); }
function getDirectoryContents(parentElement, dirContents){ var i = 0; var array = new Array(); while (dirContents.HasMoreElements()) { array[i] = dirContents.GetNext().QueryInterface(nsILocalFile); i++; } /* sort the array */ array.sort(dirSort); createTree(parentElement, array);}
return file.URL;
var ioService = XPCU.getService("@mozilla.org/network/io-service;1", "nsIIOService"); return ioService.getURLSpecFromFile(file);
getDirectoryFile: function(aFileId) { try { var dirService = XPCU.getService(kDirServiceCID, "nsIProperties"); var file = dirService.get(aFileId, Components.interfaces.nsIFile); if (!file.exists()) return null; return file.URL; } catch (ex) { return null; } }
gDocument = getSummaryBrowser().contentDocument;
gDocument = getBrowser().contentDocument;
function getDocument(){ if (!gDocument) gDocument = getSummaryBrowser().contentDocument; return gDocument;}
if (docScheme == "ftp" || !publishData.browseUrl)
if (!GetScheme(publishData.browseUrl))
function GetDocUrlFromPublishData(publishData){ if (!publishData || !publishData.filename || !publishData.publishUrl) return ""; // If user was previously editing an "ftp" url, then keep that as the new scheme var url; var docScheme = GetScheme(GetDocumentUrl()); if (docScheme == "ftp" || !publishData.browseUrl...
if (GetScheme(url) == "ftp") url = InsertUsernameIntoUrl(url, publishData.username);
function GetDocUrlFromPublishData(publishData){ if (!publishData || !publishData.filename || !publishData.publishUrl) return ""; // If user was previously editing an "ftp" url, then keep that as the new scheme var url; var docScheme = GetScheme(GetDocumentUrl()); if (docScheme == "ftp" || !publishData.browseUrl...
getDragData: function (aFlavourList)
getDragData: function (aFlavourSet)
getDragData: function (aFlavourList) { var supportsArray = nsJSSupportsUtils.createSupportsArray(); for (var i = 0; i < nsDragAndDrop.mDragSession.numDropItems; ++i) { var trans = nsTransferable.createTransferable(); for (var flavour in aFlavourList) trans.addDataFlavo...
for (var flavour in aFlavourList) trans.addDataFlavor(flavour);
for (var j = 0; j < aFlavourSet.flavours.length; ++j) trans.addDataFlavor(aFlavourSet.flavours[j].contentType);
getDragData: function (aFlavourList) { var supportsArray = nsJSSupportsUtils.createSupportsArray(); for (var i = 0; i < nsDragAndDrop.mDragSession.numDropItems; ++i) { var trans = nsTransferable.createTransferable(); for (var flavour in aFlavourList) trans.addDataFlavo...
} catch(ex) { dump("failed to get command manager number "+i+"\n"); }
} catch(ex) {}
function GetEditorController(){ var numControllers = window._content.controllers.getControllerCount(); // count down to find a controller that supplies a nsIControllerCommandManager interface for (var i = numControllers; i >= 0 ; i --) { var commandManager = null; try { var controller = window._co...
gEventSource.onlyFutureEvents = false;
function getEventTable( ){ var Today = new Date(); //do this to allow all day events to show up all day long var StartDate = new Date( Today.getFullYear(), Today.getMonth(), Today.getDate(), 0, 0, 0 ); switch( document.getElementById( "event-filter-menulist" ).selectedItem.value ) { case "all": ...
alert( "there's no case for ".event.currentTarget.selectedItem.value );
eventTable = new Array(); dump( "there's no case for "+document.getElementById( "event-filter-menulist" ).selectedItem.value );
function getEventTable( ){ var Today = new Date(); //do this to allow all day events to show up all day long var StartDate = new Date( Today.getFullYear(), Today.getMonth(), Today.getDate(), 0, 0, 0 ); switch( document.getElementById( "event-filter-menulist" ).selectedItem.value ) { case "all": ...
var EndDate = new Date( MidnightSelectedDate.getTime() + ( 1000 * 60 * 60 * 24 ) );
var EndDate = new Date( MidnightSelectedDate.getTime() + ( 1000 * 60 * 60 * 24 ) - 1000 );
function getEventTable( ){ var Today = new Date(); //do this to allow all day events to show up all day long var StartDate = new Date( Today.getFullYear(), Today.getMonth(), Today.getDate(), 0, 0, 0 ); gEventSource.onlyFutureEvents = false; switch( document.getElementById( "event-filter-menulist" ).sele...
function getEventTable( )
function getEventTable( Refresh )
function getEventTable( ){ var Today = new Date(); //do this to allow all day events to show up all day long var StartDate = new Date( Today.getFullYear(), Today.getMonth(), Today.getDate(), 0, 0, 0 ); gEventSource.onlyFutureEvents = false; switch( document.getElementById( "event-filter-menulist" ).sele...
gEventSource.onlyFutureEvents = false;
function getEventTable( ){ var Today = new Date(); //do this to allow all day events to show up all day long var StartDate = new Date( Today.getFullYear(), Today.getMonth(), Today.getDate(), 0, 0, 0 ); gEventSource.onlyFutureEvents = false; switch( document.getElementById( "event-filter-menulist" ).sele...
eventTable = gEventSource.getCurrentEvents();
eventTable = gEventSource.getAllEvents();
function getEventTable( ){ var Today = new Date(); //do this to allow all day events to show up all day long var StartDate = new Date( Today.getFullYear(), Today.getMonth(), Today.getDate(), 0, 0, 0 ); gEventSource.onlyFutureEvents = false; switch( document.getElementById( "event-filter-menulist" ).sele...
gEventSource.onlyFutureEvents = true; eventTable = gEventSource.getCurrentEvents();
eventTable = gEventSource.getAllFutureEvents();
function getEventTable( ){ var Today = new Date(); //do this to allow all day events to show up all day long var StartDate = new Date( Today.getFullYear(), Today.getMonth(), Today.getDate(), 0, 0, 0 ); gEventSource.onlyFutureEvents = false; switch( document.getElementById( "event-filter-menulist" ).sele...
writeLineToLog( testcases[i].description +" = " +testcases[i].actual +" expected: "+ testcases[i].expect );
print( testcases[i].description +" = " +testcases[i].actual +" expected: "+ testcases[i].expect );
function getFailedCases() { for ( var i = 0; i < testcases.length; i++ ) { if ( ! testcases[i].passed ) { writeLineToLog( testcases[i].description +" = " +testcases[i].actual +" expected: "+ testcases[i].expect ); } }}
for ( var i = 0, jsFieldArray = new Array(); i < javaFieldArray.length; i++ ) { var f = javaFieldArray[i] +""; jsFieldArray[i] = f.substr( f.lastIndexOf(".", f.length)+1, f.length ); } return jsFieldArray;
for ( var i = 0, jsFieldArray = new Array(); i < javaFieldArray.length; i++ ) { var f = javaFieldArray[i] +""; jsFieldArray[i] = f.substr( f.lastIndexOf(".", f.length)+1, f.length );
function getFieldNames( javaClassName ) { var javaFieldArray = getFields( javaClassName ); for ( var i = 0, jsFieldArray = new Array(); i < javaFieldArray.length; i++ ) { var f = javaFieldArray[i] +""; jsFieldArray[i] = f.substr( f.lastIndexOf(".", f.length)+1, f.length ); ...
return jsFieldArray; }
function getFieldNames( javaClassName ) { var javaFieldArray = getFields( javaClassName ); for ( var i = 0, jsFieldArray = new Array(); i < javaFieldArray.length; i++ ) { var f = javaFieldArray[i] +""; jsFieldArray[i] = f.substr( f.lastIndexOf(".", f.length)+1, f.length ); ...
ProfileDir: { id: "ProfileDir", value: profDirContent }
ProfileDir: { id: "ProfileDir", value: profDirContent, rootFolder: profDirRootFolder }
function GetFields(){ var profName = document.getElementById("ProfileName").value; var profDir = document.getElementById("ProfileDir"); var profDirContent = profDir.getAttribute("value"); var rv = { ProfileName: { id: "ProfileName", value: profName }, ProfileDir: { id: "ProfileDir", value:...
var dataObject = parent.hPrefWindow.wsm.dataManager.pageData["chrome:
var dataObject = { };
function GetFields() { var dataObject = parent.hPrefWindow.wsm.dataManager.pageData["chrome://browser/content/pref/pref-fonts.xul"]; // store data for language independent widgets var lists = ["selectLangs", "proportionalFont"]; for( var i = 0; i < lists.length; i++ ) { if( !( "dataEls" in data...
dataObject.dataEls = []; dataObject.dataEls[ lists[i] ] = [];
dataObject.dataEls = new Object; dataObject.dataEls[ lists[i] ] = new Object;
function GetFields() { var dataObject = parent.hPrefWindow.wsm.dataManager.pageData["chrome://browser/content/pref/pref-fonts.xul"]; // store data for language independent widgets var lists = ["selectLangs", "proportionalFont"]; for( var i = 0; i < lists.length; i++ ) { if( !( "dataEls" in data...
for (i = 0; i < items.length; ++i) { dataObject.dataEls[items[i]] = []; }
for (i = 0; i < items.length; ++i) dataObject.dataEls[items[i]] = new Object;
function GetFields() { var dataObject = parent.hPrefWindow.wsm.dataManager.pageData["chrome://browser/content/pref/pref-fonts.xul"]; // store data for language independent widgets var lists = ["selectLangs", "proportionalFont"]; for( var i = 0; i < lists.length; i++ ) { if( !( "dataEls" in data...
var itemResource = gRDFService.GetResource(NODE_ID(aElement));
var itemResource = gRDFService.GetResource(aElement.id);
function getFileForItem(aElement){ var itemResource = gRDFService.GetResource(NODE_ID(aElement)); var fileResource = gDownloadView.database.GetTarget(itemResource, gNC_File, true); fileResource = fileResource.QueryInterface(Components.interfaces.nsIRDFResource); return createLocalFile(fileResource.Value);}
const FILE_CTRID = "@mozilla.org/network/protocol;1?name=file";
function getFileFromURLSpec(url){ const FILE_CTRID = "@mozilla.org/network/protocol;1?name=file"; const nsIFileProtocolHandler = Components.interfaces.nsIFileProtocolHandler; var handler = Components.classes[FILE_CTRID].createInstance(); handler = handler.QueryInterface(nsIFileProtocolHandler); return ha...
var handler = Components.classes[FILE_CTRID].createInstance();
var service = getService("@mozilla.org/network/io-service;1", "nsIIOService"); var handler = service.getProtocolHandler("file");
function getFileFromURLSpec(url){ const FILE_CTRID = "@mozilla.org/network/protocol;1?name=file"; const nsIFileProtocolHandler = Components.interfaces.nsIFileProtocolHandler; var handler = Components.classes[FILE_CTRID].createInstance(); handler = handler.QueryInterface(nsIFileProtocolHandler); return ha...
if ("getFileFromURLSpec" in service) return service.getFileFromURLSpec(url); if ("initFileFromURLSpec" in service) { var file = newObject("@mozilla.org/file/local;1", "nsILocalFile"); service.initFileFromURLSpec(file, url); return file; }
function getFileFromURLSpec(url){ const nsIFileProtocolHandler = Components.interfaces.nsIFileProtocolHandler; var service = getService("@mozilla.org/network/io-service;1", "nsIIOService"); var handler = service.getProtocolHandler("file"); handler = handler.QueryInterface(ns...
result = getFirstItemByTag(node, tag);
var result = getFirstItemByTag(node, tag);
function getFirstItemByTag(root, tag){ var node; if (root.localName == tag) return root; if (root.childNodes) { for (node = root.firstChild; node; node=node.nextSibling) { if (node.localName != "template") { result = getFirstItemByTag(node, tag); if (resul...
return GetSelectedMessages()[0];
var selectedMessages = GetSelectedMessages(); if (selectedMessages) return selectedMessages[0]; else return null;
function GetFirstSelectedMessage(){ try { // Use this instead of gDBView.URIForFirstSelectedMessage, else it // will return the currentIndex message instead of the highlighted // message. return GetSelectedMessages()[0]; } catch (ex) { return null; }}
drive = path.substring( slash, bar );
drive = path.substring( slash + 1, bar );
function getFolder( window ){ platform = getPlatform(); var path = unescape( window.location.pathname ); if ( platform == "Macintosh" ) { // Macintosh support if ( ( x = path.lastIndexOf( "/" ) ) > 0 ) path = path.substring( 0, x + 1 ); //var fileArray = path.split( "/" ); //var newpath = fileArray.join( ":" ) ...
path = pathArray.join( "\\" );
path = pathArray.join( "\\" ) + "\\";
function getFolder( window ){ platform = getPlatform(); var path = unescape( window.location.pathname ); if ( platform == "Macintosh" ) { // Macintosh support if ( ( x = path.lastIndexOf( "/" ) ) > 0 ) path = path.substring( 0, x + 1 ); //var fileArray = path.split( "/" ); //var newpath = fileArray.join( ":" ) ...