rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
var docModified = editorShell.documentModified;
var docModified = window.editorShell.documentModified;
function editorSendPage(){ var docModified = editorShell.documentModified; var pageUrl = window.editorShell.editorDocument.location; if (pageUrl != "about:blank" && !docModified) { var pageTitle = window.editorShell.editorDocument.title; window.openDialog("chrome://messenger/content/messengercompose/messenger...
else if (CheckAndSaveDocument(GetString("SendPageReason")))
else if (CheckAndSaveDocument(GetString("SendPageReason")), DocumentHasBeenSaved())
function editorSendPage(){ var docModified = editorShell.documentModified; var pageUrl = window.editorShell.editorDocument.location; if (pageUrl != "about:blank" && !docModified) { var pageTitle = window.editorShell.editorDocument.title; window.openDialog("chrome://messenger/content/messengercompose/messenger...
window.editorShell.SetBackgroundColor(color);
editorShell.SetBackgroundColor(color);
function EditorSetBackgroundColor(color){ window.editorShell.SetBackgroundColor(color); contentWindow.focus();}
window.focus();
contentWindow.focus();
function EditorSetBackgroundColor(color){ appCore.setBackgroundColor(color); window.focus();}
document.getElementById("PreviewModeButton").setAttribute("selected",Number(mode == 0)); document.getElementById("NormalModeButton").setAttribute("selected",Number(mode == 1)); document.getElementById("TagModeButton").setAttribute("selected",Number(mode == 2)); contentWindow.focus();
document.getElementById("PreviewModeButton").setAttribute("selected",Number(mode == DisplayModePreview)); document.getElementById("NormalModeButton").setAttribute("selected",Number(mode == DisplayModeNormal)); document.getElementById("TagModeButton").setAttribute("selected",Number(mode == DisplayModeAllTags)); var HTML...
function EditorSetDisplayMode(mode){ EditorDisplayMode = mode; // Editor does the style sheet loading/unloading editorShell.SetDisplayMode(mode); // Set the UI states document.getElementById("PreviewModeButton").setAttribute("selected",Number(mode == 0)); document.getElementById("NormalModeButton").setAttribute...
dump(" NOT IMPLEMENTED YET\n");
editorShell.editorDocument.SetDocumentCharacterSet(aCharset);
function EditorSetDocumentCharacterSet(aCharset){ dump(aCharset); dump(" NOT IMPLEMENTED YET\n");}
editorShell.RegisterDocumentStateListener( DocumentReloadListener );
function EditorSetDocumentCharacterSet(aCharset){ if(editorShell) { editorShell.SetDocumentCharacterSet(aCharset); if( editorShell.editorDocument.location != "about:blank") { editorShell.LoadUrl(editorShell.editorDocument.location); } }}
if((! editorShell.documentModified) && editorShell.editorDocument.location != "about:blank")
if( editorShell.editorDocument.location != "about:blank")
function EditorSetDocumentCharacterSet(aCharset){ if(editorShell) { editorShell.SetDocumentCharacterSet(aCharset); if((! editorShell.documentModified) && editorShell.editorDocument.location != "about:blank") { editorShell.LoadUrl(editorShell.editorDocument.location); } }}
if(editorShell && (! editorShell.documentModified) &&
if(editorShell) { editorShell.SetDocumentCharacterSet(aCharset); if((! editorShell.documentModified) &&
function EditorSetDocumentCharacterSet(aCharset){ if(editorShell && (! editorShell.documentModified) && editorShell.editorDocument.location != "about:blank") { dump(aCharset); editorShell.SetDocumentCharacterSet(aCharset); editorShell.LoadUrl(editorShell.editorDocument.location); }}
{ dump(aCharset); editorShell.SetDocumentCharacterSet(aCharset); editorShell.LoadUrl(editorShell.editorDocument.location);
{ dump(aCharset); editorShell.LoadUrl(editorShell.editorDocument.location); }
function EditorSetDocumentCharacterSet(aCharset){ if(editorShell && (! editorShell.documentModified) && editorShell.editorDocument.location != "about:blank") { dump(aCharset); editorShell.SetDocumentCharacterSet(aCharset); editorShell.LoadUrl(editorShell.editorDocument.location); }}
window.editorShell.SetTextProperty("font", "color", color);
editorShell.SetTextProperty("font", "color", color);
function EditorSetFontColor(color){ window.editorShell.SetTextProperty("font", "color", color); contentWindow.focus();}
window.focus();
contentWindow.focus();
function EditorSetFontColor(color){ if (appCore) { appCore.setTextProperty("font", "color", color); } window.focus();}
window.editorShell.RemoveTextProperty("font", "face");
editorShell.RemoveTextProperty("font", "face");
function EditorSetFontFace(fontFace){ if( fontFace == "" || fontFace == "normal") { window.editorShell.RemoveTextProperty("font", "face"); } else if( fontFace == "tt") { // The old "teletype" attribute window.editorShell.SetTextProperty("tt", "", ""); // Clear existing font face window.editorShell.Re...
window.editorShell.SetTextProperty("tt", "", "");
editorShell.SetTextProperty("tt", "", "");
function EditorSetFontFace(fontFace){ if( fontFace == "" || fontFace == "normal") { window.editorShell.RemoveTextProperty("font", "face"); } else if( fontFace == "tt") { // The old "teletype" attribute window.editorShell.SetTextProperty("tt", "", ""); // Clear existing font face window.editorShell.Re...
window.editorShell.SetTextProperty("font", "face", fontFace);
editorShell.SetTextProperty("font", "face", fontFace);
function EditorSetFontFace(fontFace){ if( fontFace == "" || fontFace == "normal") { window.editorShell.RemoveTextProperty("font", "face"); } else if( fontFace == "tt") { // The old "teletype" attribute window.editorShell.SetTextProperty("tt", "", ""); // Clear existing font face window.editorShell.Re...
window.focus();
contentWindow.focus();
function EditorSetFontFace(fontFace){ if (appCore) { if( fontFace == "tt") { // The old "teletype" attribute appCore.setTextProperty("tt", "", ""); // Clear existing font face fontFace = ""; } appCore.setTextProperty("font", "face", fontFace); } window.focus();}
window.editorShell.RemoveTextProperty("font", size);
editorShell.RemoveTextProperty("font", size);
function EditorSetFontSize(size){ if( size == "0" || size == "normal" || size == "+0" ) { window.editorShell.RemoveTextProperty("font", size); dump("Removing font size\n"); } else { dump("Setting font size\n"); window.editorShell.SetTextProperty("font", "size", size); } contentWindow.focus();}
window.editorShell.SetTextProperty("font", "size", size);
editorShell.SetTextProperty("font", "size", size);
function EditorSetFontSize(size){ if( size == "0" || size == "normal" || size == "+0" ) { window.editorShell.RemoveTextProperty("font", size); dump("Removing font size\n"); } else { dump("Setting font size\n"); window.editorShell.SetTextProperty("font", "size", size); } contentWindow.focus();}
appCore.setTextProperty("font", "size", size);
if( size == "0" || size == "normal" || size === "+0" ) { appCore.removeTextProperty("font", size); dump("Removing font size\n"); } else { dump("Setting font size\n"); appCore.setTextProperty("font", "size", size); }
function EditorSetFontSize(size){ if (appCore) { appCore.setTextProperty("font", "size", size); } window.focus();}
window.focus();
function EditorSetFontSize(size){ if (appCore) { appCore.setTextProperty("font", "size", size); } window.focus();}
window.editorShell.paragraphFormat = paraFormat;
editorShell.paragraphFormat = paraFormat;
function EditorSetParagraphFormat(paraFormat){ window.editorShell.paragraphFormat = paraFormat; contentWindow.focus();}
window.focus();
contentWindow.focus();
function EditorSetParagraphFormat(paraFormat){ if (appCore) { appCore.setParagraphFormat(paraFormat); } window.focus();}
var selection = window.editorShell.editorSelection;
var selection = editorShell.editorSelection;
function EditorSetSelectionFromOffsets(selRanges){ var rangeArr, start, end, i, node, offset; var selection = window.editorShell.editorSelection; selection.clearSelection(); for (i = 0; i < selRanges.length; i++) { rangeArr = selRanges[i]; start = rangeArr[0]; end = rangeArr[1]; var range = win...
var range = window.editorShell.editorDocument.createRange();
var range = editorShell.editorDocument.createRange();
function EditorSetSelectionFromOffsets(selRanges){ var rangeArr, start, end, i, node, offset; var selection = window.editorShell.editorSelection; selection.clearSelection(); for (i = 0; i < selRanges.length; i++) { rangeArr = selRanges[i]; start = rangeArr[0]; end = rangeArr[1]; var range = win...
window.editorShell.SetTextProperty(property, attribute, value);
editorShell.SetTextProperty(property, attribute, value);
function EditorSetTextProperty(property, attribute, value){ window.editorShell.SetTextProperty(property, attribute, value); dump("Set text property -- calling focus()\n"); contentWindow.focus();}
var htmlEditor = gEditor.QueryInterface(Components.interfaces.nsIHTMLEditor); if (!htmlEditor) return; if (!gAtomService) GetAtomService(); var propAtom = gAtomService.getAtom(property); htmlEditor.setInlineProperty(propAtom, attribute, value); gContentWindow.focus();
if (!gIsHTMLEditor) return; try { if (!gAtomService) GetAtomService(); var propAtom = gAtomService.getAtom(property); gEditor.setInlineProperty(propAtom, attribute, value); gContentWindow.focus(); } catch(e) {}
function EditorSetTextProperty(property, attribute, value){ var htmlEditor = gEditor.QueryInterface(Components.interfaces.nsIHTMLEditor); if (!htmlEditor) return; if (!gAtomService) GetAtomService(); var propAtom = gAtomService.getAtom(property); htmlEditor.setInlineProperty(propAtom, attribute, value); gContentW...
} dump("Set text property -- calling focus()\n"); window.focus();
} contentWindow.focus();
function EditorSetTextProperty(property, attribute, value){ if (appCore) { appCore.setTextProperty(property, attribute, value); } dump("Set text property -- calling focus()\n"); window.focus();}
gIsHTMLEditor = true;
function EditorSharedStartup(){ // Just for convenience gContentWindow = window._content; // set up JS-implemented commands for Text or HTML editing switch (editorShell.editorType) { case "html": case "htmlmail": SetupHTMLEditorCommands(); editorShell.contentsMIMEType = "text/html"; ...
if (editorShell.editorType == "htmlmail" || editorShell.editorType == "textmail") editorShell.RegisterDocumentStateListener( MessageComposeDocumentStateListener ); else editorShell.RegisterDocumentStateListener( DocumentStateListener );
editorShell.RegisterDocumentStateListener( DocumentStateListener );
function EditorSharedStartup(){ // Just for convenience gContentWindow = window._content; switch (editorShell.editorType) { case "html": case "htmlmail": gIsHTMLEditor = true; break; case "text": case "textmail": gIsHTMLEditor = false; break; default: dump...
gCSSPrefListener.shutdown();
function EditorShutdown(){ RemoveToolbarPrefListener(); try { var commandManager = GetCurrentCommandManager(); commandManager.removeCommandObserver(gEditorDocumentObserver, "obs_documentCreated"); commandManager.removeCommandObserver(gEditorDocumentObserver, "obs_documentWillBeDestroyed"); commandManager....
catch(ex) { dump("Can't start logging!:\n" + ex + "\n");
catch(ex) { dump("Can't stop logging!:\n" + ex + "\n");
function EditorStartLog(){ try { var edlog = gEditor.QueryInterface(Components.interfaces.nsIEditorLogging); var fs = EditorGetScriptFileSpec(); edlog.startLogging(fs); window._content.focus(); fs = null; } catch(ex) { dump("Can't start logging!:\n" + ex + "\n");}function EditorStopLog(){ try { va...
if (window.editorShell) { fs = EditorGetScriptFileSpec(); window.editorShell.StartLogging(fs);
fs = EditorGetScriptFileSpec(); editorShell.StartLogging(fs);
function EditorStartLog(){ var fs; if (window.editorShell) { fs = EditorGetScriptFileSpec(); window.editorShell.StartLogging(fs); fs = null; }}
fs = null; }
fs = null;
function EditorStartLog(){ var fs; if (window.editorShell) { fs = EditorGetScriptFileSpec(); window.editorShell.StartLogging(fs); fs = null; }}
GetCurrentEditorElement().docShell.appType =
var ds = GetCurrentEditorElement().docShell; var root = ds.QueryInterface(Components.interfaces.nsIDocShellTreeItem). rootTreeItem.QueryInterface(Components.interfaces.nsIDocShell); root.QueryInterface(Components.interfaces.nsIDocShell).appType =
function EditorStartup(){ GetCurrentEditorElement().docShell.appType = Components.interfaces.nsIDocShell.APP_TYPE_EDITOR; var is_HTMLEditor = IsHTMLEditor(); if (is_HTMLEditor) { // XUL elements we use when switching from normal editor to edit source gContentWindowDeck = document.getElementById("ContentWin...
try { prefs = Components.classes['component: if (prefs) prefs = prefs.getService(); if (prefs) prefs = prefs.QueryInterface(Components.interfaces.nsIPref); if (prefs) return prefs; else dump("failed to get prefs service!\n"); } catch(ex) { dump("failed to get prefs service!\n"); }
GetPrefsService();
function EditorStartup(editorType, editorElement){ contentWindow = window.content; sourceContentWindow = document.getElementById("HTMLSourceWindow"); // store the editor shell in the window, so that child windows can get to it. editorShell = editorElement.editorShell; editorShell.Init(); editorShell.SetEditor...
dump("Trying to make an editor appcore through the component manager...\n");
dump("Trying to make an Editor Shell through the component manager...\n");
function EditorStartup(editorType){ dump("Doing Startup...\n"); contentWindow = window.content; dump("Trying to make an editor appcore through the component manager...\n"); var editorShell = Components.classes["component://netscape/editor/editorshell"].createInstance(); editorShell = editorShell.QueryInterface(Com...
var editorShell = Components.classes["component: editorShell = editorShell.QueryInterface(Components.interfaces.nsIEditorShell);
editorShell = Components.classes["component: if (editorShell) editorShell = editorShell.QueryInterface(Components.interfaces.nsIEditorShell);
function EditorStartup(editorType){ dump("Doing Startup...\n"); contentWindow = window.content; dump("Trying to make an editor appcore through the component manager...\n"); var editorShell = Components.classes["component://netscape/editor/editorshell"].createInstance(); editorShell = editorShell.QueryInterface(Com...
window.editorShell.Init(); window.editorShell.SetWebShellWindow(window); window.editorShell.SetToolbarWindow(window) window.editorShell.SetEditorType(editorType); window.editorShell.SetContentWindow(contentWindow);
editorShell.Init(); editorShell.SetWebShellWindow(window); editorShell.SetToolbarWindow(window) editorShell.SetEditorType(editorType); editorShell.SetContentWindow(contentWindow);
function EditorStartup(editorType){ dump("Doing Startup...\n"); contentWindow = window.content; dump("Trying to make an editor appcore through the component manager...\n"); var editorShell = Components.classes["component://netscape/editor/editorshell"].createInstance(); editorShell = editorShell.QueryInterface(Com...
window.editorShell.LoadUrl(url);
editorShell.LoadUrl(url);
function EditorStartup(editorType){ dump("Doing Startup...\n"); contentWindow = window.content; dump("Trying to make an editor appcore through the component manager...\n"); var editorShell = Components.classes["component://netscape/editor/editorshell"].createInstance(); editorShell = editorShell.QueryInterface(Com...
gEditModeLabel = document.getElementById("EditModeLabel");
function EditorStartup(editorType, editorElement){ gIsHTMLEditor = (editorType == "html"); if (gIsHTMLEditor) { gSourceContentWindow = document.getElementById("content-source"); gEditModeBar = document.getElementById("EditModeToolbar"); gEditModeLabel = document.getElementById("EditModeLabel"); ...
editorShell.RegisterDocumentStateListener( DocumentStateListener );
function EditorStartup(editorType, editorElement){ gIsHTMLEditor = (editorType == "html"); if (gIsHTMLEditor) { gSourceContentWindow = document.getElementById("content-source"); gEditModeBar = document.getElementById("EditModeToolbar"); gNormalModeButton = document.getElementById("NormalModeButton");...
contentWindow.focus(); window.updateCommands("create");
function EditorStartup(editorType, editorElement){ contentWindow = window.content; // store the editor shell in the window, so that child windows can get to it. editorShell = editorElement.editorShell; editorShell.Init(); editorShell.SetEditorType(editorType); editorShell.webShellWindow = window; editorShell...
contentWindow = window.frames[0];
function EditorStartup(editorType){ dump("Doing Startup...\n"); /* Get the global Editor AppCore and the XPFE toolkit core into globals here */ appCore = XPAppCoresManager.Find(editorName); dump("Looking up EditorAppCore...\n"); if (appCore == null) { dump("Creating EditorAppCore...\n"); appCore = new Edi...
appCore.setContentWindow( window.frames[0] );
appCore.setContentWindow(contentWindow);
function EditorStartup(editorType){ dump("Doing Startup...\n"); /* Get the global Editor AppCore and the XPFE toolkit core into globals here */ appCore = XPAppCoresManager.Find(editorName); dump("Looking up EditorAppCore...\n"); if (appCore == null) { dump("Creating EditorAppCore...\n"); appCore = new Edi...
window.focus();
dump("Setting focus to content window\n"); contentWindow.focus();
function EditorStartup(editorType){ dump("Doing Startup...\n"); /* Get the global Editor AppCore and the XPFE toolkit core into globals here */ appCore = XPAppCoresManager.Find(editorName); dump("Looking up EditorAppCore...\n"); if (appCore == null) { dump("Creating EditorAppCore...\n"); appCore = new Edi...
GetCurrentEditorElement().docShell.appType = Components.interfaces.nsIDocShell.APP_TYPE_EDITOR;
function EditorStartup(){ var is_HTMLEditor = IsHTMLEditor(); if (is_HTMLEditor) { // XUL elements we use when switching from normal editor to edit source gContentWindowDeck = document.getElementById("ContentWindowDeck"); gFormatToolbar = document.getElementById("FormatToolbar"); gViewFormatToolbar = doc...
catch(ex) { dump("Can't start logging!:\n" + ex + "\n");
catch(ex) { dump("Can't stop logging!:\n" + ex + "\n");
function EditorStopLog(){ try { var edlog = gEditor.QueryInterface(Components.interfaces.nsIEditorLogging); edlog.stopLogging(); window._content.focus(); } catch(ex) { dump("Can't start logging!:\n" + ex + "\n");}function EditorRunLog(){ var fs; fs = EditorGetScriptFileSpec(); EditorExecuteScript(fs); w...
if (window.editorShell) { window.editorShell.StopLogging(); }
editorShell.StopLogging();
function EditorStopLog(){ if (window.editorShell) { window.editorShell.StopLogging(); }}
var htmlEditor = gEditor.QueryInterface(Components.interfaces.nsIHTMLEditor); if (!htmlEditor) return; var cell = htmlEditor.getElementOrParentByTagName("td", null);
if (!gIsHTMLEditor) return; var cell = gEditor.getElementOrParentByTagName("td", null);
function EditorTableCellProperties(){ var htmlEditor = gEditor.QueryInterface(Components.interfaces.nsIHTMLEditor); if (!htmlEditor) return; var cell = htmlEditor.getElementOrParentByTagName("td", null); if (cell) { // Start Table Properties dialog on the "Cell" panel window.openDialog("chrome://editor/con...
if (window.editorShell)
dump("Getting document\n"); var theDoc = editorShell.editorDocument; if (theDoc)
function EditorTestDocument(){ if (window.editorShell) { dump("Getting document\n"); var theDoc = window.editorShell.editorDocument; if (theDoc) { dump("Got the doc\n"); dump("Document name:" + theDoc.nodeName + "\n"); dump("Document type:" + theDoc.doctype + "\n"); } else { d...
dump("Getting document\n"); var theDoc = window.editorShell.editorDocument; if (theDoc) { dump("Got the doc\n"); dump("Document name:" + theDoc.nodeName + "\n"); dump("Document type:" + theDoc.doctype + "\n"); } else { dump("Failed to get the doc\n"); }
dump("Got the doc\n"); dump("Document name:" + theDoc.nodeName + "\n"); dump("Document type:" + theDoc.doctype + "\n"); } else { dump("Failed to get the doc\n");
function EditorTestDocument(){ if (window.editorShell) { dump("Getting document\n"); var theDoc = window.editorShell.editorDocument; if (theDoc) { dump("Got the doc\n"); dump("Document name:" + theDoc.nodeName + "\n"); dump("Document type:" + theDoc.doctype + "\n"); } else { d...
if (window.editorShell)
dump("Testing selection\n"); var selection = editorShell.editorSelection; if (selection)
function EditorTestSelection(){ if (window.editorShell) { dump("Testing selection\n"); var selection = window.editorShell.editorSelection; if (selection) { dump("Got selection\n"); var firstRange = selection.getRangeAt(0); if (firstRange) { dump("Range contains \""); dum...
dump("Testing selection\n"); var selection = window.editorShell.editorSelection; if (selection)
dump("Got selection\n"); var firstRange = selection.getRangeAt(0); if (firstRange)
function EditorTestSelection(){ if (window.editorShell) { dump("Testing selection\n"); var selection = window.editorShell.editorSelection; if (selection) { dump("Got selection\n"); var firstRange = selection.getRangeAt(0); if (firstRange) { dump("Range contains \""); dum...
dump("Got selection\n"); var firstRange = selection.getRangeAt(0); if (firstRange) { dump("Range contains \""); dump(firstRange.toString() + "\"\n"); }
dump("Range contains \""); dump(firstRange.toString() + "\"\n");
function EditorTestSelection(){ if (window.editorShell) { dump("Testing selection\n"); var selection = window.editorShell.editorSelection; if (selection) { dump("Got selection\n"); var firstRange = selection.getRangeAt(0); if (firstRange) { dump("Range contains \""); dum...
dump(window.editorShell.selectionAsText + "\n\n");
dump(editorShell.selectionAsText + "\n\n");
function EditorTestSelection(){ if (window.editorShell) { dump("Testing selection\n"); var selection = window.editorShell.editorSelection; if (selection) { dump("Got selection\n"); var firstRange = selection.getRangeAt(0); if (firstRange) { dump("Range contains \""); dum...
dump(window.editorShell.selectionAsHTML + "\n\n");
dump(editorShell.selectionAsHTML + "\n\n");
function EditorTestSelection(){ if (window.editorShell) { dump("Testing selection\n"); var selection = window.editorShell.editorSelection; if (selection) { dump("Got selection\n"); var firstRange = selection.getRangeAt(0); if (firstRange) { dump("Range contains \""); dum...
dump("Selection as text\n"); dump(editorShell.selectionAsText + "\n\n");
function EditorTestSelection(){ dump("Testing selection\n"); var selection = editorShell.editorSelection; if (selection) { dump("Got selection\n"); var firstRange = selection.getRangeAt(0); if (firstRange) { dump("Range contains \""); dump(firstRange.toString() + "\"\n"); } } dump("Sel...
dump("Selection as HTML\n"); dump(editorShell.selectionAsHTML + "\n\n");
var output; dump("\n====== Selection as XIF =======================\n"); output = editorShell.GetContentsAs("text/xif", 1); dump(output + "\n\n"); dump("====== Selection as unformatted text ==========\n"); output = editorShell.GetContentsAs("text/plain", 1); dump(output + "\n\n"); dump("====== Selection as formatted...
function EditorTestSelection(){ dump("Testing selection\n"); var selection = editorShell.editorSelection; if (selection) { dump("Got selection\n"); var firstRange = selection.getRangeAt(0); if (firstRange) { dump("Range contains \""); dump(firstRange.toString() + "\"\n"); } } dump("Sel...
var theButton = document.getElementById(styleName + "Button"); dump("Toggling style " + styleName + "\n"); if (theButton) { var isOn = theButton.getAttribute(styleName); if (isOn == "true") editorShell.RemoveTextProperty(gStyleTags[styleName], "", ""); else editorShell.SetTextProperty(gStyleTags[styleName], "", ""); c...
return _EditorObsolete();
function EditorToggleStyle(styleName){ // see if the style is already set by looking at the observer node, // which is the appropriate button // cmanske: I don't think we should depend on button state! // (this won't work for other list styles, anyway) // We need to get list type from document var theButton = d...
window.editorShell.Undo();
editorShell.Undo();
function EditorUndo(){ dump("Undoing\n"); window.editorShell.Undo(); contentWindow.focus();}
if (window.editorShell) { dump("Running Unit Tests\n"); window.editorShell.RunUnitTests(); }
dump("Running Unit Tests\n"); editorShell.RunUnitTests();
function EditorUnitTests(){ if (window.editorShell) { dump("Running Unit Tests\n"); window.editorShell.RunUnitTests(); }}
if (win.editorShell.checkOpenWindowForURLMatch(url, window))
if (win.editorShell.checkOpenWindowForURLMatch(url, win))
function editPage(url, launchWindow, delay){ var focusedWindow = document.commandDispatcher.focusedWindow; if (isDocumentFrame(focusedWindow)) url = focusedWindow.location.href; // User may not have supplied a window if (!launchWindow) { if (window) { launchWindow = window; } else { dum...
var kDefaultTimezone = calendarDefaultTimezone();
var kDefaultTimezone = window.opener.calendarDefaultTimezone();
function editRecurrence(){ var args = new Object(); args.calendarEvent = window.calendarItem; args.recurrenceInfo = window.recurrenceInfo || args.calendarEvent.recurrenceInfo; var kDefaultTimezone = calendarDefaultTimezone(); if (isEvent(window.calendarItem)) { var startDate = jsDateToDateTime(get...
args.time = gStartTime;
args.time = gStartTime.getInTimezone(gStartTimezone);
function editStartTimezone(){ var tzStart = document.getElementById("timezone-starttime"); if(tzStart.hasAttribute("disabled")) return; var args = new Object(); args.time = gStartTime; args.onOk = function(datetime) { var equalTimezones = false; if(gStartTime && gEndTime) { if(gStartTime.timezone == ...
if(gStartTime && gEndTime) { if(gStartTime.timezone == gEndTime.timezone) {
if(gStartTimezone && gEndTimezone) { if(gStartTimezone == gEndTimezone) {
function editStartTimezone(){ var tzStart = document.getElementById("timezone-starttime"); if(tzStart.hasAttribute("disabled")) return; var args = new Object(); args.time = gStartTime; args.onOk = function(datetime) { var equalTimezones = false; if(gStartTime && gEndTime) { if(gStartTime.timezone == ...
gStartTime = datetime;
gStartTimezone = datetime.timezone;
function editStartTimezone(){ var tzStart = document.getElementById("timezone-starttime"); if(tzStart.hasAttribute("disabled")) return; var args = new Object(); args.time = gStartTime; args.onOk = function(datetime) { var equalTimezones = false; if(gStartTime && gEndTime) { if(gStartTime.timezone == ...
gEndTime = gEndTime.getInTimezone(datetime.timezone);
gEndTimezone = datetime.timezone;
function editStartTimezone(){ var tzStart = document.getElementById("timezone-starttime"); if(tzStart.hasAttribute("disabled")) return; var args = new Object(); args.time = gStartTime; args.onOk = function(datetime) { var equalTimezones = false; if(gStartTime && gEndTime) { if(gStartTime.timezone == ...
function editToDo( calendarTodo ) { openEventDialog(calendarTodo, "edit", self.modifyEventDialogResponse, null);
function editToDo(task) { if (!task) return; modifyEventWithDialog(task);
function editToDo( calendarTodo ){ openEventDialog(calendarTodo, "edit", self.modifyEventDialogResponse, null);}
dump("*** foopy\n");
function editType(){ if (gTree.selectedItems && gTree.selectedItems[0]) { var uri = gTree.selectedItems[0].id; var handlerOverride = new HandlerOverride(uri); window.openDialog("chrome://communicator/content/pref/pref-applications-edit.xul", "appEdit", "chrome,modal=yes,resizable=no", handlerOverride); sel...
if (selected_token.needsLogin()) {
if (selected_token.needsLogin() || !(selected_token.needsUserInit)) {
function enableButtons(){ var login_toggle = "true"; var logout_toggle = "true"; var pw_toggle = "true"; var unload_toggle = "true"; getSelectedItem(); if (selected_module) { unload_toggle = "false"; showModuleInfo(); } else if (selected_slot) { // here's the workaround - login functions are all with to...
if (selected_token.isLoggedIn()) { logout_toggle = "false"; } else { login_toggle = "false";
if(selected_token.needsLogin()) { if (selected_token.isLoggedIn()) { logout_toggle = "false"; } else { login_toggle = "false"; }
function enableButtons(){ var login_toggle = "true"; var logout_toggle = "true"; var pw_toggle = "true"; var unload_toggle = "true"; getSelectedItem(); if (selected_module) { unload_toggle = "false"; showModuleInfo(); } else if (selected_slot) { // here's the workaround - login functions are all with to...
accountm.defaultAccount = newAccount;
am.defaultAccount = newAccount;
function EnableCheckMailAtStartUpIfNeeded(newAccount){ // Check if default account exists and if that account is alllowed to be // a default account. If no such account, make this one as the default account // and turn on the new mail check at startup for the current account if (!(gDefaultAccount && gDe...
document.getElementById("editPrefs").removeAttribute("disabled", "true"); document.getElementById("updateCRL").removeAttribute("disabled", "true");
function EnableCrlActions() { document.getElementById("deleteCrl").removeAttribute("disabled", "true"); // document.getElementById("updateCrl").removeAttribute("disabled", "true");}
var cmds = document.getElementById("venkmanStackCommands"); var sib = cmds.firstChild; while (sib) { sib.removeAttribute ("disabled"); sib = sib.nextSibling; } var tb = document.getElementById("cmd_stop"); tb.setAttribute("disabled", "true"); if (console.frames.length == 1) { tb = document.getElementById("cmd_step_ou...
var cmds = console.commandManager.list ("", CMD_NEED_STACK); for (var i in cmds) cmds[i].enabled = true; cmds = console.commandManager.list ("", CMD_NO_STACK); for (i in cmds) cmds[i].enabled = false;
function enableDebugCommands(){ var cmds = document.getElementById("venkmanStackCommands"); var sib = cmds.firstChild; while (sib) { sib.removeAttribute ("disabled"); sib = sib.nextSibling; } var tb = document.getElementById("cmd_stop"); tb.setAttribute("disabled", "true"); if (con...
if (receiptSend && (receiptSend.getAttribute("value") == "false")) { notInToCcPref.setAttribute("disabled", "true"); notInToCcLabel.setAttribute("disabled", "true"); outsideDomainPref.setAttribute("disabled", "true"); outsideDomainLabel.setAttribute("disabled", "true"); otherCasesPref.setAttribute("disabled", "true"); ...
var prefWindow = parent.hPrefWindow; var notInToCcLocked = prefWindow.getPrefIsLocked("mail.mdn.report.not_in_to_cc"); var outsideDomainLocked = prefWindow.getPrefIsLocked("mail.mdn.report.outside_domain"); var otherCasesLocked = prefWindow.getPrefIsLocked("mail.mdn.report.other"); var disableAll = receiptSend && (rec...
function EnableDisableAllowedReceipts() { if (receiptSend && (receiptSend.getAttribute("value") == "false")) { notInToCcPref.setAttribute("disabled", "true"); notInToCcLabel.setAttribute("disabled", "true"); outsideDomainPref.setAttribute("disabled", "true"); outsideDomainLabel.setAttribute("disabled", "tr...
editorShell.editor.SetFlags(plaintextEditor.eEditorMailMask);
editorShell.editor.SetFlags(nsIPlaintextEditor.eEditorMailMask);
function enableEditableFields(){ editorShell.editor.SetFlags(plaintextEditor.eEditorMailMask); var enableElements = document.getElementsByAttribute("disableonsend", "true"); for (i=0;i<enableElements.length;i++) { enableElements[i].removeAttribute('disabled'); }}
gEncryptionChoices.selectedItem = document.getElementById('encrypt_mail_never');
gEncryptionChoices.value = 0;
function enableEncryptionControls(do_enable){ if (gEncryptionChoicesLocked) return; if (do_enable) { gEncryptAlways.removeAttribute("disabled"); gNeverEncrypt.removeAttribute("disabled"); } else { gEncryptAlways.setAttribute("disabled", "true"); gNeverEncrypt.setAttribute("disabled", "true"); gEnc...
gBrowser.focus();
function enableMenuAccess() { if(document.commandDispatcher&&document.commandDispatcher.focusedElement) { if (document.commandDispatcher.focusedElement.getAttribute("id")=="menu-button") { BrowserWithSNAV(); gBrowser.contentWindow.focus(); return; } } // In case focus is somewhere else.. document....
var cmd = document.getElementById("cmd_reload"); cmd.removeAttribute ("disabled");
console.commandManager.commands["reload"].enabled = true;
function enableReloadCommand(){ var cmd = document.getElementById("cmd_reload"); cmd.removeAttribute ("disabled");}
directoriesList.removeAttribute("disabled"); directoriesListPopup.removeAttribute("disabled"); editButton.removeAttribute("disabled");
if (overrideGlobalPref.getAttribute("disabled") != "true") { directoriesList.removeAttribute("disabled"); directoriesListPopup.removeAttribute("disabled"); editButton.removeAttribute("disabled"); }
function enabling(){ var autocomplete = document.getElementById("ldapAutocomplete"); var directoriesList = document.getElementById("directoriesList"); var directoriesListPopup = document.getElementById("directoriesListPopup"); var editButton = document.getElementById("editButton"); switch(autocomplete.selectedIt...
dump('****** returning null 3\n');
function enclosingLink(node) { while (node) { var nodeName = node.localName; if (nodeName == "") return null; nodeName = nodeName.toLowerCase(); if (nodeName == "" || nodeName == "body" || nodeName == "html" || nodeName == "#document") return null; var href = nod...
gEncryptedStatusPanel.collapsed = false;
encryptionStatus: function(aNestingLevel, aEncryptionStatus, aRecipientCert) { if (aNestingLevel > 1) { // we are not interested return; } gEncryptionStatus = aEncryptionStatus; gEncryptionCert = aRecipientCert; gSMIMEContainer.collapsed = false; gEncryptedUINode.collapsed = false; if...
observerService.notifyObservers(_content, notification, urlStr);
observerService.notifyObservers(content, notification, urlStr);
endDocumentLoad : function(aRequest, aStatus) { // The document is done loading, it's okay to clear // the value again. getBrowser().userTypedClear = false; const nsIChannel = Components.interfaces.nsIChannel; var urlStr = aRequest.QueryInterface(nsIChannel).originalURI.spec; var observerService = ...
var someHidden = this._defaultEngines.some(function (e) {return e.hidden;}); gEngineManagerDialog.showRestoreDefaults(someHidden);
function EngineStore() { var searchService = Cc["@mozilla.org/browser/search-service;1"]. getService(Ci.nsIBrowserSearchService); this._engines = searchService.getVisibleEngines({}).map(this._cloneEngine); this._ops = [];}
ENSURE(type == "text/html", "EngineURLs must be of type text/html!", Cr.NS_ERROR_NOT_IMPLEMENTED);
function EngineURL(aType, aMethod, aTemplate) { ENSURE_ARG(aType && aMethod && aTemplate, "missing type, method or template for EngineURL!"); var method = aMethod.toUpperCase(); var type = aType.toLowerCase(); ENSURE_ARG(method == "GET" || method == "POST", "method passed to EngineURL must...
ENSURE(!kIllegalWords.test(aTemplate), "Invalid URL parameter!", Cr.NS_ERROR_NOT_IMPLEMENTED);
function EngineURL(aType, aMethod, aTemplate) { ENSURE_ARG(aType && aMethod && aTemplate, "missing type, method or template for EngineURL!"); var method = aMethod.toUpperCase(); var type = aType.toLowerCase(); ENSURE_ARG(method == "GET" || method == "POST", "method passed to EngineURL must...
kNC_Root = aRDF.GetResource("NC:SearchEngineRoot"); kNC_child = aRDF.GetResource("http: kNC_Name = aRDF.GetResource("http:
var kNC_Root = aRDF.GetResource("NC:SearchEngineRoot"); var kNC_child = aRDF.GetResource("http: var kNC_Name = aRDF.GetResource("http:
function ensureDefaultEnginePrefs(aRDF,aDS) { mPrefs = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPrefBranch); var defaultName = mPrefs.getComplexValue("browser.search.defaultenginename" , Components.interfaces.nsIPrefLocalizedString); kNC_Root = aRDF.GetResource("N...
mPrefs = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPrefBranch);
var mPrefs = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPrefBranch);
function ensureDefaultEnginePrefs(aRDF,aDS) { mPrefs = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPrefBranch); var defaultName = mPrefs.getComplexValue("browser.search.defaultenginename" , Components.interfaces.nsIPrefLocalizedString); kNC_Root = aRDF.GetResource("N...
var defaultName = mPrefs.getComplexValue("browser.search.defaultenginename" , Components.interfaces.nsIPrefLocalizedString);
var defaultName = mPrefs.getComplexValue("browser.search.defaultenginename", Components.interfaces.nsIPrefLocalizedString).data;
function ensureDefaultEnginePrefs(aRDF,aDS) { var mPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch); var defaultName = mPrefs.getComplexValue("browser.search.defaultenginename" , Components.interfaces.nsIPrefLocalizedString); var kNC_Root = aRDF.GetReso...
var mPrefs = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPrefBranch);
function ensureSearchPref() { var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); var ds = rdf.GetDataSource("rdf:internetsearch"); kNC_Name = rdf.GetResource("http://home.netscape.com/NC-rdf#Name"); try { defaultEngine = mPrefs.getCharPr...
var printPreviewTB = document.createElementNS(XUL_NS, "toolbar");
printPreviewTB = document.createElementNS(XUL_NS, "toolbar");
enterPrintPreview: function () { var webBrowserPrint = this.getWebBrowserPrint(); var printSettings = this.getPrintSettings(); try { webBrowserPrint.printPreview(printSettings, null, this._webProgressPP.value); } catch (e) { // Pressing cancel is expressed as an NS_ERROR_ABORT return value, ...
this._chromeState.hadTabStrip = getBrowser().getStripVisibility(); getBrowser().setStripVisibilityTo(false);
if ("getStripVisibility" in getBrowser()) { this._chromeState.hadTabStrip = getBrowser().getStripVisibility(); getBrowser().setStripVisibilityTo(false); }
enterPrintPreview: function () { var webBrowserPrint = this.getWebBrowserPrint(); var printSettings = this.getPrintSettings(); try { webBrowserPrint.printPreview(printSettings, null, this._webProgressPP.value); } catch (e) { // Pressing cancel is expressed as an NS_ERROR_ABORT return value, ...
this._summary = null; this._content = null; this._title = null;
this.summary = null; this.content = null; this.title = null;
function Entry() { this._summary = null; this._content = null; this._title = null; this.fields = Cc["@mozilla.org/hash-property-bag;1"]. createInstance(Ci.nsIWritablePropertyBag2); this.link = null; this.id = null; this.baseURI = null;}
function ep_addhook(pattern, f, name, neg)
function ep_addhook(pattern, f, name, neg, enabled)
function ep_addhook(pattern, f, name, neg){ if (typeof f != "function") return false; neg = Boolean(neg); return this.hooks.push({pattern: pattern, f: f, name: name, neg: neg})-1;}
return this.hooks.push({pattern: pattern, f: f, name: name, neg: neg})-1;
return (this.hooks.push({pattern: pattern, f: f, name: name, neg: neg, enabled: enabled}) - 1);
function ep_addhook(pattern, f, name, neg){ if (typeof f != "function") return false; neg = Boolean(neg); return this.hooks.push({pattern: pattern, f: f, name: name, neg: neg})-1;}
if (!matchObject (e, hooks[h].pattern, hooks[h].neg))
if (!hooks[h].enabled || !matchObject (e, hooks[h].pattern, hooks[h].neg))
function ep_hook(e){ var hooks = this.hooks; hook_loop: for (var h in hooks) { if (!matchObject (e, hooks[h].pattern, hooks[h].neg)) continue hook_loop; e.hooks.push (hooks[h]); var rv = hooks[h].f(e); if ((typeof rv == "boolean") && (rv == false)) ...
var ddprefix = "";
function ep_routeevent (e){ var count = 0; var ddprefix = ""; this.currentEvent = e; e.level = 0; while (e.destObject) { e.level++; this.onHook (e); var destObject = e.destObject; e.destObject = (void 0); switch (typeof destObject[e.destMethod]) { ...
dd ("Error routing event: " + ex.toSource());
dd ("Error routing event: " + ex + " in " + e.destMethod);
function ep_routeevent (e){ var count = 0; var ddprefix = ""; this.currentEvent = e; e.level = 0; while (e.destObject) { e.level++; this.onHook (e); var destObject = e.destObject; e.destObject = (void 0); switch (typeof destObject[e.destMethod]) { ...
if (i * 4 >= this.eventsPerStep)
if ((i * 4 >= this.eventsPerStep) && (en - st > 0))
function ep_stepevents(){ var i = 0; var st, en, e; st = new Date(); while (i < this.eventsPerStep) { if (this.queuePointer >= this.queue.length) break; e = this.queue[this.queuePointer++]; if (e.type == "yield") break; this.routeEvent(e); i++; ...
return ("[" + err + "] Unknown error code.");
return ("[" + err + "] Unknown error.");
function errorToString( err ){ if (err instanceof Error) return err.message; switch (err) { case NS_ERROR_OFFLINE: return "NS_ERROR_OFFLINE"; // xxx todo: there may be a more comprehensive API for these: case Components.results.NS_ERROR_INVALID_ARG: return "NS_ERROR_INVALID_ARG";...