rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
return prefObj.GetBoolPref (prefName);
|
return prefObj.getBoolPref (prefName);
|
function getBoolPref (prefObj, prefName, defaultValue){ var e; try { return prefObj.GetBoolPref (prefName); } catch (e) { return defaultValue; } }
|
return "properties"
|
return "save"
|
getBrowserTargetFromEvent: function (aEvent) { var button = (aEvent.type == "command" || aEvent.type == "keypress") ? 0 :aEvent.button; if (aEvent.shiftKey) return "window"; else if (aEvent.ctrlKey) return "tab"; else if (aEvent.altKey) return "properties" else return "current"; },
|
aEvent.preventDefault();
|
getBrowserTargetFromEvent: function (aEvent) { if (!aEvent) return null; switch (aEvent.type) { case "click": case "dblclick": if (aEvent.button > 1) return null; if (aEvent.button != 1 && !aEvent.metaKey && !aEvent.ctrlKey) return "current"; break; case "keypress": case "command": if (!aEvent.metaKey && !aEvent.ctrlKey) return "current"; break; default: return null; } if (PREF && PREF.getBoolPref("browser.tabs.opentabfor.middleclick")) return this.shouldLoadTabInBackground(aEvent) ? "tab_background" : "tab"; if (PREF && PREF.getBoolPref("middlemouse.openNewWindow")) return "window"; return null; },
|
|
var prefs = Components.classes["@mozilla.org/preferences;1"]; if (prefs) { prefs = prefs.getService(); if (prefs) prefs = prefs.QueryInterface(Components.interfaces.nsIPref); } if (prefs) { var url = prefs.CopyCharPref("browser.chromeURL"); if (url) return url; }
|
var prefs = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); var url = prefs.getCharPref("browser.chromeURL"); if (url) return url;
|
function getBrowserURL() { try { var prefs = Components.classes["@mozilla.org/preferences;1"]; if (prefs) { prefs = prefs.getService(); if (prefs) prefs = prefs.QueryInterface(Components.interfaces.nsIPref); } if (prefs) { var url = prefs.CopyCharPref("browser.chromeURL"); if (url) return url; } } catch(e) { } return "chrome://navigator/content/navigator.xul";}
|
return target.childNodes.length>4?
|
return target.hasChildNodes()?
|
getBTOrientation: function (aEvent, aTarget) { var target if (!aTarget) target = aEvent.target; else target = aTarget; if (target.localName == "menu" && target.parentNode.localName != "menupopup" || target.id == "bookmarks-chevron") return BookmarksUtils.DROP_ON; if (target.id == "bookmarks-ptf") { return target.childNodes.length>4? BookmarksUtils.DROP_AFTER:BookmarksUtils.DROP_ON; } var overButtonBoxObject = target.boxObject.QueryInterface(Components.interfaces.nsIBoxObject); var overParentBoxObject = target.parentNode.boxObject.QueryInterface(Components.interfaces.nsIBoxObject); var size, border; var coordValue, clientCoordValue; switch (target.localName) { case "toolbarseparator": case "toolbarbutton": size = overButtonBoxObject.width; coordValue = overButtonBoxObject.x; clientCoordValue = aEvent.clientX; break; case "menuseparator": case "menu": case "menuitem": size = overButtonBoxObject.height; coordValue = overButtonBoxObject.y-overParentBoxObject.y; clientCoordValue = aEvent.clientY; break; default: return BookmarksUtils.DROP_ON; } if (this.isBTContainer(target)) if (target.localName == "toolbarbutton") { // the DROP_BEFORE area excludes the label var iconNode = document.getAnonymousElementByAttribute(target, "class", "toolbarbutton-icon"); border = parseInt(document.defaultView.getComputedStyle(target,"").getPropertyValue("padding-left")) + parseInt(document.defaultView.getComputedStyle(iconNode ,"").getPropertyValue("width")); border = Math.min(size/5,Math.max(border,4)); } else border = size/5; else border = size/2; // in the first region? if (clientCoordValue-coordValue < border) return BookmarksUtils.DROP_BEFORE; // in the last region? if (clientCoordValue-coordValue >= size-border) return BookmarksUtils.DROP_AFTER; // must be in the middle somewhere return BookmarksUtils.DROP_ON; },
|
coordValue = overButtonBoxObject.y-overParentBoxObject.y; clientCoordValue = aEvent.clientY;
|
coordValue = overButtonBoxObject.screenY; clientCoordValue = aEvent.screenY;
|
getBTOrientation: function (aEvent, aTarget) { var target if (!aTarget) target = aEvent.target; else target = aTarget; if (target.localName == "menu" && target.parentNode.localName != "menupopup") return BookmarksUtils.DROP_ON; if (target.id == "bookmarks-ptf" || target.id == "bookmarks-chevron") { return BookmarksUtils.DROP_ON; } var overButtonBoxObject = target.boxObject.QueryInterface(Components.interfaces.nsIBoxObject); var overParentBoxObject = target.parentNode.boxObject.QueryInterface(Components.interfaces.nsIBoxObject); var size, border; var coordValue, clientCoordValue; switch (target.localName) { case "toolbarseparator": case "toolbarbutton": size = overButtonBoxObject.width; coordValue = overButtonBoxObject.x; clientCoordValue = aEvent.clientX; break; case "menuseparator": case "menu": case "menuitem": size = overButtonBoxObject.height; coordValue = overButtonBoxObject.y-overParentBoxObject.y; clientCoordValue = aEvent.clientY; break; default: return BookmarksUtils.DROP_ON; } if (this.isBTContainer(target)) if (target.localName == "toolbarbutton") { // the DROP_BEFORE area excludes the label var iconNode = document.getAnonymousElementByAttribute(target, "class", "toolbarbutton-icon"); border = parseInt(document.defaultView.getComputedStyle(target,"").getPropertyValue("padding-left")) + parseInt(document.defaultView.getComputedStyle(iconNode ,"").getPropertyValue("width")); border = Math.min(size/5,Math.max(border,4)); } else border = size/5; else border = size/2; // in the first region? if (clientCoordValue-coordValue < border) return BookmarksUtils.DROP_BEFORE; // in the last region? if (clientCoordValue-coordValue >= size-border) return BookmarksUtils.DROP_AFTER; // must be in the middle somewhere return BookmarksUtils.DROP_ON; },
|
break; case "bookmarks-chevron": parent = "NC:PersonalToolbarFolder";
|
getBTTarget: function (aNode, aOrientation) { var item, parent, index; switch (aNode.id) { case "bookmarks-ptf": parent = "NC:PersonalToolbarFolder"; break; case "BookmarksMenu": parent = "NC:BookmarksRoot"; break; default: if (aOrientation == BookmarksUtils.DROP_ON) parent = aNode.id else { parent = this.getBTContainer(aNode); item = aNode; } } parent = RDF.GetResource(parent); if (aOrientation == BookmarksUtils.DROP_ON) return BookmarksUtils.getTargetFromFolder(parent); item = RDF.GetResource(item.id); RDFC.Init(BMDS, parent); index = RDFC.IndexOf(item); if (aOrientation == BookmarksUtils.DROP_AFTER) ++index; return { parent: parent, index: index }; },
|
|
this.m_defaultCalendar = new calWcapCalendar(this.userId, this);
|
this.m_defaultCalendar = createWcapCalendar(this.userId, this);
|
getCalendarByCalId: function( calId ) { var ret; if (calId == null || this.userId == calId) { if (this.m_defaultCalendar == null) this.m_defaultCalendar = new calWcapCalendar(this.userId, this); ret = this.m_defaultCalendar; } else { var key = encodeURIComponent(calId); ret = this.m_calIdToCalendar[key]; if (!ret) { ret = new calWcapCalendar(calId, this); this.m_calIdToCalendar[key] = ret; } } return ret; },
|
ret = new calWcapCalendar(calId, this);
|
ret = createWcapCalendar(calId, this);
|
getCalendarByCalId: function( calId ) { var ret; if (calId == null || this.userId == calId) { if (this.m_defaultCalendar == null) this.m_defaultCalendar = new calWcapCalendar(this.userId, this); ret = this.m_defaultCalendar; } else { var key = encodeURIComponent(calId); ret = this.m_calIdToCalendar[key]; if (!ret) { ret = new calWcapCalendar(calId, this); this.m_calIdToCalendar[key] = ret; } } return ret; },
|
this.getCalProps_(false );
|
getCalendarProperties: function( propName, out_count ) { this.getCalProps_(false /* !async: waits for response */); var ret = []; if (this.m_calProps != null) { var nodeList = this.m_calProps.getElementsByTagName(propName); for ( var i = 0; i < nodeList.length; ++i ) { ret.push( trimString(nodeList.item(i).textContent) ); } } out_count.value = ret.length; return ret; },
|
|
if (this.m_calProps != null) { var nodeList = this.m_calProps.getElementsByTagName(propName);
|
var calProps = this.getCalProps_(false ); if (calProps != null) { var nodeList = calProps.getElementsByTagName(propName);
|
getCalendarProperties: function( propName, out_count ) { this.getCalProps_(false /* !async: waits for response */); var ret = []; if (this.m_calProps != null) { var nodeList = this.m_calProps.getElementsByTagName(propName); for ( var i = 0; i < nodeList.length; ++i ) { ret.push( trimString(nodeList.item(i).textContent) ); } } out_count.value = ret.length; return ret; },
|
this.mCache[id] = this.createCalendar(stmt.row.name, stmt.row.type, makeURI(stmt.row.uri));
|
this.mCache[id] = this.createCalendar(stmt.row.type, makeURI(stmt.row.uri));
|
getCalendars: function(count) { var calendars = []; var stmt = this.mSelectCalendars; stmt.reset(); while (stmt.step()) { var id = stmt.row.id; if (!this.mCache[id]) { try { this.mCache[id] = this.createCalendar(stmt.row.name, stmt.row.type, makeURI(stmt.row.uri)); } catch (e) { dump("Can't create calendar for " + id + " (" + stmt.row.name + ", " + stmt.row.type + ", " + stmt.row.uri + "): " + e + "\n"); continue; } } calendars.push(this.mCache[id]); } stmt.reset(); count.value = calendars.length; return calendars; },
|
dump("Can't create calendar for " + id + " (" + stmt.row.name + ", " + stmt.row.type + ", " +
|
dump("Can't create calendar for " + id + " (" + stmt.row.type + ", " +
|
getCalendars: function(count) { var calendars = []; var stmt = this.mSelectCalendars; stmt.reset(); while (stmt.step()) { var id = stmt.row.id; if (!this.mCache[id]) { try { this.mCache[id] = this.createCalendar(stmt.row.name, stmt.row.type, makeURI(stmt.row.uri)); } catch (e) { dump("Can't create calendar for " + id + " (" + stmt.row.name + ", " + stmt.row.type + ", " + stmt.row.uri + "): " + e + "\n"); continue; } } calendars.push(this.mCache[id]); } stmt.reset(); count.value = calendars.length; return calendars; },
|
try { if (bRefresh || !this.m_calProps) { var url = this.getCommandUrl( "get_calprops" ); url += "&fmt-out=text%2Fxml"; var this_ = this; function resp( wcapResponse ) { try { var xml = wcapResponse.data; if (this_.m_calProps == null) this_.m_calProps = xml; } catch (exc) { this_.logError( exc );
|
if (bRefresh || !this.m_calProps) { this.m_calProps = null; var url = this.getCommandUrl( "get_calprops" ); url += "&fmt-out=text%2Fxml"; var this_ = this; function resp( wcapResponse ) { try { var xml = wcapResponse.data; if (this_.m_calProps == null) this_.m_calProps = xml; } catch (exc) { this_.logError(exc); if (!bAsync && testResultCode( exc, Components.interfaces. calIWcapErrors.WCAP_ACCESS_DENIED_TO_CALENDAR)) { throw exc;
|
getCalProps_: function( bAsync, bRefresh ) {// this.session.assureLoggedIn(); try { if (bRefresh || !this.m_calProps) { var url = this.getCommandUrl( "get_calprops" ); url += "&fmt-out=text%2Fxml"; var this_ = this; function resp( wcapResponse ) { try { // first statement, may throw: var xml = wcapResponse.data; if (this_.m_calProps == null) this_.m_calProps = xml; } catch (exc) {// // patch to read-only here, because error notification// // call the readOnly attribute, thus we would run into// // endless recursion here:// this_.m_bReadOnly = true; // just logging here, because user may have dangling // users referred in his subscription list: this_.logError( exc ); // though we continue to try to get that calprops // next time... } } if (bAsync) this.session.issueAsyncRequest( url, stringToXml, resp ); else this.session.issueSyncRequest( url, stringToXml, resp ); } } catch (exc) {// // patch to read-only here, because error notification call the// // readOnly attribute, thus we would run into endless recursion here// this.m_bReadOnly = true; this.logError( exc ); if (!bAsync) throw exc; } return this.m_calProps; },
|
if (bAsync) this.session.issueAsyncRequest( url, stringToXml, resp ); else this.session.issueSyncRequest( url, stringToXml, resp );
|
getCalProps_: function( bAsync, bRefresh ) {// this.session.assureLoggedIn(); try { if (bRefresh || !this.m_calProps) { var url = this.getCommandUrl( "get_calprops" ); url += "&fmt-out=text%2Fxml"; var this_ = this; function resp( wcapResponse ) { try { // first statement, may throw: var xml = wcapResponse.data; if (this_.m_calProps == null) this_.m_calProps = xml; } catch (exc) {// // patch to read-only here, because error notification// // call the readOnly attribute, thus we would run into// // endless recursion here:// this_.m_bReadOnly = true; // just logging here, because user may have dangling // users referred in his subscription list: this_.logError( exc ); // though we continue to try to get that calprops // next time... } } if (bAsync) this.session.issueAsyncRequest( url, stringToXml, resp ); else this.session.issueSyncRequest( url, stringToXml, resp ); } } catch (exc) {// // patch to read-only here, because error notification call the// // readOnly attribute, thus we would run into endless recursion here// this.m_bReadOnly = true; this.logError( exc ); if (!bAsync) throw exc; } return this.m_calProps; },
|
|
} catch (exc) { this.logError( exc ); if (!bAsync) throw exc;
|
if (bAsync) this.session.issueAsyncRequest( url, stringToXml, resp ); else this.session.issueSyncRequest( url, stringToXml, resp );
|
getCalProps_: function( bAsync, bRefresh ) {// this.session.assureLoggedIn(); try { if (bRefresh || !this.m_calProps) { var url = this.getCommandUrl( "get_calprops" ); url += "&fmt-out=text%2Fxml"; var this_ = this; function resp( wcapResponse ) { try { // first statement, may throw: var xml = wcapResponse.data; if (this_.m_calProps == null) this_.m_calProps = xml; } catch (exc) {// // patch to read-only here, because error notification// // call the readOnly attribute, thus we would run into// // endless recursion here:// this_.m_bReadOnly = true; // just logging here, because user may have dangling // users referred in his subscription list: this_.logError( exc ); // though we continue to try to get that calprops // next time... } } if (bAsync) this.session.issueAsyncRequest( url, stringToXml, resp ); else this.session.issueSyncRequest( url, stringToXml, resp ); } } catch (exc) {// // patch to read-only here, because error notification call the// // readOnly attribute, thus we would run into endless recursion here// this.m_bReadOnly = true; this.logError( exc ); if (!bAsync) throw exc; } return this.m_calProps; },
|
return this.m_calProps;
|
getCalProps_: function( bAsync ) { try { if (this.m_calProps == null) { var url = this.session.getCommandUrl( "get_calprops" ); // xxx todo: for now this alwas gets the description of // the original calId_ url += ("&calid=" + encodeURIComponent(this.calId_)); url += "&fmt-out=text%2Fxml"; var this_ = this; function resp( wcapResponse ) { try { // first statement, may throw: var xml = wcapResponse.data; if (this_.m_calProps == null) this_.m_calProps = xml; } catch (exc) { this_.notifyError( exc ); } } if (bAsync) this.session.issueAsyncRequest( url, stringToXml, resp ); else this.session.issueSyncRequest( url, stringToXml, resp ); } } catch (exc) { this.notifyError( exc ); throw exc; } },
|
|
this_.notifyError( exc );
|
this_.m_bReadOnly = true; 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 resp( wcapResponse ) { try { // first statement, may throw: var xml = wcapResponse.data; if (this_.m_calProps == null) this_.m_calProps = xml; } catch (exc) { this_.notifyError( exc ); } } if (bAsync) this.session.issueAsyncRequest( url, stringToXml, resp ); else this.session.issueSyncRequest( url, stringToXml, resp ); } } catch (exc) { this.notifyError( exc ); throw exc; } return this.m_calProps; },
|
this.m_bReadOnly = true;
|
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 resp( wcapResponse ) { try { // first statement, may throw: var xml = wcapResponse.data; if (this_.m_calProps == null) this_.m_calProps = xml; } catch (exc) { this_.notifyError( exc ); } } if (bAsync) this.session.issueAsyncRequest( url, stringToXml, resp ); else this.session.issueSyncRequest( url, stringToXml, resp ); } } catch (exc) { this.notifyError( exc ); throw exc; } return this.m_calProps; },
|
|
if ( cardproperty ) { doc.getElementById('FirstName').value = cardproperty.firstName; doc.getElementById('LastName').value = cardproperty.lastName; doc.getElementById('DisplayName').value = cardproperty.displayName; doc.getElementById('NickName').value = cardproperty.nickName; doc.getElementById('PrimaryEmail').value = cardproperty.primaryEmail; doc.getElementById('SecondEmail').value = cardproperty.secondEmail;
|
if ( cardproperty ) { doc.getElementById('FirstName').value = cardproperty.firstName; doc.getElementById('LastName').value = cardproperty.lastName; doc.getElementById('DisplayName').value = cardproperty.displayName; doc.getElementById('NickName').value = cardproperty.nickName;
|
function GetCardValues(cardproperty, doc){ if ( cardproperty ) { doc.getElementById('FirstName').value = cardproperty.firstName; doc.getElementById('LastName').value = cardproperty.lastName; doc.getElementById('DisplayName').value = cardproperty.displayName; doc.getElementById('NickName').value = cardproperty.nickName; doc.getElementById('PrimaryEmail').value = cardproperty.primaryEmail; doc.getElementById('SecondEmail').value = cardproperty.secondEmail; var popup = document.getElementById('PreferMailFormatPopup'); if ( popup ) popup.data = cardproperty.preferMailFormat; doc.getElementById('WorkPhone').value = cardproperty.workPhone; doc.getElementById('HomePhone').value = cardproperty.homePhone; doc.getElementById('FaxNumber').value = cardproperty.faxNumber; doc.getElementById('PagerNumber').value = cardproperty.pagerNumber; doc.getElementById('CellularNumber').value = cardproperty.cellularNumber; doc.getElementById('HomeAddress').value = cardproperty.homeAddress; doc.getElementById('HomeAddress2').value = cardproperty.homeAddress2; doc.getElementById('HomeCity').value = cardproperty.homeCity; doc.getElementById('HomeState').value = cardproperty.homeState; doc.getElementById('HomeZipCode').value = cardproperty.homeZipCode; doc.getElementById('HomeCountry').value = cardproperty.homeCountry; doc.getElementById('WebPage2').value = cardproperty.webPage2; doc.getElementById('JobTitle').value = cardproperty.jobTitle; doc.getElementById('Department').value = cardproperty.department; doc.getElementById('Company').value = cardproperty.company; doc.getElementById('WorkAddress').value = cardproperty.workAddress; doc.getElementById('WorkAddress2').value = cardproperty.workAddress2; doc.getElementById('WorkCity').value = cardproperty.workCity; doc.getElementById('WorkState').value = cardproperty.workState; doc.getElementById('WorkZipCode').value = cardproperty.workZipCode; doc.getElementById('WorkCountry').value = cardproperty.workCountry; doc.getElementById('WebPage1').value = cardproperty.webPage1; doc.getElementById('Custom1').value = cardproperty.custom1; doc.getElementById('Custom2').value = cardproperty.custom2; doc.getElementById('Custom3').value = cardproperty.custom3; doc.getElementById('Custom4').value = cardproperty.custom4; doc.getElementById('Notes').value = cardproperty.notes; }}
|
var popup = document.getElementById('PreferMailFormatPopup'); if ( popup ) popup.data = cardproperty.preferMailFormat;
|
doc.getElementById('PrimaryEmail').value = cardproperty.primaryEmail; doc.getElementById('SecondEmail').value = cardproperty.secondEmail;
|
function GetCardValues(cardproperty, doc){ if ( cardproperty ) { doc.getElementById('FirstName').value = cardproperty.firstName; doc.getElementById('LastName').value = cardproperty.lastName; doc.getElementById('DisplayName').value = cardproperty.displayName; doc.getElementById('NickName').value = cardproperty.nickName; doc.getElementById('PrimaryEmail').value = cardproperty.primaryEmail; doc.getElementById('SecondEmail').value = cardproperty.secondEmail; var popup = document.getElementById('PreferMailFormatPopup'); if ( popup ) popup.data = cardproperty.preferMailFormat; doc.getElementById('WorkPhone').value = cardproperty.workPhone; doc.getElementById('HomePhone').value = cardproperty.homePhone; doc.getElementById('FaxNumber').value = cardproperty.faxNumber; doc.getElementById('PagerNumber').value = cardproperty.pagerNumber; doc.getElementById('CellularNumber').value = cardproperty.cellularNumber; doc.getElementById('HomeAddress').value = cardproperty.homeAddress; doc.getElementById('HomeAddress2').value = cardproperty.homeAddress2; doc.getElementById('HomeCity').value = cardproperty.homeCity; doc.getElementById('HomeState').value = cardproperty.homeState; doc.getElementById('HomeZipCode').value = cardproperty.homeZipCode; doc.getElementById('HomeCountry').value = cardproperty.homeCountry; doc.getElementById('WebPage2').value = cardproperty.webPage2; doc.getElementById('JobTitle').value = cardproperty.jobTitle; doc.getElementById('Department').value = cardproperty.department; doc.getElementById('Company').value = cardproperty.company; doc.getElementById('WorkAddress').value = cardproperty.workAddress; doc.getElementById('WorkAddress2').value = cardproperty.workAddress2; doc.getElementById('WorkCity').value = cardproperty.workCity; doc.getElementById('WorkState').value = cardproperty.workState; doc.getElementById('WorkZipCode').value = cardproperty.workZipCode; doc.getElementById('WorkCountry').value = cardproperty.workCountry; doc.getElementById('WebPage1').value = cardproperty.webPage1; doc.getElementById('Custom1').value = cardproperty.custom1; doc.getElementById('Custom2').value = cardproperty.custom2; doc.getElementById('Custom3').value = cardproperty.custom3; doc.getElementById('Custom4').value = cardproperty.custom4; doc.getElementById('Notes').value = cardproperty.notes; }}
|
doc.getElementById('WorkPhone').value = cardproperty.workPhone; doc.getElementById('HomePhone').value = cardproperty.homePhone; doc.getElementById('FaxNumber').value = cardproperty.faxNumber; doc.getElementById('PagerNumber').value = cardproperty.pagerNumber; doc.getElementById('CellularNumber').value = cardproperty.cellularNumber;
|
var popup = document.getElementById('PreferMailFormatPopup'); if ( popup ) popup.value = cardproperty.preferMailFormat;
|
function GetCardValues(cardproperty, doc){ if ( cardproperty ) { doc.getElementById('FirstName').value = cardproperty.firstName; doc.getElementById('LastName').value = cardproperty.lastName; doc.getElementById('DisplayName').value = cardproperty.displayName; doc.getElementById('NickName').value = cardproperty.nickName; doc.getElementById('PrimaryEmail').value = cardproperty.primaryEmail; doc.getElementById('SecondEmail').value = cardproperty.secondEmail; var popup = document.getElementById('PreferMailFormatPopup'); if ( popup ) popup.data = cardproperty.preferMailFormat; doc.getElementById('WorkPhone').value = cardproperty.workPhone; doc.getElementById('HomePhone').value = cardproperty.homePhone; doc.getElementById('FaxNumber').value = cardproperty.faxNumber; doc.getElementById('PagerNumber').value = cardproperty.pagerNumber; doc.getElementById('CellularNumber').value = cardproperty.cellularNumber; doc.getElementById('HomeAddress').value = cardproperty.homeAddress; doc.getElementById('HomeAddress2').value = cardproperty.homeAddress2; doc.getElementById('HomeCity').value = cardproperty.homeCity; doc.getElementById('HomeState').value = cardproperty.homeState; doc.getElementById('HomeZipCode').value = cardproperty.homeZipCode; doc.getElementById('HomeCountry').value = cardproperty.homeCountry; doc.getElementById('WebPage2').value = cardproperty.webPage2; doc.getElementById('JobTitle').value = cardproperty.jobTitle; doc.getElementById('Department').value = cardproperty.department; doc.getElementById('Company').value = cardproperty.company; doc.getElementById('WorkAddress').value = cardproperty.workAddress; doc.getElementById('WorkAddress2').value = cardproperty.workAddress2; doc.getElementById('WorkCity').value = cardproperty.workCity; doc.getElementById('WorkState').value = cardproperty.workState; doc.getElementById('WorkZipCode').value = cardproperty.workZipCode; doc.getElementById('WorkCountry').value = cardproperty.workCountry; doc.getElementById('WebPage1').value = cardproperty.webPage1; doc.getElementById('Custom1').value = cardproperty.custom1; doc.getElementById('Custom2').value = cardproperty.custom2; doc.getElementById('Custom3').value = cardproperty.custom3; doc.getElementById('Custom4').value = cardproperty.custom4; doc.getElementById('Notes').value = cardproperty.notes; }}
|
doc.getElementById('HomeAddress').value = cardproperty.homeAddress; doc.getElementById('HomeAddress2').value = cardproperty.homeAddress2; doc.getElementById('HomeCity').value = cardproperty.homeCity; doc.getElementById('HomeState').value = cardproperty.homeState; doc.getElementById('HomeZipCode').value = cardproperty.homeZipCode; doc.getElementById('HomeCountry').value = cardproperty.homeCountry; doc.getElementById('WebPage2').value = cardproperty.webPage2;
|
doc.getElementById('WorkPhone').value = cardproperty.workPhone; doc.getElementById('HomePhone').value = cardproperty.homePhone; doc.getElementById('FaxNumber').value = cardproperty.faxNumber; doc.getElementById('PagerNumber').value = cardproperty.pagerNumber; doc.getElementById('CellularNumber').value = cardproperty.cellularNumber;
|
function GetCardValues(cardproperty, doc){ if ( cardproperty ) { doc.getElementById('FirstName').value = cardproperty.firstName; doc.getElementById('LastName').value = cardproperty.lastName; doc.getElementById('DisplayName').value = cardproperty.displayName; doc.getElementById('NickName').value = cardproperty.nickName; doc.getElementById('PrimaryEmail').value = cardproperty.primaryEmail; doc.getElementById('SecondEmail').value = cardproperty.secondEmail; var popup = document.getElementById('PreferMailFormatPopup'); if ( popup ) popup.data = cardproperty.preferMailFormat; doc.getElementById('WorkPhone').value = cardproperty.workPhone; doc.getElementById('HomePhone').value = cardproperty.homePhone; doc.getElementById('FaxNumber').value = cardproperty.faxNumber; doc.getElementById('PagerNumber').value = cardproperty.pagerNumber; doc.getElementById('CellularNumber').value = cardproperty.cellularNumber; doc.getElementById('HomeAddress').value = cardproperty.homeAddress; doc.getElementById('HomeAddress2').value = cardproperty.homeAddress2; doc.getElementById('HomeCity').value = cardproperty.homeCity; doc.getElementById('HomeState').value = cardproperty.homeState; doc.getElementById('HomeZipCode').value = cardproperty.homeZipCode; doc.getElementById('HomeCountry').value = cardproperty.homeCountry; doc.getElementById('WebPage2').value = cardproperty.webPage2; doc.getElementById('JobTitle').value = cardproperty.jobTitle; doc.getElementById('Department').value = cardproperty.department; doc.getElementById('Company').value = cardproperty.company; doc.getElementById('WorkAddress').value = cardproperty.workAddress; doc.getElementById('WorkAddress2').value = cardproperty.workAddress2; doc.getElementById('WorkCity').value = cardproperty.workCity; doc.getElementById('WorkState').value = cardproperty.workState; doc.getElementById('WorkZipCode').value = cardproperty.workZipCode; doc.getElementById('WorkCountry').value = cardproperty.workCountry; doc.getElementById('WebPage1').value = cardproperty.webPage1; doc.getElementById('Custom1').value = cardproperty.custom1; doc.getElementById('Custom2').value = cardproperty.custom2; doc.getElementById('Custom3').value = cardproperty.custom3; doc.getElementById('Custom4').value = cardproperty.custom4; doc.getElementById('Notes').value = cardproperty.notes; }}
|
doc.getElementById('JobTitle').value = cardproperty.jobTitle; doc.getElementById('Department').value = cardproperty.department; doc.getElementById('Company').value = cardproperty.company; doc.getElementById('WorkAddress').value = cardproperty.workAddress; doc.getElementById('WorkAddress2').value = cardproperty.workAddress2; doc.getElementById('WorkCity').value = cardproperty.workCity; doc.getElementById('WorkState').value = cardproperty.workState; doc.getElementById('WorkZipCode').value = cardproperty.workZipCode; doc.getElementById('WorkCountry').value = cardproperty.workCountry; doc.getElementById('WebPage1').value = cardproperty.webPage1;
|
doc.getElementById('HomeAddress').value = cardproperty.homeAddress; doc.getElementById('HomeAddress2').value = cardproperty.homeAddress2; doc.getElementById('HomeCity').value = cardproperty.homeCity; doc.getElementById('HomeState').value = cardproperty.homeState; doc.getElementById('HomeZipCode').value = cardproperty.homeZipCode; doc.getElementById('HomeCountry').value = cardproperty.homeCountry; doc.getElementById('WebPage2').value = cardproperty.webPage2;
|
function GetCardValues(cardproperty, doc){ if ( cardproperty ) { doc.getElementById('FirstName').value = cardproperty.firstName; doc.getElementById('LastName').value = cardproperty.lastName; doc.getElementById('DisplayName').value = cardproperty.displayName; doc.getElementById('NickName').value = cardproperty.nickName; doc.getElementById('PrimaryEmail').value = cardproperty.primaryEmail; doc.getElementById('SecondEmail').value = cardproperty.secondEmail; var popup = document.getElementById('PreferMailFormatPopup'); if ( popup ) popup.data = cardproperty.preferMailFormat; doc.getElementById('WorkPhone').value = cardproperty.workPhone; doc.getElementById('HomePhone').value = cardproperty.homePhone; doc.getElementById('FaxNumber').value = cardproperty.faxNumber; doc.getElementById('PagerNumber').value = cardproperty.pagerNumber; doc.getElementById('CellularNumber').value = cardproperty.cellularNumber; doc.getElementById('HomeAddress').value = cardproperty.homeAddress; doc.getElementById('HomeAddress2').value = cardproperty.homeAddress2; doc.getElementById('HomeCity').value = cardproperty.homeCity; doc.getElementById('HomeState').value = cardproperty.homeState; doc.getElementById('HomeZipCode').value = cardproperty.homeZipCode; doc.getElementById('HomeCountry').value = cardproperty.homeCountry; doc.getElementById('WebPage2').value = cardproperty.webPage2; doc.getElementById('JobTitle').value = cardproperty.jobTitle; doc.getElementById('Department').value = cardproperty.department; doc.getElementById('Company').value = cardproperty.company; doc.getElementById('WorkAddress').value = cardproperty.workAddress; doc.getElementById('WorkAddress2').value = cardproperty.workAddress2; doc.getElementById('WorkCity').value = cardproperty.workCity; doc.getElementById('WorkState').value = cardproperty.workState; doc.getElementById('WorkZipCode').value = cardproperty.workZipCode; doc.getElementById('WorkCountry').value = cardproperty.workCountry; doc.getElementById('WebPage1').value = cardproperty.webPage1; doc.getElementById('Custom1').value = cardproperty.custom1; doc.getElementById('Custom2').value = cardproperty.custom2; doc.getElementById('Custom3').value = cardproperty.custom3; doc.getElementById('Custom4').value = cardproperty.custom4; doc.getElementById('Notes').value = cardproperty.notes; }}
|
doc.getElementById('Custom1').value = cardproperty.custom1; doc.getElementById('Custom2').value = cardproperty.custom2; doc.getElementById('Custom3').value = cardproperty.custom3; doc.getElementById('Custom4').value = cardproperty.custom4; doc.getElementById('Notes').value = cardproperty.notes; }
|
doc.getElementById('JobTitle').value = cardproperty.jobTitle; doc.getElementById('Department').value = cardproperty.department; doc.getElementById('Company').value = cardproperty.company; doc.getElementById('WorkAddress').value = cardproperty.workAddress; doc.getElementById('WorkAddress2').value = cardproperty.workAddress2; doc.getElementById('WorkCity').value = cardproperty.workCity; doc.getElementById('WorkState').value = cardproperty.workState; doc.getElementById('WorkZipCode').value = cardproperty.workZipCode; doc.getElementById('WorkCountry').value = cardproperty.workCountry; doc.getElementById('WebPage1').value = cardproperty.webPage1; doc.getElementById('Custom1').value = cardproperty.custom1; doc.getElementById('Custom2').value = cardproperty.custom2; doc.getElementById('Custom3').value = cardproperty.custom3; doc.getElementById('Custom4').value = cardproperty.custom4; doc.getElementById('Notes').value = cardproperty.notes; }
|
function GetCardValues(cardproperty, doc){ if ( cardproperty ) { doc.getElementById('FirstName').value = cardproperty.firstName; doc.getElementById('LastName').value = cardproperty.lastName; doc.getElementById('DisplayName').value = cardproperty.displayName; doc.getElementById('NickName').value = cardproperty.nickName; doc.getElementById('PrimaryEmail').value = cardproperty.primaryEmail; doc.getElementById('SecondEmail').value = cardproperty.secondEmail; var popup = document.getElementById('PreferMailFormatPopup'); if ( popup ) popup.data = cardproperty.preferMailFormat; doc.getElementById('WorkPhone').value = cardproperty.workPhone; doc.getElementById('HomePhone').value = cardproperty.homePhone; doc.getElementById('FaxNumber').value = cardproperty.faxNumber; doc.getElementById('PagerNumber').value = cardproperty.pagerNumber; doc.getElementById('CellularNumber').value = cardproperty.cellularNumber; doc.getElementById('HomeAddress').value = cardproperty.homeAddress; doc.getElementById('HomeAddress2').value = cardproperty.homeAddress2; doc.getElementById('HomeCity').value = cardproperty.homeCity; doc.getElementById('HomeState').value = cardproperty.homeState; doc.getElementById('HomeZipCode').value = cardproperty.homeZipCode; doc.getElementById('HomeCountry').value = cardproperty.homeCountry; doc.getElementById('WebPage2').value = cardproperty.webPage2; doc.getElementById('JobTitle').value = cardproperty.jobTitle; doc.getElementById('Department').value = cardproperty.department; doc.getElementById('Company').value = cardproperty.company; doc.getElementById('WorkAddress').value = cardproperty.workAddress; doc.getElementById('WorkAddress2').value = cardproperty.workAddress2; doc.getElementById('WorkCity').value = cardproperty.workCity; doc.getElementById('WorkState').value = cardproperty.workState; doc.getElementById('WorkZipCode').value = cardproperty.workZipCode; doc.getElementById('WorkCountry').value = cardproperty.workCountry; doc.getElementById('WebPage1').value = cardproperty.webPage1; doc.getElementById('Custom1').value = cardproperty.custom1; doc.getElementById('Custom2').value = cardproperty.custom2; doc.getElementById('Custom3').value = cardproperty.custom3; doc.getElementById('Custom4').value = cardproperty.custom4; doc.getElementById('Notes').value = cardproperty.notes; }}
|
return table[entry]; if ("fallback" in cat) { dump("\n--fallback: " + cat.fallback + "\n"); return cat.fallback.getCategoryEntry(category, entry); }
|
return table[entry]; if ("fallback" in cat) return cat.fallback.getCategoryEntry(category, entry);
|
proto.getCategoryEntry = function (category, entry) { var cat = this.categories[category]; if (!cat) return null; if ("override" in cat) return cat.override.getCategoryEntry(category, entry); var table = cat.table; if (entry in table) return table[entry]; if ("fallback" in cat) { dump("\n--fallback: " + cat.fallback + "\n"); return cat.fallback.getCategoryEntry(category, entry); } return null;};
|
if (!cat || (!entry in (table = cat.table))) return null;
|
if (!(cat && entry in (table = cat.table))) return null;
|
proto.getCategoryEntryRaw = function (category, entry) { var table; var cat = this.categories[category]; if (!cat || (!entry in (table = cat.table))) return null; if (entry in table) return table[entry]; if ("fallback" in cat) return cat.fallback.getCategoryEntry(category, entry); return null;}
|
else { properties.AppendElement(ltnGetAtom("unchecked")); }
|
getCellProperties: function (row, col, properties) { if (col.id == "col-calendar-Checkbox") { var cal = getCalendars()[row]; if (getCompositeCalendar().getCalendar(cal.uri)) { properties.AppendElement(ltnGetAtom("checked")); } } },
|
|
if( column == "unifinder-todo-tree-col-completed" ) { props.AppendElement(aserv.getAtom("completed")); }
|
getCellProperties : function( row,column, props ) { var aserv=Components.classes["@mozilla.org/atom-service;1"].createInstance(Components.interfaces.nsIAtomService); if( column == "unifinder-todo-tree-col-completed" ) { props.AppendElement(aserv.getAtom("completed")); } if( column == "unifinder-todo-tree-col-priority" ) { props.AppendElement(aserv.getAtom("highpriority")); } },
|
|
props.AppendElement(aserv.getAtom(ToDoProgressAtom(calendarToDo)));
|
getCellProperties : function( row,column, props ) { var aserv=Components.classes["@mozilla.org/atom-service;1"].createInstance(Components.interfaces.nsIAtomService); if( column == "unifinder-todo-tree-col-completed" ) { props.AppendElement(aserv.getAtom("completed")); } if( column == "unifinder-todo-tree-col-priority" ) { props.AppendElement(aserv.getAtom("highpriority")); } },
|
|
function getCellProperties(row, column) { return null; };
|
function getCellProperties(row, column, props) { if (!this.isContainer(row)) { return; } var atomSvc = Components.classes["@mozilla.org/atom-service;1"] .getService(Components.interfaces.nsIAtomService); props.AppendElement(atomSvc.getAtom("agenda-header")); };
|
function getCellProperties(row, column) { return null; };
|
switch( column.id )
|
switch( column.id || column )
|
getCellText : function(row,column) { calendarEvent = gEventArray[row]; switch( column.id ) { case "unifinder-search-results-tree-col-title": return( calendarEvent.title ); case "unifinder-search-results-tree-col-startdate": var eventStartDate = getNextOrPreviousRecurrence( calendarEvent ); var startTime = formatUnifinderEventTime( eventStartDate ); var startDate = formatUnifinderEventDate( eventStartDate ); if( calendarEvent.allDay ) { return(gCalendarBundle.getFormattedString("unifinderAlldayEventDate", [startDate])); } else { return(gCalendarBundle.getFormattedString("unifinderNormalEventDate", [startDate, startTime])); } case "unifinder-search-results-tree-col-enddate": var eventEndDate = getNextOrPreviousRecurrence( calendarEvent ); var eventLength = calendarEvent.end.getTime() - calendarEvent.start.getTime(); var actualEndDate = eventEndDate.getTime() + eventLength; eventEndDate = new Date( actualEndDate ); if( calendarEvent.allDay ) { //user-enddate is ical-enddate - 1 eventEndDate.setDate( eventEndDate.getDate() - 1 ); var endDate = formatUnifinderEventDate( eventEndDate ); return(gCalendarBundle.getFormattedString("unifinderAlldayEventDate", [endDate])); } else { var endTime = formatUnifinderEventTime( eventEndDate ); var endDate = formatUnifinderEventDate( eventEndDate ); return(gCalendarBundle.getFormattedString("unifinderNormalEventDate", [endDate, endTime])); } case "unifinder-search-results-tree-col-categories": return( calendarEvent.categories ); case "unifinder-search-results-tree-col-location": return( calendarEvent.location ); case "unifinder-search-results-tree-col-status": switch( calendarEvent.status ) { case calendarEvent.ICAL_STATUS_TENTATIVE: return( gCalendarBundle.getString( "Tentative" ) ); case calendarEvent.ICAL_STATUS_CONFIRMED: return( gCalendarBundle.getString( "Confirmed" ) ); case calendarEvent.ICAL_STATUS_CANCELLED: return( gCalendarBundle.getString( "Cancelled" ) ); default: return false; } return false; case "unifinder-search-results-tree-col-filename": var thisCalendar = gCalendarWindow.calendarManager.getCalendarByName( calendarEvent.parent.server ); if( thisCalendar ) return( thisCalendar.getAttribute( "http://home.netscape.com/NC-rdf#name" ) ); else return( "" ); default: return false; } }
|
switch( column.id )
|
switch( column.id || column )
|
getCellText : function(row,column) { calendarToDo = gTaskArray[row]; if( !calendarToDo ) return false; switch( column.id ) { case "unifinder-todo-tree-col-completed": return( "" ); case "unifinder-todo-tree-col-priority": return( "" ); case "unifinder-todo-tree-col-title": var titleText; if( calendarToDo.title == "" ) titleText = gCalendarBundle.getString( "eventUntitled" ); else titleText = calendarToDo.title; return( titleText ); case "unifinder-todo-tree-col-startdate": return( formatUnifinderEventDate( new Date( calendarToDo.start.getTime() ) ) ); case "unifinder-todo-tree-col-duedate": return( formatUnifinderEventDate( new Date( calendarToDo.due.getTime() ) ) ); case "unifinder-todo-tree-col-completeddate": return( formatUnifinderEventDate( new Date( calendarToDo.completed.getTime() ) ) ); case "unifinder-todo-tree-col-percentcomplete": return( calendarToDo.percent+"%" ); case "unifinder-todo-tree-col-categories": return( calendarToDo.categories ); default: return false; } }
|
break;
|
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"); gEventArray.sort(sortEvents); } calendarEvent = gEventArray[row]; var calendarStringBundle = srGetStrBundle("chrome://calendar/locale/calendar.properties"); switch( column ) { case "unifinder-search-results-tree-col-title": if( calendarEvent.title == "" ) var titleText = "Untitled"; else var titleText = calendarEvent.title; return( titleText ); break; case "unifinder-search-results-tree-col-startdate": var eventStartDate = getNextOrPreviousRecurrence( calendarEvent ); var startTime = formatUnifinderEventTime( eventStartDate ); var startDate = formatUnifinderEventDate( eventStartDate ); if( calendarEvent.allDay ) { startText = "All day " + startDate; } else { startText = startDate + " " + startTime; } return( startText ); break; case "unifinder-search-results-tree-col-enddate": var eventEndDate = new Date( calendarEvent.end.getTime() ); var endTime = formatUnifinderEventTime( eventEndDate ); var endDate = formatUnifinderEventDate( eventEndDate ); if( calendarEvent.allDay ) { endText = "All day " + endDate; } else { endText = endDate + " " + endTime; } return( endText ); break; case "unifinder-search-results-tree-col-categories": return( calendarEvent.categories ); break; case "unifinder-search-results-tree-col-location": return( calendarEvent.location ); break; case "unifinder-search-results-tree-col-status": switch( calendarEvent.status ) { case calendarEvent.ICAL_STATUS_TENTATIVE: return( calendarStringBundle.GetStringFromName( "Tentative" ) ); case calendarEvent.ICAL_STATUS_CONFIRMED: return( calendarStringBundle.GetStringFromName( "Confirmed" ) ); case calendarEvent.ICAL_STATUS_CANCELLED: return( calendarStringBundle.GetStringFromName( "Cancelled" ) ); } break; } }
|
|
return( formatUnifinderToDoDateTime( calendarToDo.completed ) );
|
return( formatUnifinderToDoDateTime( calendarToDo.completedDate ) );
|
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": return( "" ); case "unifinder-todo-tree-col-priority": return( "" ); case "unifinder-todo-tree-col-title": // return title, or "Untitled" if empty/null return calendarToDo.title || gCalendarBundle.getString( "eventUntitled" ); case "unifinder-todo-tree-col-startdate": return( formatUnifinderToDoDateTime( calendarToDo.start ) ); case "unifinder-todo-tree-col-duedate": return( formatUnifinderToDoDateTime( calendarToDo.due ) ); case "unifinder-todo-tree-col-completeddate": return( formatUnifinderToDoDateTime( calendarToDo.completed ) ); case "unifinder-todo-tree-col-percentcomplete": return( calendarToDo.percent+"%" ); case "unifinder-todo-tree-col-categories": return( calendarToDo.categories ); case "unifinder-todo-tree-col-location": return( calendarToDo.getProperty("LOCATION") ); case "unifinder-todo-tree-col-status": return getToDoStatusString(calendarToDo); case "unifinder-todo-tree-col-calendarname": return( calendarToDo.calendar.name ); default: return false; } }
|
case "unifinder-search-results-tree-col-filename": var thisCalendar = gCalendarWindow.calendarManager.getCalendarByName( calendarEvent.parent.server ); if( thisCalendar ) return( thisCalendar.getAttribute( "http: else return( "" );
|
getCellText : function(row,column) { calendarEvent = gEventArray[row]; var calendarStringBundle = srGetStrBundle("chrome://calendar/locale/calendar.properties"); switch( column ) { case "unifinder-search-results-tree-col-title": return( calendarEvent.title ); case "unifinder-search-results-tree-col-startdate": var eventStartDate = getNextOrPreviousRecurrence( calendarEvent ); var startTime = formatUnifinderEventTime( eventStartDate ); var startDate = formatUnifinderEventDate( eventStartDate ); if( calendarEvent.allDay ) { startText = "All day " + startDate; } else { startText = startDate + " " + startTime; } return( startText ); case "unifinder-search-results-tree-col-enddate": var eventEndDate = getNextOrPreviousRecurrence( calendarEvent ); var eventLength = calendarEvent.end.getTime() - calendarEvent.start.getTime(); var actualEndDate = eventEndDate.getTime() + eventLength; var eventEndDate = new Date( actualEndDate ); var endTime = formatUnifinderEventTime( eventEndDate ); var endDate = formatUnifinderEventDate( eventEndDate ); if( calendarEvent.allDay ) { endText = "All day " + endDate; } else { endText = endDate + " " + endTime; } return( endText ); case "unifinder-search-results-tree-col-categories": return( calendarEvent.categories ); case "unifinder-search-results-tree-col-location": return( calendarEvent.location ); case "unifinder-search-results-tree-col-status": switch( calendarEvent.status ) { case calendarEvent.ICAL_STATUS_TENTATIVE: return( calendarStringBundle.GetStringFromName( "Tentative" ) ); case calendarEvent.ICAL_STATUS_CONFIRMED: return( calendarStringBundle.GetStringFromName( "Confirmed" ) ); case calendarEvent.ICAL_STATUS_CANCELLED: return( calendarStringBundle.GetStringFromName( "Cancelled" ) ); default: return false; } return false; default: return false; } }
|
|
getCellText: function getCellText(index, column) { return itemArray[index].getCellText(column); },
|
optgroupObject.prototype.getCellText = function getCellText(column) { return column == "SelectTextCol" ? this.element.label : ""; }
|
getCellText: function getCellText(index, column) { return itemArray[index].getCellText(column); },
|
["collapseActions", 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) { onChannelPrefChanged (channel, prefName, newValue, oldValue); }; var logDefault = client.prefManager.logPath.clone(); var filename = pref_mungeName(network.encodedName) + "," + pref_mungeName(channel.encodedName); logDefault.append(escapeFileName(filename) + ".log"); var prefs = [ ["autoRejoin", defer, ".connect"], ["bugURL", defer, "appearance.misc"], ["charset", defer, ".connect"], ["collapseMsgs", defer, "appearance.misc"], ["displayHeader", client.prefs["channelHeader"], "appearance.misc"], ["font.family", defer, "appearance.misc"], ["font.size", defer, "appearance.misc"], ["hasPrefs", false, "hidden"], ["log", client.prefs["channelLog"], ".log"], ["logFileName", makeLogNameChannel, ".log"], ["motif.current", defer, "appearance.motif"], ["timestamps", defer, "appearance.timestamps"], ["timestampFormat", defer, "appearance.timestamps"], ["outputWindowURL", defer, "appearance.misc"] ]; var branch = "extensions.irc.networks." + pref_mungeName(network.encodedName) + ".channels." + pref_mungeName(channel.encodedName) + "." var prefManager = new PrefManager(branch, client.defaultBundle); prefManager.addPrefs(prefs); prefManager.addObserver({ onPrefChanged: onPrefChanged }); network.prefManager.addObserver(prefManager); client.prefManagers.push(prefManager); return prefManager;}
|
|
["autoRejoin", defer], ["charset", defer], ["collapseMsgs", defer], ["displayHeader", client.prefs["channelHeader"]], ["font.family", defer], ["font.size", defer], ["log", client.prefs["channelLog"]], ["logFileName", logDefault.path], ["motif.current", defer], ["timestamps", defer], ["timestampFormat", defer], ["outputWindowURL", defer]
|
["autoRejoin", defer, ".connect"], ["charset", defer, ".connect"], ["collapseMsgs", defer, "appearance.misc"], ["displayHeader", client.prefs["channelHeader"], "appearance.misc"], ["font.family", defer, "appearance.misc"], ["font.size", defer, "appearance.misc"], ["hasPrefs", false, "hidden"], ["log", client.prefs["channelLog"], ".log"], ["logFileName", logDefault.path, ".log"], ["motif.current", defer, "appearance.motif"], ["timestamps", defer, "appearance.timestamps"], ["timestampFormat", defer, "appearance.timestamps"], ["outputWindowURL", defer, "appearance.misc"]
|
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 = client.prefManager.logPath.clone(); var filename = pref_mungeName(network.name) + "," + pref_mungeName(channel.name); logDefault.append(escapeFileName(filename) + ".log"); var prefs = [ ["autoRejoin", defer], ["charset", defer], ["collapseMsgs", defer], ["displayHeader", client.prefs["channelHeader"]], ["font.family", defer], ["font.size", defer], ["log", client.prefs["channelLog"]], ["logFileName", logDefault.path], ["motif.current", defer], ["timestamps", defer], ["timestampFormat", defer], ["outputWindowURL", defer] ]; var branch = "extensions.irc.networks." + pref_mungeName(network.name) + ".channels." + pref_mungeName(channel.normalizedName) + "." var prefManager = new PrefManager(branch, client.defaultBundle); prefManager.addPrefs(prefs); prefManager.onPrefChanged = onPrefChanged; client.prefManagers.push(prefManager); return prefManager;}
|
dd ("Reading pref '" + prefName + "' threw '" + e + "'");
|
function getCharPref (prefObj, prefName, defaultValue){ var e; try { return prefObj.CopyCharPref (prefName); } catch (e) { dd ("Reading pref '" + prefName + "' threw '" + e + "'"); return defaultValue; }}
|
|
return prefObj.CopyCharPref (prefName);
|
return prefObj.getCharPref (prefName);
|
function getCharPref (prefObj, prefName, defaultValue){ var e; try { return prefObj.CopyCharPref (prefName); } catch (e) { return defaultValue; }}
|
rv = prefObj.CopyCharPref (prefName);
|
rv = prefObj.getCharPref (prefName);
|
function getCharPref (prefObj, prefName, defaultValue){ var e, rv; try { rv = prefObj.CopyCharPref (prefName); } catch (e) { rv = defaultValue; } //dd ("getCharPref: returning '" + rv + "' for " + prefName); return rv; }
|
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; return false;}
|
var charsetAtom = ccm.GetCharsetAtom(charset); charsetTitle = ccm.GetCharsetTitle(charsetAtom); dump(charsetTitle);
|
try { var charsetAtom = ccm.GetCharsetAtom(charset); charsetTitle = ccm.GetCharsetTitle(charsetAtom); } catch (ex) { dump("failed to get a charset title of " + charset + "!\n"); charsetTitle = ""; }
|
function GetCharsetUIString(){ try { prefs = Components.classes['component://netscape/preferences']; prefs = prefs.getService(); prefs = prefs.QueryInterface(Components.interfaces.nsIPref); } catch (ex) { dump("failed to get prefs service!\n"); prefs = null; } var send_default_charset = prefs.CopyCharPref("mailnews.send_default_charset"); var charset = msgCompose.compFields.GetCharacterSet(); charset = charset.toUpperCase(); if (charset == "US-ASCII") charset = "ISO-8859-1"; if (charset != send_default_charset) { var charsetTitle = ""; try { var ccm = Components.classes['component://netscape/charset-converter-manager']; ccm = ccm.getService(); ccm = ccm.QueryInterface(Components.interfaces.nsICharsetConverterManager2); } catch (ex) { dump("failed to get charset-converter-manager service!\n"); ccm = null; } // get a localized string var charsetAtom = ccm.GetCharsetAtom(charset); charsetTitle = ccm.GetCharsetTitle(charsetAtom); dump(charsetTitle); return " - " + charsetTitle; } return "";}
|
if ("doAllowWindowOpen" in window)
|
if ("onCheckboxCheck" in window)
|
function getCheckboxValue(name){ if ("doAllowWindowOpen" in window) return document.getElementById(name).checked; return data[name].checked; }
|
var ioService = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService);
|
var ioService = getIoService();
|
getClassObject: function( compMgr, cid, iid ) { if (!this.m_scriptsLoaded) { // loading extra scripts from ../js: const scripts = [ "calWcapUtils.js", "calWcapErrors.js", "calWcapRequest.js", "calWcapSession.js", "calWcapCalendar.js", "calWcapCalendarItems.js", "calWcapCachedCalendar.js" ]; var scriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .createInstance(Components.interfaces.mozIJSSubScriptLoader); var ioService = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); var baseDir = __LOCATION__.parent.parent; baseDir.append("js"); for each ( var script in scripts ) { var scriptFile = baseDir.clone(); scriptFile.append(script); scriptLoader.loadSubScript( ioService.newFileURI(scriptFile).spec, null ); } initWcapProvider(); this.m_scriptsLoaded = true; } if (!cid.equals( calWcapCalendar.prototype.classID )) throw Components.results.NS_ERROR_NO_INTERFACE; if (!iid.equals( Components.interfaces.nsIFactory )) throw Components.results.NS_ERROR_NOT_IMPLEMENTED; return { // nsIFactory: lockFactory: function( lock ) {}, createInstance: function( outer, iid ) { if (outer != null) throw Components.results.NS_ERROR_NO_AGGREGATION; var session = new calWcapSession(); var cal = createWcapCalendar( null /* calId: null indicates default calendar */, session ); session.defaultCalendar = cal; return cal.QueryInterface( iid ); } }; },
|
if (!iid.equals( Components.interfaces.nsIFactory )) throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
|
getClassObject: function( compMgr, cid, iid ) { if (!this.m_scriptsLoaded) { // loading extra scripts from ../js: const scripts = [ "calWcapUtils.js", "calWcapErrors.js", "calWcapRequest.js", "calWcapSession.js", "calWcapCalendar.js", "calWcapCalendarItems.js", "calWcapCachedCalendar.js" ]; var scriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .createInstance(Components.interfaces.mozIJSSubScriptLoader); var ioService = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); var baseDir = __LOCATION__.parent.parent; baseDir.append("js"); for each ( var script in scripts ) { var scriptFile = baseDir.clone(); scriptFile.append(script); scriptLoader.loadSubScript( ioService.newFileURI(scriptFile).spec, null ); } initWcapProvider(); this.m_scriptsLoaded = true; } if (!cid.equals( calWcapCalendar.prototype.classID )) throw Components.results.NS_ERROR_NO_INTERFACE; if (!iid.equals( Components.interfaces.nsIFactory )) throw Components.results.NS_ERROR_NOT_IMPLEMENTED; return { // nsIFactory: lockFactory: function( lock ) {}, createInstance: function( outer, iid ) { if (outer != null) throw Components.results.NS_ERROR_NO_AGGREGATION; var session = new calWcapSession(); var cal = createWcapCalendar( null /* calId: null indicates default calendar */, session ); session.defaultCalendar = cal; return cal.QueryInterface( iid ); } }; },
|
|
init();
|
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", "calWcapCalendar.js", "calWcapCalendarItems.js", "calWcapCachedCalendar.js" ]; var scriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .createInstance(Components.interfaces.mozIJSSubScriptLoader); var ioService = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); for each ( var script in scripts ) { var scriptFile = __LOCATION__.parent.clone(); scriptFile.append(script); scriptLoader.loadSubScript( ioService.newFileURI(scriptFile).spec, null ); } init(); // init first time } if (!cid.equals( calWcapCalendar.prototype.classID )) throw Components.results.NS_ERROR_NO_INTERFACE; if (!iid.equals( Components.interfaces.nsIFactory )) throw Components.results.NS_ERROR_NOT_IMPLEMENTED; return { createInstance: function( outer, iid ) { if (outer != null) throw Components.results.NS_ERROR_NO_AGGREGATION; var cal; switch (CACHE) {// unsupported until fixed:// case "memory":// case "storage":// cal = new calWcapCachedCalendar();// break; default: cal = new calWcapCalendar( null /* calId: null indicates default calendar */, new calWcapSession() ); cal.session.defaultCalendar = cal; break; } return cal.QueryInterface( iid ); } }; },
|
|
var cal; switch (CACHE) { default: cal = new calWcapCalendar( null , new calWcapSession() ); cal.session.defaultCalendar = cal; break; }
|
var session = new calWcapSession(); var cal = createWcapCalendar( null , session ); 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", "calWcapCalendar.js", "calWcapCalendarItems.js", "calWcapCachedCalendar.js" ]; var scriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .createInstance(Components.interfaces.mozIJSSubScriptLoader); var ioService = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); for each ( var script in scripts ) { var scriptFile = __LOCATION__.parent.clone(); scriptFile.append(script); scriptLoader.loadSubScript( ioService.newFileURI(scriptFile).spec, null ); } init(); // init first time } if (!cid.equals( calWcapCalendar.prototype.classID )) throw Components.results.NS_ERROR_NO_INTERFACE; if (!iid.equals( Components.interfaces.nsIFactory )) throw Components.results.NS_ERROR_NOT_IMPLEMENTED; return { createInstance: function( outer, iid ) { if (outer != null) throw Components.results.NS_ERROR_NO_AGGREGATION; var cal; switch (CACHE) {// unsupported until fixed:// case "memory":// case "storage":// cal = new calWcapCachedCalendar();// break; default: cal = new calWcapCalendar( null /* calId: null indicates default calendar */, new calWcapSession() ); cal.session.defaultCalendar = cal; break; } return cal.QueryInterface( iid ); } }; },
|
var rv; try { var rdfSvc = Components.classes[RDFS_CONTRACTID].getService(nsIRDFService); var rdfDS = rdfSvc.GetDataSource("rdf:chrome"); var resSelf = rdfSvc.GetResource("urn:mozilla:package:chatzilla"); var resDisabled = rdfSvc.GetResource("http: rv = rdfDS.GetTarget(resSelf, resDisabled, true); } catch (e) { } if (rv) throw Components.results.NS_ERROR_NO_INTERFACE;
|
ChatzillaModule.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.interfaces.nsIFactory)) throw Components.results.NS_ERROR_NOT_IMPLEMENTED; throw Components.results.NS_ERROR_NO_INTERFACE; }
|
|
ChatzillaModule.getClassObject =
|
CalendarModule.getClassObject =
|
ChatzillaModule.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; if (!iid.equals(Components.interfaces.nsIFactory)) throw Components.results.NS_ERROR_NOT_IMPLEMENTED; throw Components.results.NS_ERROR_NO_INTERFACE;}
|
if (!componentInitRun) { initBaseComponent(); componentInitRun = true; }
|
getClassObject: function (compMgr, cid, iid) { if (!iid.equals(Components.interfaces.nsIFactory)) throw Components.results.NS_ERROR_NOT_IMPLEMENTED; if (!this.mScriptsLoaded) this.loadScripts(); for (var i = 0; i < componentData.length; i++) { if (cid.equals(componentData[i].cid)) { if (componentData[i].onComponentLoad) { eval(componentData[i].onComponentLoad); } // eval to get usual scope-walking return this.makeFactoryFor(eval(componentData[i].constructor)); } } throw Components.results.NS_ERROR_NO_INTERFACE; },
|
|
else if (cid.equals(NS_LDAPCONNECTIONRDFDELEGATEFACTORY_CID)) return this.nsLDAPConnectionRDFDelegateFactoryFactory;
|
getClassObject: function(compMgr, cid, iid) { if (!iid.equals(Components.interfaces.nsIFactory)) { throw Components.results.NS_ERROR_NOT_IMPLEMENTED; } if (cid.equals(NS_LDAPDATASOURCE_CID)) return this.nsLDAPDataSourceFactory; else if (cid.equals(NS_LDAPMESSAGERDFDELEGATEFACTORY_CID)) return this.nsLDAPMessageRDFDelegateFactoryFactory; else if (cid.equals(NS_LDAPURLRDFDELEGATEFACTORY_CID)) return this.nsLDAPURLRDFDelegateFactoryFactory; else if (cid.equals(NS_LDAPCONNECTIONRDFDELEGATEFACTORY_CID)) return this.nsLDAPConnectionRDFDelegateFactoryFactory; throw Components.results.NS_ERROR_NO_INTERFACE; },
|
|
if (cid.equals(CLINE_SERVICE_CID)) return CLineFactory;
|
if (cid.equals(XMLTERMCLINE_SERVICE_CID)) return XMLTermCLineFactory;
|
XMLtermModule.getClassObject =function (compMgr, cid, iid) { if (cid.equals(CLINE_SERVICE_CID)) return CLineFactory; if (cid.equals(TELNETCNT_HANDLER_CID)) return TelnetContentHandlerFactory; if (cid.equals(TELNETPROT_HANDLER_CID)) return TelnetProtocolHandlerFactory; if (!iid.equals(Components.interfaces.nsIFactory)) throw Components.results.NS_ERROR_NOT_IMPLEMENTED; throw Components.results.NS_ERROR_NO_INTERFACE; }
|
if (cid.equals(TELNETCNT_HANDLER_CID)) return TelnetContentHandlerFactory;
|
if (cid.equals(XMLTERMCNT_HANDLER_CID)) return XMLTermContentHandlerFactory;
|
XMLtermModule.getClassObject =function (compMgr, cid, iid) { if (cid.equals(CLINE_SERVICE_CID)) return CLineFactory; if (cid.equals(TELNETCNT_HANDLER_CID)) return TelnetContentHandlerFactory; if (cid.equals(TELNETPROT_HANDLER_CID)) return TelnetProtocolHandlerFactory; if (!iid.equals(Components.interfaces.nsIFactory)) throw Components.results.NS_ERROR_NOT_IMPLEMENTED; throw Components.results.NS_ERROR_NO_INTERFACE; }
|
if (cid.equals(TELNETPROT_HANDLER_CID)) return TelnetProtocolHandlerFactory;
|
if (cid.equals(XMLTERMPROT_HANDLER_CID)) return XMLTermProtocolHandlerFactory;
|
XMLtermModule.getClassObject =function (compMgr, cid, iid) { if (cid.equals(CLINE_SERVICE_CID)) return CLineFactory; if (cid.equals(TELNETCNT_HANDLER_CID)) return TelnetContentHandlerFactory; if (cid.equals(TELNETPROT_HANDLER_CID)) return TelnetProtocolHandlerFactory; if (!iid.equals(Components.interfaces.nsIFactory)) throw Components.results.NS_ERROR_NOT_IMPLEMENTED; throw Components.results.NS_ERROR_NO_INTERFACE; }
|
return arguments.callee.__parent__ == global;
|
return arguments.callee.__parent__ == GLOBAL;
|
function getclosure(){ return function () { return arguments.callee.__parent__ == global; };}
|
color = colorPicker.getAttribute('color');
|
color = colorPicker.getAttribute("color");
|
function getColor(ColorPickerID){ var colorPicker = document.getElementById(ColorPickerID); var color; if (colorPicker) { // Extract color from colorPicker and assign to colorWell. color = colorPicker.getAttribute('color'); if (color && color == "") return null; } return color;}
|
var colorWell = document.getElementById(ColorWellID);
|
var colorWell; if (ColorWellID) colorWell = document.getElementById(ColorWellID);
|
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("setColor to: "+color+"\n"); if (colorWell && color) { // Use setAttribute so colorwell can be a XUL element, such as titledbutton colorWell.setAttribute("style", "background-color: " + color); } } //TODO: Trigger UI update to get color from the current caret/selection return color;}
|
dump("ColorPicker found\n");
|
function getColorAndSetColorWell(ColorPickerID, ColorWellID){ var colorWell; if (ColorWellID) colorWell = document.getElementById(ColorWellID); var colorPicker = document.getElementById(ColorPickerID); if (colorPicker) {dump("ColorPicker found\n"); // Extract color from colorPicker and assign to colorWell. var color = colorPicker.getAttribute('color'); dump("setColor to: "+color+"\n"); if (colorWell && color) { // Use setAttribute so colorwell can be a XUL element, such as titledbutton colorWell.setAttribute("style", "background-color: " + color); } } //TODO: Trigger UI update to get color from the current caret/selection return color;}
|
|
if (!gDialog.CustomColorsRadio.checked) return;
|
if (!gDialog.CustomColorsRadio.selected) return;
|
function GetColorAndUpdate(ColorWellID){ // Only allow selecting when in custom mode if (!gDialog.CustomColorsRadio.checked) return; var colorObj = new Object; var colorWell = document.getElementById(ColorWellID); if (!colorWell) return; // Don't allow a blank color, i.e., using the "default" colorObj.NoDefault = true; switch( ColorWellID ) { case "textCW": colorObj.Type = "Text"; colorObj.TextColor = customTextColor; break; case "linkCW": colorObj.Type = "Link"; colorObj.TextColor = customLinkColor; break; case "activeCW": colorObj.Type = "ActiveLink"; colorObj.TextColor = customActiveColor; break; case "visitedCW": colorObj.Type = "VisitedLink"; colorObj.TextColor = customVisitedColor; break; case "backgroundCW": colorObj.Type = "Page"; colorObj.PageColor = customBackgroundColor; break; } window.openDialog("chrome://editor/content/EdColorPicker.xul", "_blank", "chrome,close,titlebar,modal", "", colorObj); // User canceled the dialog if (colorObj.Cancel) return; var color = ""; switch( ColorWellID ) { case "textCW": color = customTextColor = colorObj.TextColor; gDialog.NormalData.setAttribute("value", color); break; case "linkCW": color = customLinkColor = colorObj.TextColor; gDialog.LinkData.setAttribute("value", color); break; case "activeCW": color = customActiveColor = colorObj.TextColor; gDialog.ActiveLinkData.setAttribute("value", color); break; case "visitedCW": color = customVisitedColor = colorObj.TextColor; gDialog.VisitedLinkData.setAttribute("value", color); break; case "backgroundCW": color = customBackgroundColor = colorObj.BackgroundColor; gDialog.BackgroundColorData.setAttribute("value", color); break; } setColorWell(ColorWellID, color); SetColorPreview(ColorWellID, color);}
|
SetColor(ColorWellID, getColor(ColorPickerID));
|
var color = null; if (ColorPickerID) color = getColor(ColorPickerID); SetColor(ColorWellID, color);
|
function GetColorAndUpdate(ColorPickerID, ColorWellID, widget){ // Close the colorpicker widget.parentNode.closePopup(); SetColor(ColorWellID, getColor(ColorPickerID));}
|
dump(" *** customTextColor="+customTextColor+",customLinkColor="+customLinkColor+", customActiveColor="+customActiveColor+", customVisitedColor="+customVisitedColor+", customBackgroundColor="+customBackgroundColor+"\n");
|
function GetColorAndUpdate(ColorWellID){ // Only allow selecting when in custom mode if (!dialog.CustomColorsRadio.checked) return; var colorObj = new Object; var colorWell = document.getElementById(ColorWellID); if (!colorWell) return; // Don't allow a blank color, i.e., using the "default" colorObj.NoDefault = true; switch( ColorWellID ) { case "textCW": colorObj.Type = "Text"; colorObj.TextColor = customTextColor; break; case "linkCW": colorObj.Type = "Link"; colorObj.TextColor = customLinkColor; break; case "activeCW": colorObj.Type = "ActiveLink"; colorObj.TextColor = customActiveColor; break; case "visitedCW": colorObj.Type = "VisitedLink"; colorObj.TextColor = customVisitedColor; break; case "backgroundCW": colorObj.Type = "Page"; colorObj.PageColor = customBackgroundColor; break; } window.openDialog("chrome://editor/content/EdColorPicker.xul", "_blank", "chrome,close,titlebar,modal", "", colorObj); // User canceled the dialog if (colorObj.Cancel) return; var color = ""; switch( ColorWellID ) { case "textCW": color = customTextColor = colorObj.TextColor; dialog.NormalData.setAttribute("value", color); break; case "linkCW": color = customLinkColor = colorObj.TextColor; dialog.LinkData.setAttribute("value", color); break; case "activeCW": color = customActiveColor = colorObj.TextColor; dialog.ActiveLinkData.setAttribute("value", color); break; case "visitedCW": color = customVisitedColor = colorObj.TextColor; dialog.VisitedLinkData.setAttribute("value", color); break; case "backgroundCW": color = customBackgroundColor = colorObj.BackgroundColor; dialog.BackgroundColorData.setAttribute("value", color); break; }dump(" *** customTextColor="+customTextColor+",customLinkColor="+customLinkColor+", customActiveColor="+customActiveColor+", customVisitedColor="+customVisitedColor+", customBackgroundColor="+customBackgroundColor+"\n"); setColorWell(ColorWellID, color); SetColorPreview(ColorWellID, color);}
|
|
if (aCommand == "cmdEditCopy") { return new cmdEditCopy(this.mPropsView.getSelectedRowObjects()); }
|
getCommand: function(aCommand) { return null; },
|
|
return new cmdEditCopy();
|
return new cmdEditCopy(this.mTreeView.getSelectedRowObjects());
|
getCommand: function(aCommand) { if (aCommand == "cmdEditCopy") { return new cmdEditCopy(); } return null; },
|
case "mainmenu:view-popup":
|
case "mainmenu:profile-popup":
|
function getCommandContext (id, cx){ switch (id) { case "popup:project": cx = console.projectView.getContext(cx); break; case "popup:source": cx = console.sourceView.getContext(cx); break; case "popup:script": cx = console.scriptsView.getContext(cx); break; case "popup:stack": cx = console.stackView.getContext(cx); break; default: dd ("getCommandContext: unknown id '" + id + "'"); case "mainmenu:debug-popup": case "mainmenu:view-popup": case "popup:console": cx = { commandManager: console.commandManager, contextSource: "default" }; break; } if (typeof cx == "object") { cx.commandManager = console.commandManager; if (!("contextSource" in cx)) cx.contextSource = id; if (console.dbgContexts) dd ("context '" + id + "'\n" + dumpObjectTree(cx)); } return cx;}
|
if (console.dbgContexts)
|
if ("dbgContexts" in console && console.dbgContexts)
|
function getCommandContext (id, cx){ switch (id) { case "popup:project": cx = console.projectView.getContext(cx); break; case "popup:source": cx = console.sourceView.getContext(cx); break; case "popup:script": cx = console.scriptsView.getContext(cx); break; case "popup:stack": cx = console.stackView.getContext(cx); break; default: dd ("getCommandContext: unknown id '" + id + "'"); case "mainmenu:debug-popup": case "mainmenu:view-popup": case "popup:console": cx = { commandManager: console.commandManager, contextSource: "default" }; break; } if (typeof cx == "object") { cx.commandManager = console.commandManager; if (!("contextSource" in cx)) cx.contextSource = id; if (console.dbgContexts) dd ("context '" + id + "'\n" + dumpObjectTree(cx)); } return cx;}
|
commands = ["bm_open", "bm_expandfolder", "bm_separator",
|
commands = ["bm_open", "bm_openinnewwindow", "bm_expandfolder", "bm_separator",
|
getCommands: function (aNodeID) { var type = BookmarksUtils.resolveType(aNodeID); if (!type) return null; var commands = []; // menu order: // // bm_expandfolder // bm_open // bm_openinnewwindow // bm_openinnewtab // --------------------- // bm_newfolder // --------------------- // bm_cut // bm_copy // bm_paste // --------------------- // bm_delete // --------------------- // bm_properties switch (type) { case "BookmarkSeparator": commands = ["bm_newfolder", "bm_separator", "bm_cut", "bm_copy", "bm_paste", "bm_separator", "bm_delete", "bm_separator", "bm_properties"]; break; case "Bookmark": commands = ["bm_open", "bm_openinnewwindow", "bm_openinnewtab", "bm_separator", "bm_newfolder", "bm_sortfolder", "bm_sortfolderbyname", "bm_separator", "bm_cut", "bm_copy", "bm_paste", "bm_movebookmark", "bm_separator", "bm_rename", "bm_delete", "bm_separator", "bm_properties"]; break; case "Folder": commands = ["bm_expandfolder", "bm_managefolder", "bm_separator", "bm_newfolder", "bm_sortfolder", "bm_sortfolderbyname", "bm_separator", "bm_cut", "bm_copy", "bm_paste", "bm_movebookmark", "bm_separator", "bm_rename", "bm_delete", "bm_separator", "bm_properties"]; break; case "FolderGroup": commands = ["bm_open", "bm_expandfolder", "bm_separator", "bm_newfolder", "bm_sortfolder", "bm_sortfolderbyname", "bm_separator", "bm_cut", "bm_copy", "bm_paste", "bm_movebookmark", "bm_separator", "bm_rename", "bm_delete", "bm_separator", "bm_properties"]; break; case "PersonalToolbarFolder": commands = ["bm_newfolder", "bm_sortfolder", "bm_sortfolderbyname", "bm_separator", "bm_cut", "bm_copy", "bm_paste", "bm_movebookmark", "bm_separator", "bm_rename", "bm_delete", "bm_separator", "bm_properties"]; break; case "IEFavoriteFolder": commands = ["bm_expandfolder", "bm_separator", "bm_delete"]; break; case "IEFavorite": commands = ["bm_open", "bm_openinnewwindow", "bm_openinnewtab", "bm_separator", "bm_copy"]; break; case "FileSystemObject": commands = ["bm_open", "bm_openinnewwindow", "bm_openinnewtab", "bm_separator", "bm_copy"]; break; default: commands = []; } return new CommandArrayEnumerator(commands); },
|
if (this.sessionUri == null)
|
if (!this.uri)
|
getCommandUrl: function( wcapCommand ) { if (this.sessionUri == null) throw new Components.Exception("no URI!"); // ensure established session, so userId is set; // (calId defaults to userId) if not set: this.getSessionId(); return (this.sessionUri.spec + wcapCommand + ".wcap?appid=mozilla-calendar"); },
|
if(command == "GetNewMessages" || command == "Copy" || command == "NewFolder")
|
if(command == "GetNewMessages" || command == "Copy" || command == "NewFolder" || command == "MarkAllMessagesRead")
|
function GetCompositeDataSource(command){ if(command == "GetNewMessages" || command == "Copy" || command == "NewFolder") { var folderTree = GetFolderTree(); return folderTree.database; } return null;}
|
} else if(command == "MarkMessageRead" || command == "MarkMessageFlagged" || command == "MarkThreadAsRead") { var threadTree = GetThreadTree(); return threadTree.database;
|
function GetCompositeDataSource(command){ if(command == "GetNewMessages" || command == "Copy" || command == "NewFolder") { var folderTree = GetFolderTree(); return folderTree.database; } return null;}
|
|
getComputedStyle: function( elem, attr ) { return elem.ownerDocument.defaultView.getComputedStyle( elem, '' ).getPropertyValue( attr );
|
getComputedStyle: function( elem, prop ) { return elem.ownerDocument.defaultView.getComputedStyle( elem, '' ).getPropertyValue( prop );
|
getComputedStyle: function( elem, attr ) { return elem.ownerDocument.defaultView.getComputedStyle( elem, '' ).getPropertyValue( attr ); },
|
getComputedURL: function( elem, attr ) { var url = this.getComputedStyle( elem, attr ); return ( url == "none" ) ? url : url.replace( /^url\("?([^")]+)"?\)/i, "$1" );
|
getComputedURL: function( elem, prop ) { var url = elem.ownerDocument.defaultView.getComputedStyle( elem, '' ).getPropertyCSSValue( prop ); return ( url.primitiveType == CSSPrimitiveValue.CSS_URI ) ? url.getStringValue() : null;
|
getComputedURL: function( elem, attr ) { var url = this.getComputedStyle( elem, attr ); return ( url == "none" ) ? url : url.replace( /^url\("?([^")]+)"?\)/i, "$1" ); },
|
if (!window._content.frames.length || !isDocumentFrame(document.commandDispatcher.focusedWindow))
|
var focusedWindow = document.commandDispatcher.focusedWindow; if (!_content.frames.length || !isDocumentFrame(focusedWindow))
|
function getContentAreaFrameCount(){ var saveFrameItem = document.getElementById("savepage"); if (!window._content.frames.length || !isDocumentFrame(document.commandDispatcher.focusedWindow)) saveFrameItem.setAttribute("hidden", "true"); else saveFrameItem.removeAttribute("hidden");}
|
var focusedWindow = document.commandDispatcher.focusedWindow; if (!_content.frames.length || !isDocumentFrame(focusedWindow))
|
if (!_content.frames.length || !isDocumentFrame(document.commandDispatcher.focusedWindow))
|
function getContentAreaFrameCount(){ var saveFrameItem = document.getElementById("savepage"); var focusedWindow = document.commandDispatcher.focusedWindow; if (!_content.frames.length || !isDocumentFrame(focusedWindow)) saveFrameItem.setAttribute("hidden", "true"); else saveFrameItem.removeAttribute("hidden");}
|
this.tree.selectItem(aItemNode); return this.tree.selectedItems;
|
if (aItemNode.localName == "treeitem") this.tree.selectItem(aItemNode); return this.tree.selectedItems.length ? this.tree.selectedItems : [this.tree];
|
getContextSelection: function (aItemNode) { // How a context-click works: // if the popup node is contained by the selection, the context menu is // built for that selection. However, if the popup node is invoked on a // non-selected node, unless modifiers are pressed**, the previous // selection is discarded and that node selected. var selectedItems = this.tree.selectedItems; for (var i = 0; i < selectedItems.length; ++i) { if (selectedItems[i] == aItemNode) return selectedItems; } this.tree.selectItem(aItemNode); return this.tree.selectedItems; },
|
return unescape(document.cookie.substring(offset, endstr));
|
return decodeURIComponent(document.cookie.substring(offset, endstr));
|
function getCookieVal (offset){var endstr = document.cookie.indexOf (";", offset);if (endstr == -1)endstr =document.cookie.length;return unescape(document.cookie.substring(offset, endstr));}
|
var isValid = false; var eventStartDate;
|
if (!calendarEvent.recurrenceInfo) { return calendarEvent; }
|
function getCurrentNextOrPreviousRecurrence(calendarEvent){ var isValid = false; var eventStartDate; if (calendarEvent.recur) { var now = new Date(); var result = new Object(); var dur = calendarEvent.endDate.jsDate - calendarEvent.startDate.jsDate; // To find current event when now is during event, look for occurrence // starting duration ago. var probeTime = now.getTime() - dur; isValid = calendarEvent.getNextRecurrence(probeTime, result); if (isValid) { eventStartDate = new Date(result.value); } else { isValid = calendarEvent.getPreviousOccurrence(probeTime, result); if (isValid) { eventStartDate = new Date(result.value); } } } if (!isValid) { eventStartDate = new Date( calendarEvent.startDate.jsDate ); } return eventStartDate;}
|
if (calendarEvent.recur) { var now = new Date(); var result = new Object(); var dur = calendarEvent.endDate.jsDate - calendarEvent.startDate.jsDate;
|
var dur = calendarEvent.duration.clone(); dur.isNegative = true;
|
function getCurrentNextOrPreviousRecurrence(calendarEvent){ var isValid = false; var eventStartDate; if (calendarEvent.recur) { var now = new Date(); var result = new Object(); var dur = calendarEvent.endDate.jsDate - calendarEvent.startDate.jsDate; // To find current event when now is during event, look for occurrence // starting duration ago. var probeTime = now.getTime() - dur; isValid = calendarEvent.getNextRecurrence(probeTime, result); if (isValid) { eventStartDate = new Date(result.value); } else { isValid = calendarEvent.getPreviousOccurrence(probeTime, result); if (isValid) { eventStartDate = new Date(result.value); } } } if (!isValid) { eventStartDate = new Date( calendarEvent.startDate.jsDate ); } return eventStartDate;}
|
var probeTime = now.getTime() - dur; isValid = calendarEvent.getNextRecurrence(probeTime, result);
|
var probeTime = now(); probeTime.addDuration(dur); var occtime = calendarEvent.recurrenceInfo.getNextOccurrenceDate(probeTime);
|
function getCurrentNextOrPreviousRecurrence(calendarEvent){ var isValid = false; var eventStartDate; if (calendarEvent.recur) { var now = new Date(); var result = new Object(); var dur = calendarEvent.endDate.jsDate - calendarEvent.startDate.jsDate; // To find current event when now is during event, look for occurrence // starting duration ago. var probeTime = now.getTime() - dur; isValid = calendarEvent.getNextRecurrence(probeTime, result); if (isValid) { eventStartDate = new Date(result.value); } else { isValid = calendarEvent.getPreviousOccurrence(probeTime, result); if (isValid) { eventStartDate = new Date(result.value); } } } if (!isValid) { eventStartDate = new Date( calendarEvent.startDate.jsDate ); } return eventStartDate;}
|
if (isValid) { eventStartDate = new Date(result.value); } else { isValid = calendarEvent.getPreviousOccurrence(probeTime, result); if (isValid) { eventStartDate = new Date(result.value); } }
|
var occ; if (!occtime) { var occs = calendarEvent.recurrenceInfo.getOccurrences(calendarEvent.startDate, probeTime, {}); occ = occs[occs.length -1]; } else { occ = calendarEvent.recurrenceInfo.getOccurrenceFor(occtime);
|
function getCurrentNextOrPreviousRecurrence(calendarEvent){ var isValid = false; var eventStartDate; if (calendarEvent.recur) { var now = new Date(); var result = new Object(); var dur = calendarEvent.endDate.jsDate - calendarEvent.startDate.jsDate; // To find current event when now is during event, look for occurrence // starting duration ago. var probeTime = now.getTime() - dur; isValid = calendarEvent.getNextRecurrence(probeTime, result); if (isValid) { eventStartDate = new Date(result.value); } else { isValid = calendarEvent.getPreviousOccurrence(probeTime, result); if (isValid) { eventStartDate = new Date(result.value); } } } if (!isValid) { eventStartDate = new Date( calendarEvent.startDate.jsDate ); } return eventStartDate;}
|
if (!isValid) { eventStartDate = new Date( calendarEvent.startDate.jsDate ); } return eventStartDate;
|
return occ;
|
function getCurrentNextOrPreviousRecurrence(calendarEvent){ var isValid = false; var eventStartDate; if (calendarEvent.recur) { var now = new Date(); var result = new Object(); var dur = calendarEvent.endDate.jsDate - calendarEvent.startDate.jsDate; // To find current event when now is during event, look for occurrence // starting duration ago. var probeTime = now.getTime() - dur; isValid = calendarEvent.getNextRecurrence(probeTime, result); if (isValid) { eventStartDate = new Date(result.value); } else { isValid = calendarEvent.getPreviousOccurrence(probeTime, result); if (isValid) { eventStartDate = new Date(result.value); } } } if (!isValid) { eventStartDate = new Date( calendarEvent.startDate.jsDate ); } return eventStartDate;}
|
var prefs = Components.classes["@mozilla.org/preferences;1"];
|
var prefs = Components.classes["@mozilla.org/preferences-service;1"];
|
function GetCurrentPrefs(){ // prefs if ( cvPrefs == 0 ) cvPrefs = new Object; var prefs = Components.classes["@mozilla.org/preferences;1"]; if ( prefs ) { prefs = prefs.getService(); if ( prefs ) prefs = prefs.QueryInterface(Components.interfaces.nsIPref); } if ( prefs ) { try { cvPrefs.prefs = prefs; cvPrefs.displayLastNameFirst = prefs.GetBoolPref("mail.addr_book.displayName.lastnamefirst"); cvPrefs.nameColumn = prefs.GetIntPref("mail.addr_book.lastnamefirst"); cvPrefs.lastFirstSeparator = ", "; cvPrefs.firstLastSeparator = " "; } catch (ex) { dump("failed to get the mail.addr_book.displayName.lastnamefirst pref\n"); } } // check "Show Name As" menu item based on pref var menuitemID; switch ( cvPrefs.nameColumn ) { case 2: menuitemID = 'firstLastCmd'; break; case 1: menuitemID = 'lastFirstCmd'; break; case 0: default: menuitemID = 'displayNameCmd'; break; } menuitem = top.document.getElementById(menuitemID); if ( menuitem ) menuitem.setAttribute('checked', 'true');}
|
prefs = prefs.QueryInterface(Components.interfaces.nsIPref);
|
prefs = prefs.QueryInterface(Components.interfaces.nsIPrefBranch);
|
function GetCurrentPrefs(){ // prefs if ( cvPrefs == 0 ) cvPrefs = new Object; var prefs = Components.classes["@mozilla.org/preferences;1"]; if ( prefs ) { prefs = prefs.getService(); if ( prefs ) prefs = prefs.QueryInterface(Components.interfaces.nsIPref); } if ( prefs ) { try { cvPrefs.prefs = prefs; cvPrefs.displayLastNameFirst = prefs.GetBoolPref("mail.addr_book.displayName.lastnamefirst"); cvPrefs.nameColumn = prefs.GetIntPref("mail.addr_book.lastnamefirst"); cvPrefs.lastFirstSeparator = ", "; cvPrefs.firstLastSeparator = " "; } catch (ex) { dump("failed to get the mail.addr_book.displayName.lastnamefirst pref\n"); } } // check "Show Name As" menu item based on pref var menuitemID; switch ( cvPrefs.nameColumn ) { case 2: menuitemID = 'firstLastCmd'; break; case 1: menuitemID = 'lastFirstCmd'; break; case 0: default: menuitemID = 'displayNameCmd'; break; } menuitem = top.document.getElementById(menuitemID); if ( menuitem ) menuitem.setAttribute('checked', 'true');}
|
cvPrefs.displayLastNameFirst = prefs.GetBoolPref("mail.addr_book.displayName.lastnamefirst"); cvPrefs.nameColumn = prefs.GetIntPref("mail.addr_book.lastnamefirst");
|
cvPrefs.displayLastNameFirst = prefs.getBoolPref("mail.addr_book.displayName.lastnamefirst"); cvPrefs.nameColumn = prefs.getIntPref("mail.addr_book.lastnamefirst");
|
function GetCurrentPrefs(){ // prefs if ( cvPrefs == 0 ) cvPrefs = new Object; var prefs = Components.classes["@mozilla.org/preferences;1"]; if ( prefs ) { prefs = prefs.getService(); if ( prefs ) prefs = prefs.QueryInterface(Components.interfaces.nsIPref); } if ( prefs ) { try { cvPrefs.prefs = prefs; cvPrefs.displayLastNameFirst = prefs.GetBoolPref("mail.addr_book.displayName.lastnamefirst"); cvPrefs.nameColumn = prefs.GetIntPref("mail.addr_book.lastnamefirst"); cvPrefs.lastFirstSeparator = ", "; cvPrefs.firstLastSeparator = " "; } catch (ex) { dump("failed to get the mail.addr_book.displayName.lastnamefirst pref\n"); } } // check "Show Name As" menu item based on pref var menuitemID; switch ( cvPrefs.nameColumn ) { case 2: menuitemID = 'firstLastCmd'; break; case 1: menuitemID = 'lastFirstCmd'; break; case 0: default: menuitemID = 'displayNameCmd'; break; } menuitem = top.document.getElementById(menuitemID); if ( menuitem ) menuitem.setAttribute('checked', 'true');}
|
return( "st" );
|
return( firstExtension );
|
function getDayExtension( dayNumber ){ switch( dayNumber ) { case 1: case 21: case 31: return( "st" ); case 2: case 22: return( "nd" ); case 3: case 23: return( "rd" ); default: return( "th" ); }}
|
return( "nd" );
|
return( secondExtension );
|
function getDayExtension( dayNumber ){ switch( dayNumber ) { case 1: case 21: case 31: return( "st" ); case 2: case 22: return( "nd" ); case 3: case 23: return( "rd" ); default: return( "th" ); }}
|
return( "rd" );
|
return( thirdExtension );
|
function getDayExtension( dayNumber ){ switch( dayNumber ) { case 1: case 21: case 31: return( "st" ); case 2: case 22: return( "nd" ); case 3: case 23: return( "rd" ); default: return( "th" ); }}
|
return( "th" );
|
return( nthExtension );
|
function getDayExtension( dayNumber ){ switch( dayNumber ) { case 1: case 21: case 31: return( "st" ); case 2: case 22: return( "nd" ); case 3: case 23: return( "rd" ); default: return( "th" ); }}
|
try { useSysColors = gPrefs.GetBoolPref("browser.display.use_system_colors"); } catch (e) {}
|
try { useSysColors = gPrefs.getBoolPref("browser.display.use_system_colors"); } 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) { try { colors.TextColor = gPrefs.CopyCharPref("browser.display.foreground_color"); } catch (e) {} try { colors.BackgroundColor = gPrefs.CopyCharPref("browser.display.background_color"); } catch (e) {} } // Use OS colors for text and background if explicitly asked or pref is not set if (!colors.TextColor) colors.TextColor = "windowtext"; if (!colors.BackgroundColor) colors.BackgroundColor = "window"; try { colors.LinkColor = gPrefs.CopyCharPref("browser.anchor_color"); } catch (e) {} try { colors.VisitedLinkColor = gPrefs.CopyCharPref("browser.visited_color"); } catch (e) {} return colors;}
|
try { colors.TextColor = gPrefs.CopyCharPref("browser.display.foreground_color"); } catch (e) {}
|
try { colors.TextColor = gPrefs.getCharPref("browser.display.foreground_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) { try { colors.TextColor = gPrefs.CopyCharPref("browser.display.foreground_color"); } catch (e) {} try { colors.BackgroundColor = gPrefs.CopyCharPref("browser.display.background_color"); } catch (e) {} } // Use OS colors for text and background if explicitly asked or pref is not set if (!colors.TextColor) colors.TextColor = "windowtext"; if (!colors.BackgroundColor) colors.BackgroundColor = "window"; try { colors.LinkColor = gPrefs.CopyCharPref("browser.anchor_color"); } catch (e) {} try { colors.VisitedLinkColor = gPrefs.CopyCharPref("browser.visited_color"); } catch (e) {} return colors;}
|
try { colors.BackgroundColor = gPrefs.CopyCharPref("browser.display.background_color"); } catch (e) {}
|
try { colors.BackgroundColor = gPrefs.getCharPref("browser.display.background_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) { try { colors.TextColor = gPrefs.CopyCharPref("browser.display.foreground_color"); } catch (e) {} try { colors.BackgroundColor = gPrefs.CopyCharPref("browser.display.background_color"); } catch (e) {} } // Use OS colors for text and background if explicitly asked or pref is not set if (!colors.TextColor) colors.TextColor = "windowtext"; if (!colors.BackgroundColor) colors.BackgroundColor = "window"; try { colors.LinkColor = gPrefs.CopyCharPref("browser.anchor_color"); } catch (e) {} try { colors.VisitedLinkColor = gPrefs.CopyCharPref("browser.visited_color"); } catch (e) {} return colors;}
|
try { colors.LinkColor = gPrefs.CopyCharPref("browser.anchor_color"); } catch (e) {} try { colors.VisitedLinkColor = gPrefs.CopyCharPref("browser.visited_color"); } catch (e) {}
|
try { colors.LinkColor = gPrefs.getCharPref("browser.anchor_color"); } catch (e) {} try { colors.VisitedLinkColor = gPrefs.getCharPref("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) { try { colors.TextColor = gPrefs.CopyCharPref("browser.display.foreground_color"); } catch (e) {} try { colors.BackgroundColor = gPrefs.CopyCharPref("browser.display.background_color"); } catch (e) {} } // Use OS colors for text and background if explicitly asked or pref is not set if (!colors.TextColor) colors.TextColor = "windowtext"; if (!colors.BackgroundColor) colors.BackgroundColor = "window"; try { colors.LinkColor = gPrefs.CopyCharPref("browser.anchor_color"); } catch (e) {} try { colors.VisitedLinkColor = gPrefs.CopyCharPref("browser.visited_color"); } catch (e) {} return colors;}
|
try { useSysColors = prefs.GetBoolPref("browser.display.use_system_colors"); } catch (e) {}
|
try { useSysColors = prefs.getBoolPref("browser.display.use_system_colors"); } catch (e) {}
|
function GetDefaultBrowserColors(){ var prefs = GetPrefs(); var colors = new Object(); var useSysColors = false; colors.TextColor = 0; colors.BackgroundColor = 0; try { useSysColors = prefs.GetBoolPref("browser.display.use_system_colors"); } catch (e) {} if (!useSysColors) { try { colors.TextColor = prefs.CopyCharPref("browser.display.foreground_color"); } catch (e) {} try { colors.BackgroundColor = prefs.CopyCharPref("browser.display.background_color"); } catch (e) {} } // Use OS colors for text and background if explicitly asked or pref is not set if (!colors.TextColor) colors.TextColor = "windowtext"; if (!colors.BackgroundColor) colors.BackgroundColor = "window"; colors.LinkColor = prefs.CopyCharPref("browser.anchor_color"); colors.VisitedLinkColor = prefs.CopyCharPref("browser.visited_color"); return colors;}
|
try { colors.TextColor = prefs.CopyCharPref("browser.display.foreground_color"); } catch (e) {}
|
try { colors.TextColor = prefs.getCharPref("browser.display.foreground_color"); } catch (e) {}
|
function GetDefaultBrowserColors(){ var prefs = GetPrefs(); var colors = new Object(); var useSysColors = false; colors.TextColor = 0; colors.BackgroundColor = 0; try { useSysColors = prefs.GetBoolPref("browser.display.use_system_colors"); } catch (e) {} if (!useSysColors) { try { colors.TextColor = prefs.CopyCharPref("browser.display.foreground_color"); } catch (e) {} try { colors.BackgroundColor = prefs.CopyCharPref("browser.display.background_color"); } catch (e) {} } // Use OS colors for text and background if explicitly asked or pref is not set if (!colors.TextColor) colors.TextColor = "windowtext"; if (!colors.BackgroundColor) colors.BackgroundColor = "window"; colors.LinkColor = prefs.CopyCharPref("browser.anchor_color"); colors.VisitedLinkColor = prefs.CopyCharPref("browser.visited_color"); return colors;}
|
try { colors.BackgroundColor = prefs.CopyCharPref("browser.display.background_color"); } catch (e) {}
|
try { colors.BackgroundColor = prefs.getCharPref("browser.display.background_color"); } catch (e) {}
|
function GetDefaultBrowserColors(){ var prefs = GetPrefs(); var colors = new Object(); var useSysColors = false; colors.TextColor = 0; colors.BackgroundColor = 0; try { useSysColors = prefs.GetBoolPref("browser.display.use_system_colors"); } catch (e) {} if (!useSysColors) { try { colors.TextColor = prefs.CopyCharPref("browser.display.foreground_color"); } catch (e) {} try { colors.BackgroundColor = prefs.CopyCharPref("browser.display.background_color"); } catch (e) {} } // Use OS colors for text and background if explicitly asked or pref is not set if (!colors.TextColor) colors.TextColor = "windowtext"; if (!colors.BackgroundColor) colors.BackgroundColor = "window"; colors.LinkColor = prefs.CopyCharPref("browser.anchor_color"); colors.VisitedLinkColor = prefs.CopyCharPref("browser.visited_color"); return colors;}
|
colors.LinkColor = prefs.CopyCharPref("browser.anchor_color"); colors.VisitedLinkColor = prefs.CopyCharPref("browser.visited_color");
|
colors.LinkColor = prefs.getCharPref("browser.anchor_color"); colors.VisitedLinkColor = prefs.getCharPref("browser.visited_color");
|
function GetDefaultBrowserColors(){ var prefs = GetPrefs(); var colors = new Object(); var useSysColors = false; colors.TextColor = 0; colors.BackgroundColor = 0; try { useSysColors = prefs.GetBoolPref("browser.display.use_system_colors"); } catch (e) {} if (!useSysColors) { try { colors.TextColor = prefs.CopyCharPref("browser.display.foreground_color"); } catch (e) {} try { colors.BackgroundColor = prefs.CopyCharPref("browser.display.background_color"); } catch (e) {} } // Use OS colors for text and background if explicitly asked or pref is not set if (!colors.TextColor) colors.TextColor = "windowtext"; if (!colors.BackgroundColor) colors.BackgroundColor = "window"; colors.LinkColor = prefs.CopyCharPref("browser.anchor_color"); colors.VisitedLinkColor = prefs.CopyCharPref("browser.visited_color"); return colors;}
|
if (!colors) return null; colors.TextColor = ""; colors.BackgroundColor = "";
|
function GetDefaultBrowserColors(){ var colors = new Object(); var useWinColors = false; if (gIsWindows) { // In Windows only, there's a pref to use system colors instead of pref colors try { useWinColors = gPrefs.GetBoolPref("browser.display.wfe.use_windows_colors"); } catch (e) {} } if (!useWinColors) { try { colors.TextColor = gPrefs.CopyCharPref("browser.display.foreground_color"); } catch (e) {} try { colors.BackgroundColor = gPrefs.CopyCharPref("browser.display.background_color"); } catch (e) {} } // Use OS colors for text and background if explicitly asked or pref is not set if (!colors.TextColor) colors.TextColor = "windowtext"; if (!colors.BackgroundColor) colors.BackgroundColor = "window"; colors.LinkColor = gPrefs.CopyCharPref("browser.anchor_color"); colors.VisitedLinkColor = gPrefs.CopyCharPref("browser.visited_color"); return colors;}
|
|
colors.TextColor = 0; colors.BackgroundColor = 0;
|
function GetDefaultBrowserColors(){ var prefs = GetPrefs(); var colors = new Object(); var useWinColors = false; if (navigator.appVersion.indexOf("Win") != -1) { // In Windows only, there's a pref to use system colors instead of pref colors try { useWinColors = prefs.GetBoolPref("browser.display.wfe.use_windows_colors"); } catch (e) {} } if (!useWinColors) { try { colors.TextColor = prefs.CopyCharPref("browser.display.foreground_color"); } catch (e) {} try { colors.BackgroundColor = prefs.CopyCharPref("browser.display.background_color"); } catch (e) {} } // Use OS colors for text and background if explicitly asked or pref is not set if (!colors.TextColor) colors.TextColor = "windowtext"; if (!colors.BackgroundColor) colors.BackgroundColor = "window"; colors.LinkColor = prefs.CopyCharPref("browser.anchor_color"); colors.VisitedLinkColor = prefs.CopyCharPref("browser.visited_color"); return colors;}
|
|
{ try { var categoriesStringBundle = srGetStrBundle("chrome: return categoriesStringBundle.GetStringFromName("categories" ); } catch(e) { return "" }
|
{ try { var categoriesStringBundle = srGetStrBundle("chrome: return categoriesStringBundle.GetStringFromName("categories" );
|
function getDefaultCategories() { try { var categoriesStringBundle = srGetStrBundle("chrome://calendar/locale/categories.properties"); return categoriesStringBundle.GetStringFromName("categories" ); } catch(e) { return "" } }
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.