rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
messengerMigrator = Components.classes[messengerMigratorProgID].getService(Components.interfaces.nsIMessengerMigrator); | messengerMigrator = Components.classes[messengerMigratorContractID].getService(Components.interfaces.nsIMessengerMigrator); | function verifyAccounts() { var openWizard = false; var prefillAccount; try { var am = Components.classes[accountManagerProgID].getService(Components.interfaces.nsIMsgAccountManager); var accounts = am.accounts; // as long as we have some accounts, we're fine. var accountCount = accounts.Count(); var invalidAccounts = getInvalidAccounts(accounts); if (invalidAccounts.length > 0) { prefillAccount = invalidAccounts[0]; dump("prefillAccount = " + prefillAccount + "\n"); } else { } // if there are no accounts, or all accounts are "invalid" // then kick off the account migration if (accountCount == invalidAccounts.length) { try { messengerMigrator = Components.classes[messengerMigratorProgID].getService(Components.interfaces.nsIMessengerMigrator); dump("attempt to UpgradePrefs. If that fails, open the account wizard.\n"); messengerMigrator.UpgradePrefs(); } catch (ex) { // upgrade prefs failed, so open account wizard openWizard = true; } } if (openWizard || prefillAccount) { MsgAccountWizard(prefillAccount); } } catch (ex) { dump("error verifying accounts " + ex + "\n"); return; }} |
var protocolinfo = Components.classes["component: | var protocolinfo = Components.classes["@mozilla.org/messenger/protocol/info;1?type=" + server.type].getService(Components.interfaces.nsIMsgProtocolInfo); | function verifyLocalFoldersAccount(account) { dump("Looking for Local Folders.....\n"); var localMailServer = null; try { localMailServer = am.localFoldersServer; } catch (ex) { // dump("exception in findserver: " + ex + "\n"); localMailServer = null; } try { var server = account.incomingServer; var identity = account.identities.QueryElementAt(0, Components.interfaces.nsIMsgIdentity); // use server type to get the protocol info var protocolinfo = Components.classes["component://netscape/messenger/protocol/info;type=" + server.type].getService(Components.interfaces.nsIMsgProtocolInfo); // for this protocol, do we default the folder prefs to this server, or to the "Local Folders" server defaultCopiesAndFoldersPrefsToServer = protocolinfo.defaultCopiesAndFoldersPrefsToServer; if (!localMailServer) { // dump("Creating local mail account\n"); // creates a copy of the identity you pass in messengerMigrator = Components.classes["component://netscape/messenger/migrator"].getService(Components.interfaces.nsIMessengerMigrator); messengerMigrator.createLocalMailAccount(false /* false, since we are not migrating */); try { localMailServer = am.localFoldersServer; } catch (ex) { dump("error! we should have found the local mail server after we created it.\n"); localMailServer = null; } } var copiesAndFoldersServer = null; if (defaultCopiesAndFoldersPrefsToServer) { copiesAndFoldersServer = server; } else { if (!localMailServer) { dump("error! we should have a local mail server at this point\n"); return; } copiesAndFoldersServer = localMailServer; } setDefaultCopiesAndFoldersPrefs(identity, copiesAndFoldersServer); } catch (ex) { // return false (meaning we did not create the account) // on any error dump("Error creating local mail: " + ex + "\n"); return false; } return true;} |
messengerMigrator = Components.classes["component: | messengerMigrator = Components.classes["@mozilla.org/messenger/migrator;1"].getService(Components.interfaces.nsIMessengerMigrator); | function verifyLocalFoldersAccount(account) { dump("Looking for Local Folders.....\n"); var localMailServer = null; try { localMailServer = am.localFoldersServer; } catch (ex) { // dump("exception in findserver: " + ex + "\n"); localMailServer = null; } try { var server = account.incomingServer; var identity = account.identities.QueryElementAt(0, Components.interfaces.nsIMsgIdentity); // use server type to get the protocol info var protocolinfo = Components.classes["component://netscape/messenger/protocol/info;type=" + server.type].getService(Components.interfaces.nsIMsgProtocolInfo); // for this protocol, do we default the folder prefs to this server, or to the "Local Folders" server defaultCopiesAndFoldersPrefsToServer = protocolinfo.defaultCopiesAndFoldersPrefsToServer; if (!localMailServer) { // dump("Creating local mail account\n"); // creates a copy of the identity you pass in messengerMigrator = Components.classes["component://netscape/messenger/migrator"].getService(Components.interfaces.nsIMessengerMigrator); messengerMigrator.createLocalMailAccount(false /* false, since we are not migrating */); try { localMailServer = am.localFoldersServer; } catch (ex) { dump("error! we should have found the local mail server after we created it.\n"); localMailServer = null; } } var copiesAndFoldersServer = null; if (defaultCopiesAndFoldersPrefsToServer) { copiesAndFoldersServer = server; } else { if (!localMailServer) { dump("error! we should have a local mail server at this point\n"); return; } copiesAndFoldersServer = localMailServer; } setDefaultCopiesAndFoldersPrefs(identity, copiesAndFoldersServer); } catch (ex) { // return false (meaning we did not create the account) // on any error dump("Error creating local mail: " + ex + "\n"); return false; } return true;} |
function verifyLocalFoldersAccount(account) { dump("Looking for Local Folders.....\n"); | function verifyLocalFoldersAccount(account) { | function verifyLocalFoldersAccount(account) { dump("Looking for Local Folders.....\n"); var localMailServer = null; try { localMailServer = am.localFoldersServer; } catch (ex) { // dump("exception in findserver: " + ex + "\n"); localMailServer = null; } try { var server = account.incomingServer; var identity = account.identities.QueryElementAt(0, Components.interfaces.nsIMsgIdentity); // for this server, do we default the folder prefs to this server, or to the "Local Folders" server var defaultCopiesAndFoldersPrefsToServer = server.defaultCopiesAndFoldersPrefsToServer; if (!localMailServer) { // dump("Creating local mail account\n"); // creates a copy of the identity you pass in messengerMigrator = Components.classes["@mozilla.org/messenger/migrator;1"].getService(Components.interfaces.nsIMessengerMigrator); messengerMigrator.createLocalMailAccount(false /* false, since we are not migrating */); try { localMailServer = am.localFoldersServer; } catch (ex) { dump("error! we should have found the local mail server after we created it.\n"); localMailServer = null; } } var copiesAndFoldersServer = null; if (defaultCopiesAndFoldersPrefsToServer) { copiesAndFoldersServer = server; } else { if (!localMailServer) { dump("error! we should have a local mail server at this point\n"); return; } copiesAndFoldersServer = localMailServer; } setDefaultCopiesAndFoldersPrefs(identity, copiesAndFoldersServer); } catch (ex) { // return false (meaning we did not create the account) // on any error dump("Error creating local mail: " + ex + "\n"); return false; } return true;} |
var folderPane_menuitem = document.getElementById('menu_showFolderPane'); | function view_init(){ if (!gMessengerBundle) gMessengerBundle = document.getElementById("bundle_messenger"); var message_menuitem = document.getElementById('menu_showMessagePane'); if (message_menuitem && !message_menuitem.hidden) { message_menuitem.setAttribute('checked', !IsMessagePaneCollapsed()); message_menuitem.setAttribute('disabled', gAccountCentralLoaded); } var folderPane_menuitem = document.getElementById('menu_showFolderPane'); if (folderPane_menuitem && !folderPane_menuitem.hidden) folderPane_menuitem.setAttribute('checked', !IsFolderPaneCollapsed()); // Disable some menus if account manager is showing var sort_menuitem = document.getElementById('viewSortMenu'); if (sort_menuitem) { sort_menuitem.setAttribute("disabled", gAccountCentralLoaded); } var view_menuitem = document.getElementById('viewMessageViewMenu'); if (view_menuitem) { view_menuitem.setAttribute("disabled", gAccountCentralLoaded); } var threads_menuitem = document.getElementById('viewMessagesMenu'); if (threads_menuitem) { threads_menuitem.setAttribute("disabled", gAccountCentralLoaded); } // Initialize the View Attachment Inline menu var viewAttachmentInline = pref.getBoolPref("mail.inline_attachments"); document.getElementById("viewAttachmentsInlineMenuitem").setAttribute("checked", viewAttachmentInline ? "true" : "false"); document.commandDispatcher.updateCommands('create-menu-view');} |
|
viewsToolbarButton = document.getElementById("mailviews-container"); if (!viewsToolbarButton) document.getElementById('viewMessageViewMenu').collapsed = true; | function view_init(){ if (!gMessengerBundle) gMessengerBundle = document.getElementById("bundle_messenger"); var message_menuitem=document.getElementById('menu_showMessage'); if (message_menuitem) { var message_menuitem_hidden = message_menuitem.getAttribute("hidden"); if(message_menuitem_hidden != "true"){ message_menuitem.setAttribute('checked', !IsMessagePaneCollapsed()); message_menuitem.setAttribute('disabled', gAccountCentralLoaded); } } // Disable some menus if account manager is showing var sort_menuitem = document.getElementById('viewSortMenu'); if (sort_menuitem) { sort_menuitem.setAttribute("disabled", gAccountCentralLoaded); } var view_menuitem = document.getElementById('viewMessageViewMenu'); if (view_menuitem) { view_menuitem.setAttribute("disabled", gAccountCentralLoaded); } var threads_menuitem = document.getElementById('viewMessagesMenu'); if (threads_menuitem) { threads_menuitem.setAttribute("disabled", gAccountCentralLoaded); } // Initialize the View Attachment Inline menu var viewAttachmentInline = pref.getBoolPref("mail.inline_attachments"); document.getElementById("viewAttachmentsInlineMenuitem").setAttribute("checked", viewAttachmentInline ? "true" : "false"); document.commandDispatcher.updateCommands('create-menu-view');} |
|
function viewAll (elt, dictTypes) | function viewAll (elt, dictTypes, attrFilters) | function viewAll (elt, dictTypes){ var fView = false; var rgImages = getChildrenByTagName (elt, 'IMG'); var cImages = rgImages.length; for (var iImage = 0; iImage < cImages; iImage++) { var strImage = trimSrc (rgImages [iImage].src); if (dictTypes [strImage]) { fView = true; break; } } var rgElts = getChildrenByTagName (elt, 'DIV'); var cElts = rgElts.length; if (cElts != 0) { var iElt; for (iElt = 0; iElt < cElts; iElt ++) fView |= viewAll (rgElts [iElt], dictTypes); } elt.style.display = fView ? '' : 'none'; return fView;} |
fView |= viewAll (rgElts [iElt], dictTypes); | fView |= viewAll (rgElts [iElt], dictTypes, attrFilters); | function viewAll (elt, dictTypes){ var fView = false; var rgImages = getChildrenByTagName (elt, 'IMG'); var cImages = rgImages.length; for (var iImage = 0; iImage < cImages; iImage++) { var strImage = trimSrc (rgImages [iImage].src); if (dictTypes [strImage]) { fView = true; break; } } var rgElts = getChildrenByTagName (elt, 'DIV'); var cElts = rgElts.length; if (cElts != 0) { var iElt; for (iElt = 0; iElt < cElts; iElt ++) fView |= viewAll (rgElts [iElt], dictTypes); } elt.style.display = fView ? '' : 'none'; return fView;} |
var rgSpans = getChildrenByTagName (elt, 'SPAN'); var cSpans = rgSpans.length; for (var iSpan = 0; iSpan < cSpans; iSpan++) { var strSpan = rgSpans [iSpan].firstChild.nodeValue; for (strzzz in attrFilters) if (strSpan == strzzz) fView = false; } | function viewAll (elt, dictTypes){ var fView = false; var rgImages = getChildrenByTagName (elt, 'IMG'); var cImages = rgImages.length; for (var iImage = 0; iImage < cImages; iImage++) { var strImage = trimSrc (rgImages [iImage].src); if (dictTypes [strImage]) { fView = true; break; } } var rgElts = getChildrenByTagName (elt, 'DIV'); var cElts = rgElts.length; if (cElts != 0) { var iElt; for (iElt = 0; iElt < cElts; iElt ++) fView |= viewAll (rgElts [iElt], dictTypes); } elt.style.display = fView ? '' : 'none'; return fView;} |
|
function ViewConfig(dropTypes, dropOnTypes, excludeItems, expandQueries, firstDropIndex, filterTransactions) { this.dropTypes = dropTypes; this.dropOnTypes = dropOnTypes; | function ViewConfig(peerDropTypes, childDropTypes, excludeItems, expandQueries, peerDropIndex) { this.peerDropTypes = peerDropTypes; this.childDropTypes = childDropTypes; | function ViewConfig(dropTypes, dropOnTypes, excludeItems, expandQueries, firstDropIndex, filterTransactions) { this.dropTypes = dropTypes; this.dropOnTypes = dropOnTypes; this.excludeItems = excludeItems; this.expandQueries = expandQueries; this.firstDropIndex = firstDropIndex; this.filterTransactions = filterTransactions;} |
this.firstDropIndex = firstDropIndex; this.filterTransactions = filterTransactions; | this.peerDropIndex = peerDropIndex; | function ViewConfig(dropTypes, dropOnTypes, excludeItems, expandQueries, firstDropIndex, filterTransactions) { this.dropTypes = dropTypes; this.dropOnTypes = dropOnTypes; this.excludeItems = excludeItems; this.expandQueries = expandQueries; this.firstDropIndex = firstDropIndex; this.filterTransactions = filterTransactions;} |
return true; | function ViewCookieSelected( e ) { var cookie = null; var cookietree = document.getElementById("cookietree"); var selItemsMax = false; if(cookietree.nodeName != "tree") return false; if(cookietree.selectedItems.length > 1) selItemsMax = true; if( cookietree.selectedItems.length ) document.getElementById("removeCookies").removeAttribute("disabled","true"); if( ( e.type == "keypress" || e.type == "select" ) && e.target.selectedItems.length ) cookie = cookietree.selectedItems[0]; if( e.type == "click" ) cookie = e.target.parentNode.parentNode; if( !cookie || cookie.getAttribute("id").indexOf("tree_") == -1) return false; var idx = parseInt(cookie.getAttribute("id").substring(5,cookie.getAttribute("id").length)); for (x=0; x<cookies.length; x++) { if (cookies[x].number == idx) { idx = x; break; } } var props = [cookies[idx].number, cookies[idx].name, cookies[idx].value, cookies[idx].domaintype, cookies[idx].domain, cookies[idx].path, cookies[idx].secure, cookies[idx].expire]; rows = [null,"ifl_name","ifl_value","ifl_domaintype","ifl_domain","ifl_path","ifl_secure","ifl_expires"]; for(i = 1; i < props.length; i++) { if(i == 3) { var dtypecell = document.getElementById("ifl_domaintype"); dtypecell.setAttribute("value", cookies[idx].domaintype+":"); continue; } var field = document.getElementById(rows[i]); var content = props[i]; var value = ( !selItemsMax ) ? content : ""; // multiple selections clear fields. field.setAttribute("value", value); if(rows[i] == "ifl_expires") break; }} |
|
? date.toLocaleString() | ? localetimestr | function ViewCookieSelected( e ) { var cookie = null; var cookietree = document.getElementById("cookietree"); var selItemsMax = false; if(cookietree.nodeName != "tree") return false; if(cookietree.selectedItems.length > 1) selItemsMax = true; if( cookietree.selectedItems.length ) document.getElementById("removeCookies").removeAttribute("disabled","true"); if( ( e.type == "keypress" || e.type == "select" ) && e.target.selectedItems.length ) cookie = cookietree.selectedItems[0]; if( e.type == "click" ) cookie = e.target.parentNode.parentNode; if( !cookie || cookie.getAttribute("id").indexOf("cookietree_") == -1) return false; var idx = parseInt(cookie.getAttribute("id").substring("cookietree_".length,cookie.getAttribute("id").length)); for (var x=0; x<cookies.length; x++) { if (cookies[x].number == idx) { idx = x; break; } } var props = [cookies[idx].number, cookies[idx].name, cookies[idx].value, cookies[idx].isDomain, cookies[idx].host, cookies[idx].path, cookies[idx].isSecure, cookies[idx].expires]; var rows = [null,"ifl_name","ifl_value","ifl_isDomain","ifl_host","ifl_path","ifl_isSecure","ifl_expires"]; var value; var field; for(var i = 1; i < props.length; i++) { if(rows[i] == "ifl_isDomain") { field = document.getElementById("ifl_isDomain"); value = cookies[idx].isDomain ? bundle.GetStringFromName("domainColon") : bundle.GetStringFromName("hostColon"); } else if (rows[i] == "ifl_isSecure") { field = document.getElementById("ifl_isSecure"); value = cookies[idx].isSecure ? bundle.GetStringFromName("yes") : bundle.GetStringFromName("no"); } else if (rows[i] == "ifl_expires") { field = document.getElementById("ifl_expires"); var date = new Date(1000*cookies[idx].expires); value = cookies[idx].expires ? date.toLocaleString() : bundle.GetStringFromName("AtEndOfSession"); } else { field = document.getElementById(rows[i]); value = props[i]; } if (selItemsMax && rows[i] != "ifl_isDomain") { value = ""; // clear field if multiple selections } field.setAttribute("value", value); if(rows[i] == "ifl_expires") break; } return true;} |
window.openDialog( "chrome: "_blank", "scrollbars,resizable,chrome,dialog=no", this.target.ownerDocument.location.href); | window.openDialog( "chrome: "_blank", "scrollbars,resizable,chrome,dialog=no", this.target.ownerDocument.location.href, "charset=" + this.target.ownerDocument.characterSet); | viewFrameSource : function () { window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "scrollbars,resizable,chrome,dialog=no", this.target.ownerDocument.location.href); }, |
window.openDialog( "chrome: "_blank", "scrollbars,resizable,chrome,dialog=no", this.target.ownerDocument.location.href, "charset=" + this.target.ownerDocument.characterSet); | BrowserViewSourceOfDocument(this.target.ownerDocument); | viewFrameSource : function () { window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "scrollbars,resizable,chrome,dialog=no", this.target.ownerDocument.location.href, "charset=" + this.target.ownerDocument.characterSet); }, |
openTopWin( this.imageURL ); | viewImage : function () { openTopWin( this.imageURL ); }, |
|
BrowserPageInfo(this.target.ownerDocument); | BrowserPageInfo(); | viewInfo : function () { BrowserPageInfo(this.target.ownerDocument); }, |
var mailSessionProgID = "component: | var mailSessionContractID = "@mozilla.org/messenger/services/session;1"; | function ViewPageSource(messages){ var url; var uri; var mailSessionProgID = "component://netscape/messenger/services/session"; var numMessages = messages.length; if (numMessages == 0) { dump("MsgViewPageSource(): No messages selected.\n"); return false; } // First, get the mail session var mailSession = Components.classes[mailSessionProgID].getService(); if (!mailSession) return false; mailSession = mailSession.QueryInterface(Components.interfaces.nsIMsgMailSession); if (!mailSession) return false; for(var i = 0; i < numMessages; i++) { var messageResource = messages[i].QueryInterface(Components.interfaces.nsIRDFResource); uri = messageResource.Value; // Now, we need to get a URL from a URI url = mailSession.ConvertMsgURIToMsgURL(uri, msgWindow); if (url) url += "?header=src"; // Use a browser window to view source window.openDialog( getBrowserURL(), "_blank", "scrollbars,resizable,chrome,dialog=no", url, "view-source" ); }} |
var mailSession = Components.classes[mailSessionProgID].getService(); | var mailSession = Components.classes[mailSessionContractID].getService(); | function ViewPageSource(messages){ var url; var uri; var mailSessionProgID = "component://netscape/messenger/services/session"; var numMessages = messages.length; if (numMessages == 0) { dump("MsgViewPageSource(): No messages selected.\n"); return false; } // First, get the mail session var mailSession = Components.classes[mailSessionProgID].getService(); if (!mailSession) return false; mailSession = mailSession.QueryInterface(Components.interfaces.nsIMsgMailSession); if (!mailSession) return false; for(var i = 0; i < numMessages; i++) { var messageResource = messages[i].QueryInterface(Components.interfaces.nsIRDFResource); uri = messageResource.Value; // Now, we need to get a URL from a URI url = mailSession.ConvertMsgURIToMsgURL(uri, msgWindow); if (url) url += "?header=src"; // Use a browser window to view source window.openDialog( getBrowserURL(), "_blank", "scrollbars,resizable,chrome,dialog=no", url, "view-source" ); }} |
var url; var uri; var mailSessionContractID = "@mozilla.org/messenger/services/session;1"; | function ViewPageSource(messages){ var url; var uri; var mailSessionContractID = "@mozilla.org/messenger/services/session;1"; var numMessages = messages.length; if (numMessages == 0) { dump("MsgViewPageSource(): No messages selected.\n"); return false; } // First, get the mail session var mailSession = Components.classes[mailSessionContractID].getService(); if (!mailSession) return false; mailSession = mailSession.QueryInterface(Components.interfaces.nsIMsgMailSession); if (!mailSession) return false; for(var i = 0; i < numMessages; i++) { uri = messages[i]; // Now, we need to get a URL from a URI url = mailSession.ConvertMsgURIToMsgURL(uri, msgWindow); if (url) { // XXX what if there already is a "?", like "?part=0" // XXX shouldn't this be "&header=src" in that case? url += "?header=src"; } window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "scrollbars,resizable,chrome,dialog=no", url); } return true;} |
|
var mailSession = Components.classes[mailSessionContractID].getService(); if (!mailSession) return false; | try { const mailSessionContractID = "@mozilla.org/messenger/services/session;1"; const nsIMsgMailSession = Components.interfaces.nsIMsgMailSession; var mailSession = Components.classes[mailSessionContractID].getService(nsIMsgMailSession); | function ViewPageSource(messages){ var url; var uri; var mailSessionContractID = "@mozilla.org/messenger/services/session;1"; var numMessages = messages.length; if (numMessages == 0) { dump("MsgViewPageSource(): No messages selected.\n"); return false; } // First, get the mail session var mailSession = Components.classes[mailSessionContractID].getService(); if (!mailSession) return false; mailSession = mailSession.QueryInterface(Components.interfaces.nsIMsgMailSession); if (!mailSession) return false; for(var i = 0; i < numMessages; i++) { uri = messages[i]; // Now, we need to get a URL from a URI url = mailSession.ConvertMsgURIToMsgURL(uri, msgWindow); if (url) { // XXX what if there already is a "?", like "?part=0" // XXX shouldn't this be "&header=src" in that case? url += "?header=src"; } window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "scrollbars,resizable,chrome,dialog=no", url); } return true;} |
mailSession = mailSession.QueryInterface(Components.interfaces.nsIMsgMailSession); if (!mailSession) return false; | var mailCharacterSet = "charset=" + msgWindow.mailCharacterSet; | function ViewPageSource(messages){ var url; var uri; var mailSessionContractID = "@mozilla.org/messenger/services/session;1"; var numMessages = messages.length; if (numMessages == 0) { dump("MsgViewPageSource(): No messages selected.\n"); return false; } // First, get the mail session var mailSession = Components.classes[mailSessionContractID].getService(); if (!mailSession) return false; mailSession = mailSession.QueryInterface(Components.interfaces.nsIMsgMailSession); if (!mailSession) return false; for(var i = 0; i < numMessages; i++) { uri = messages[i]; // Now, we need to get a URL from a URI url = mailSession.ConvertMsgURIToMsgURL(uri, msgWindow); if (url) { // XXX what if there already is a "?", like "?part=0" // XXX shouldn't this be "&header=src" in that case? url += "?header=src"; } window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "scrollbars,resizable,chrome,dialog=no", url); } return true;} |
for(var i = 0; i < numMessages; i++) { uri = messages[i]; url = mailSession.ConvertMsgURIToMsgURL(uri, msgWindow); if (url) { url += "?header=src"; } window.openDialog( "chrome: "_blank", "scrollbars,resizable,chrome,dialog=no", url); | for (var i = 0; i < numMessages; i++) { var url = mailSession.ConvertMsgURIToMsgURL(messages[i], msgWindow); window.openDialog( "chrome: "_blank", "scrollbars,resizable,chrome,dialog=no", url, mailCharacterSet); | function ViewPageSource(messages){ var url; var uri; var mailSessionContractID = "@mozilla.org/messenger/services/session;1"; var numMessages = messages.length; if (numMessages == 0) { dump("MsgViewPageSource(): No messages selected.\n"); return false; } // First, get the mail session var mailSession = Components.classes[mailSessionContractID].getService(); if (!mailSession) return false; mailSession = mailSession.QueryInterface(Components.interfaces.nsIMsgMailSession); if (!mailSession) return false; for(var i = 0; i < numMessages; i++) { uri = messages[i]; // Now, we need to get a URL from a URI url = mailSession.ConvertMsgURIToMsgURL(uri, msgWindow); if (url) { // XXX what if there already is a "?", like "?part=0" // XXX shouldn't this be "&header=src" in that case? url += "?header=src"; } window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "scrollbars,resizable,chrome,dialog=no", url); } return true;} |
} catch (e) { return false; } | function ViewPageSource(messages){ var url; var uri; var mailSessionContractID = "@mozilla.org/messenger/services/session;1"; var numMessages = messages.length; if (numMessages == 0) { dump("MsgViewPageSource(): No messages selected.\n"); return false; } // First, get the mail session var mailSession = Components.classes[mailSessionContractID].getService(); if (!mailSession) return false; mailSession = mailSession.QueryInterface(Components.interfaces.nsIMsgMailSession); if (!mailSession) return false; for(var i = 0; i < numMessages; i++) { uri = messages[i]; // Now, we need to get a URL from a URI url = mailSession.ConvertMsgURIToMsgURL(uri, msgWindow); if (url) { // XXX what if there already is a "?", like "?part=0" // XXX shouldn't this be "&header=src" in that case? url += "?header=src"; } window.openDialog( "chrome://navigator/content/viewSource.xul", "_blank", "scrollbars,resizable,chrome,dialog=no", url); } return true;} |
|
window.openDialog( "chrome: | window.openDialog( getBrowserURL(), | function ViewPageSource(messages){ var url; var uri; var mailSessionProgID = "component://netscape/messenger/services/session"; var numMessages = messages.length; if (numMessages == 0) { dump("MsgViewPageSource(): No messages selected.\n"); return false; } // First, get the mail session var mailSession = Components.classes[mailSessionProgID].getService(); if (!mailSession) return false; mailSession = mailSession.QueryInterface(Components.interfaces.nsIMsgMailSession); if (!mailSession) return false; for(var i = 0; i < numMessages; i++) { var messageResource = messages[i].QueryInterface(Components.interfaces.nsIRDFResource); uri = messageResource.Value; // Now, we need to get a URL from a URI url = mailSession.ConvertMsgURIToMsgURL(uri, msgWindow); if (url) url += "?header=src"; // Use a browser window to view source window.openDialog( "chrome://navigator/content/navigator.xul", "_blank", "chrome,menubar,status,dialog=no,resizable", url, "view-source" ); }} |
reference = focusedWindow.getSelection(); | reference = focusedWindow.__proto__.getSelection.call(focusedWindow); | viewPartialSource : function ( context ) { var focusedWindow = document.commandDispatcher.focusedWindow; if (focusedWindow == window) focusedWindow = _content; var docCharset = null; if (focusedWindow) docCharset = "charset=" + focusedWindow.document.characterSet; // "View Selection Source" and others such as "View MathML Source" // are mutually exclusive, with the precedence given to the selection // when there is one var reference = null; if (context == "selection") reference = focusedWindow.getSelection(); else if (context == "mathml") reference = this.target; else throw "not reached"; var docUrl = null; // unused (and play nice for fragments generated via XSLT too) window.openDialog("chrome://navigator/content/viewPartialSource.xul", "_blank", "scrollbars,resizable,chrome,dialog=no", docUrl, docCharset, reference, context); }, |
reference = focusedWindow.__proto__.getSelection.call(focusedWindow); | reference = focusedWindow.getSelection(); | viewPartialSource : function ( context ) { var focusedWindow = document.commandDispatcher.focusedWindow; if (focusedWindow == window) focusedWindow = content; var docCharset = null; if (focusedWindow) docCharset = "charset=" + focusedWindow.document.characterSet; // "View Selection Source" and others such as "View MathML Source" // are mutually exclusive, with the precedence given to the selection // when there is one var reference = null; if (context == "selection") reference = focusedWindow.__proto__.getSelection.call(focusedWindow); else if (context == "mathml") reference = this.target; else throw "not reached"; var docUrl = null; // unused (and play nice for fragments generated via XSLT too) window.openDialog("chrome://navigator/content/viewPartialSource.xul", "_blank", "scrollbars,resizable,chrome,dialog=no", docUrl, docCharset, reference, context); }, |
reference = focusedWindow.__proto__.getSelection.call(focusedWindow); | reference = focusedWindow.getSelection(); | viewPartialSource : function ( context ) { var focusedWindow = document.commandDispatcher.focusedWindow; if (focusedWindow == window) focusedWindow = content; var docCharset = null; if (focusedWindow) docCharset = "charset=" + focusedWindow.document.characterSet; // "View Selection Source" and others such as "View MathML Source" // are mutually exclusive, with the precedence given to the selection // when there is one var reference = null; if (context == "selection") reference = focusedWindow.__proto__.getSelection.call(focusedWindow); else if (context == "mathml") reference = this.target; else throw "not reached"; var docUrl = null; // unused (and play nice for fragments generated via XSLT too) window.openDialog("chrome://global/content/viewPartialSource.xul", "_blank", "scrollbars,resizable,chrome,dialog=no", docUrl, docCharset, reference, context); }, |
var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE; | var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; | function viewPartialSourceForSelection(selection){ var range = selection.getRangeAt(0); var ancestorContainer = range.commonAncestorContainer; var doc = ancestorContainer.ownerDocument; var startContainer = range.startContainer; var endContainer = range.endContainer; var startOffset = range.startOffset; var endOffset = range.endOffset; // let the ancestor be an element if (ancestorContainer.nodeType == Node.TEXT_NODE || ancestorContainer.nodeType == Node.CDATA_SECTION_NODE) ancestorContainer = ancestorContainer.parentNode; // for selectAll, let's use the entire document, including <html>...</html> // @see DocumentViewerImpl::SelectAll() for how selectAll is implemented try { if (ancestorContainer == doc.body) ancestorContainer = doc.documentElement; } catch (e) { } // each path is a "child sequence" (a.k.a. "tumbler") that // descends from the ancestor down to the boundary point var startPath = getPath(ancestorContainer, startContainer); var endPath = getPath(ancestorContainer, endContainer); // clone the fragment of interest and reset everything to be relative to it // note: it is with the clone that we operate/munge from now on ancestorContainer = ancestorContainer.cloneNode(true); startContainer = ancestorContainer; endContainer = ancestorContainer; // Only bother with the selection if it can be remapped. Don't mess with // leaf elements (such as <isindex>) that secretly use anynomous content // for their display appearance. var canDrawSelection = ancestorContainer.hasChildNodes(); if (canDrawSelection) { var i; for (i = startPath ? startPath.length-1 : -1; i >= 0; i--) { startContainer = startContainer.childNodes.item(startPath[i]); } for (i = endPath ? endPath.length-1 : -1; i >= 0; i--) { endContainer = endContainer.childNodes.item(endPath[i]); } // add special markers to record the extent of the selection // note: |startOffset| and |endOffset| are interpreted either as // offsets in the text data or as child indices (see the Range spec) // (here, munging the end point first to keep the start point safe...) var tmpNode; if (endContainer.nodeType == Node.TEXT_NODE || endContainer.nodeType == Node.CDATA_SECTION_NODE) { // do some extra tweaks to try to avoid the view-source output to look like // ...<tag>]... or ...]</tag>... (where ']' marks the end of the selection). // To get a neat output, the idea here is to remap the end point from: // 1. ...<tag>]... to ...]<tag>... // 2. ...]</tag>... to ...</tag>]... if ((endOffset > 0 && endOffset < endContainer.data.length) || !endContainer.parentNode || !endContainer.parentNode.parentNode) endContainer.insertData(endOffset, MARK_SELECTION_END); else { tmpNode = doc.createTextNode(MARK_SELECTION_END); endContainer = endContainer.parentNode; if (endOffset == 0) endContainer.parentNode.insertBefore(tmpNode, endContainer); else endContainer.parentNode.insertBefore(tmpNode, endContainer.nextSibling); } } else { tmpNode = doc.createTextNode(MARK_SELECTION_END); endContainer.insertBefore(tmpNode, endContainer.childNodes.item(endOffset)); } if (startContainer.nodeType == Node.TEXT_NODE || startContainer.nodeType == Node.CDATA_SECTION_NODE) { // do some extra tweaks to try to avoid the view-source output to look like // ...<tag>[... or ...[</tag>... (where '[' marks the start of the selection). // To get a neat output, the idea here is to remap the start point from: // 1. ...<tag>[... to ...[<tag>... // 2. ...[</tag>... to ...</tag>[... if ((startOffset > 0 && startOffset < startContainer.data.length) || !startContainer.parentNode || !startContainer.parentNode.parentNode || startContainer != startContainer.parentNode.lastChild) startContainer.insertData(startOffset, MARK_SELECTION_START); else { tmpNode = doc.createTextNode(MARK_SELECTION_START); startContainer = startContainer.parentNode; if (startOffset == 0) startContainer.parentNode.insertBefore(tmpNode, startContainer); else startContainer.parentNode.insertBefore(tmpNode, startContainer.nextSibling); } } else { tmpNode = doc.createTextNode(MARK_SELECTION_START); startContainer.insertBefore(tmpNode, startContainer.childNodes.item(startOffset)); } } // now extract and display the syntax highlighted source tmpNode = doc.createElementNS(NS_XHTML, 'div'); tmpNode.appendChild(ancestorContainer); // the load is aynchronous and so we will wait until the view-source DOM is done // before drawing the selection. if (canDrawSelection) { window.document.getElementById("appcontent").addEventListener("load", drawSelection, true); } // all our content is held by the data:URI and URIs are internally stored as utf-8 (see nsIURI.idl) var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE; getBrowser().webNavigation .loadURI("view-source:data:text/html;charset=utf-8," + encodeURIComponent(tmpNode.innerHTML), loadFlags, null, null, null);} |
document.documentElement.openSubDialog("chrome: "", null); | document.documentElement.openWindow("Toolkit:PasswordManager", "chrome: "", null); | viewPasswords: function() { document.documentElement.openSubDialog("chrome://messenger/content/preferences/viewpasswords.xul", "", null); }, |
if (gPrefs){ try { var wraplonglinesPrefValue = gPrefs.GetBoolPref("view_source.wrap_long_lines"); if (wraplonglinesPrefValue) document.getElementById('menu_wrapLongLines').setAttribute("checked", "true"); } catch (ex) { } } | function viewSource(url){ if (!url) return false; // throw Components.results.NS_ERROR_FAILURE; try { appCore = Components.classes["@mozilla.org/appshell/component/browser/instance;1"] .createInstance(Components.interfaces.nsIBrowserInstance); // Initialize browser instance.. appCore.setWebShellWindow(window); } catch(ex) { // Give up. window.close(); return false; } try { if ("arguments" in window && window.arguments.length >= 2) { if (window.arguments[1].indexOf('charset=') != -1) { var arrayArgComponents = window.arguments[1].split('='); if (arrayArgComponents) { appCore.setDefaultCharacterSet(arrayArgComponents[1]); //XXXjag see bug 67442 } } } } catch(ex) { } var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; var viewSrcUrl = "view-source:" + url; getBrowser().webNavigation.loadURI(viewSrcUrl, loadFlags); window._content.focus(); return true;} |
|
getMarkupDocumentViewer().defaultCharacterSet = arrayArgComponents[1]; | var docCharset = getBrowser().docShell.QueryInterface (Components.interfaces.nsIDocCharset); docCharset.charset = arrayArgComponents[1]; | function viewSource(url){ if (!url) return false; // throw Components.results.NS_ERROR_FAILURE; getBrowser().addEventListener("unload", onUnloadContent, true); getBrowser().addEventListener("load", onLoadContent, true); var loadFromURL = true; // // Parse the 'arguments' supplied with the dialog. // arg[0] - URL string. // arg[1] - Charset value in the form 'charset=xxx'. // arg[2] - Page descriptor used to load content from the cache. // arg[3] - Line number to go to. // if ("arguments" in window) { var arg; // // Set the charset of the viewsource window... // if (window.arguments.length >= 2) { arg = window.arguments[1]; try { if (typeof(arg) == "string" && arg.indexOf('charset=') != -1) { var arrayArgComponents = arg.split('='); if (arrayArgComponents) { //we should "inherit" the charset menu setting in a new window getMarkupDocumentViewer().defaultCharacterSet = arrayArgComponents[1]; } } } catch (ex) { // Ignore the failure and keep processing arguments... } } // // Get any specified line to jump to. // if (window.arguments.length >= 4) { arg = window.arguments[3]; gGoToLine = parseInt(arg); } // // Use the page descriptor to load the content from the cache (if // available). // if (window.arguments.length >= 3) { arg = window.arguments[2]; try { if (typeof(arg) == "object" && arg != null) { var PageLoader = getBrowser().webNavigation.QueryInterface(pageLoaderIface); // // Load the page using the page descriptor rather than the URL. // This allows the content to be fetched from the cache (if // possible) rather than the network... // PageLoader.loadPage(arg, pageLoaderIface.DISPLAY_AS_SOURCE); // The content was successfully loaded from the page cookie. loadFromURL = false; } } catch(ex) { // Ignore the failure. The content will be loaded via the URL // that was supplied in arg[0]. } } } if (loadFromURL) { // // Currently, an exception is thrown if the URL load fails... // var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; var viewSrcUrl = "view-source:" + url; getBrowser().webNavigation.loadURI(viewSrcUrl, loadFlags, null, null, null); } //check the view_source.wrap_long_lines pref and set the menuitem's checked attribute accordingly if (gPrefs) { try { var wraplonglinesPrefValue = gPrefs.getBoolPref("view_source.wrap_long_lines"); if (wraplonglinesPrefValue) document.getElementById('menu_wrapLongLines').setAttribute("checked", "true"); } catch (ex) { } try { document.getElementById("menu_highlightSyntax").setAttribute("checked", gPrefs.getBoolPref("view_source.syntax_highlight")); } catch (ex) { } } else { document.getElementById("menu_highlightSyntax").setAttribute("hidden", "true"); } window._content.focus(); return true;} |
getBrowser().webNavigation.loadURI(viewSrcUrl, loadFlags, null, null, null); | webNavigation.loadURI(viewSrcUrl, loadFlags, null, null, null); | function viewSource(url){ if (!url) return false; // throw Components.results.NS_ERROR_FAILURE; getBrowser().addEventListener("unload", onUnloadContent, true); getBrowser().addEventListener("load", onLoadContent, true); var loadFromURL = true; // // Parse the 'arguments' supplied with the dialog. // arg[0] - URL string. // arg[1] - Charset value in the form 'charset=xxx'. // arg[2] - Page descriptor used to load content from the cache. // arg[3] - Line number to go to. // if ("arguments" in window) { var arg; // // Set the charset of the viewsource window... // if (window.arguments.length >= 2) { arg = window.arguments[1]; try { if (typeof(arg) == "string" && arg.indexOf('charset=') != -1) { var arrayArgComponents = arg.split('='); if (arrayArgComponents) { //we should "inherit" the charset menu setting in a new window getMarkupDocumentViewer().defaultCharacterSet = arrayArgComponents[1]; } } } catch (ex) { // Ignore the failure and keep processing arguments... } } // // Get any specified line to jump to. // if (window.arguments.length >= 4) { arg = window.arguments[3]; gGoToLine = parseInt(arg); } // // Use the page descriptor to load the content from the cache (if // available). // if (window.arguments.length >= 3) { arg = window.arguments[2]; try { if (typeof(arg) == "object" && arg != null) { var PageLoader = getBrowser().webNavigation.QueryInterface(pageLoaderIface); // // Load the page using the page descriptor rather than the URL. // This allows the content to be fetched from the cache (if // possible) rather than the network... // PageLoader.loadPage(arg, pageLoaderIface.DISPLAY_AS_SOURCE); // The content was successfully loaded from the page cookie. loadFromURL = false; } } catch(ex) { // Ignore the failure. The content will be loaded via the URL // that was supplied in arg[0]. } } } if (loadFromURL) { // // Currently, an exception is thrown if the URL load fails... // var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; var viewSrcUrl = "view-source:" + url; getBrowser().webNavigation.loadURI(viewSrcUrl, loadFlags, null, null, null); } //check the view_source.wrap_long_lines pref and set the menuitem's checked attribute accordingly if (gPrefs) { try { var wraplonglinesPrefValue = gPrefs.getBoolPref("view_source.wrap_long_lines"); if (wraplonglinesPrefValue) document.getElementById('menu_wrapLongLines').setAttribute("checked", "true"); } catch (ex) { } try { document.getElementById("menu_highlightSyntax").setAttribute("checked", gPrefs.getBoolPref("view_source.syntax_highlight")); } catch (ex) { } } else { document.getElementById("menu_highlightSyntax").setAttribute("hidden", "true"); } window.content.focus(); return true;} |
window._content.focus(); | function viewSource(url){ if (!url) return false; // throw Components.results.NS_ERROR_FAILURE; try { appCore = Components.classes["@mozilla.org/appshell/component/browser/instance;1"] .createInstance(Components.interfaces.nsIBrowserInstance); // Initialize browser instance.. appCore.setWebShellWindow(window); } catch(ex) { // Give up. window.close(); return false; } try { if ("arguments" in window && window.arguments.length >= 2) { if (window.arguments[1].indexOf('charset=') != -1) { var arrayArgComponents = window.arguments[1].split('='); if (arrayArgComponents) { appCore.setDefaultCharacterSet(arrayArgComponents[1]); //XXXjag see bug 67442 } } } } catch(ex) { } var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; var viewSrcUrl = "view-source:" + url; getBrowser().webNavigation.loadURI(viewSrcUrl, loadFlags); return true;} |
|
docShellElement.markupDocumentViewer.defaultCharacterSet = arrayArgComponents[1]; | appCore.setDefaultCharacterSet(arrayArgComponents[1]); | function viewSource(url){ if (!url) return false; // throw Components.results.NS_ERROR_FAILURE; try { appCore = Components.classes["@mozilla.org/appshell/component/browser/instance;1"] .createInstance(Components.interfaces.nsIBrowserInstance); // Initialize browser instance.. appCore.setWebShellWindow(window); } catch(ex) { // Give up. window.close(); return false; } var docShellElement = document.getElementById("content"); docShellElement.docShell.viewMode = Components.interfaces.nsIDocShell.viewSource; try { if ("arguments" in window && window.arguments.length >= 2) { if (window.arguments[1].indexOf('charset=') != -1) { var arrayArgComponents = window.arguments[1].split('='); if (arrayArgComponents) { docShellElement.markupDocumentViewer.defaultCharacterSet = arrayArgComponents[1]; } } } } catch(ex) { } var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; docShellElement.webNavigation.loadURI(url, loadFlags); return true;} |
var wraplonglinesPrefValue = gPrefs.GetBoolPref("view_source.wrap_long_lines"); | var wraplonglinesPrefValue = gPrefs.getBoolPref("view_source.wrap_long_lines"); | function viewSource(url){ if (!url) return false; // throw Components.results.NS_ERROR_FAILURE; try { appCore = Components.classes["@mozilla.org/appshell/component/browser/instance;1"] .createInstance(Components.interfaces.nsIBrowserInstance); // Initialize browser instance.. appCore.setWebShellWindow(window); } catch(ex) { // Give up. window.close(); return false; } try { if ("arguments" in window && window.arguments.length >= 2) { if (window.arguments[1].indexOf('charset=') != -1) { var arrayArgComponents = window.arguments[1].split('='); if (arrayArgComponents) { appCore.setDefaultCharacterSet(arrayArgComponents[1]); //XXXjag see bug 67442 } } } } catch(ex) { } var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; var viewSrcUrl = "view-source:" + url; getBrowser().webNavigation.loadURI(viewSrcUrl, loadFlags); //check the view_source.wrap_long_lines pref and set the menuitem's checked attribute accordingly if (gPrefs){ try { var wraplonglinesPrefValue = gPrefs.GetBoolPref("view_source.wrap_long_lines"); if (wraplonglinesPrefValue) document.getElementById('menu_wrapLongLines').setAttribute("checked", "true"); } catch (ex) { } } window._content.focus(); return true;} |
document.getElementById("cmd_highlightSyntax").setAttribute("checked", gPrefs.getBoolPref("view_source.syntax_highlight")); | document.getElementById("menu_highlightSyntax").setAttribute("checked", gPrefs.getBoolPref("view_source.syntax_highlight")); | function viewSource(url){ if (!url) return false; // throw Components.results.NS_ERROR_FAILURE; try { appCore = Components.classes["@mozilla.org/appshell/component/browser/instance;1"] .createInstance(Components.interfaces.nsIBrowserInstance); // Initialize browser instance.. appCore.setWebShellWindow(window); } catch(ex) { // Give up. window.close(); return false; } var loadFromURL = true; // // Parse the 'arguments' supplied with the dialog. // arg[0] - URL string. // arg[1] - Charset value in the form 'charset=xxx'. // arg[2] - Page descriptor used to load content from the cache. // if ("arguments" in window) { var arg; // // Set the charset of the viewsource window... // if (window.arguments.length >= 2) { arg = window.arguments[1]; try { if (typeof(arg) == "string" && arg.indexOf('charset=') != -1) { var arrayArgComponents = arg.split('='); if (arrayArgComponents) { //we should "inherit" the charset menu setting in a new window getMarkupDocumentViewer().defaultCharacterSet = arrayArgComponents[1]; } } } catch (ex) { // Ignore the failure and keep processing arguments... } } // // Use the page descriptor to load the content from the cache (if // available). // if (window.arguments.length >= 3) { arg = window.arguments[2]; try { if (typeof(arg) == "object" && arg != null) { var PageLoader = getBrowser().webNavigation.QueryInterface(pageLoaderIface); // // Load the page using the page descriptor rather than the URL. // This allows the content to be fetched from the cache (if // possible) rather than the network... // PageLoader.LoadPage(arg, pageLoaderIface.DISPLAY_AS_SOURCE); // The content was successfully loaded from the page cookie. loadFromURL = false; } } catch(ex) { // Ignore the failure. The content will be loaded via the URL // that was supplied in arg[0]. } } } if (loadFromURL) { // // Currently, an exception is thrown if the URL load fails... // var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; var viewSrcUrl = "view-source:" + url; getBrowser().webNavigation.loadURI(viewSrcUrl, loadFlags, null, null, null); } //check the view_source.wrap_long_lines pref and set the menuitem's checked attribute accordingly if (gPrefs) { try { var wraplonglinesPrefValue = gPrefs.getBoolPref("view_source.wrap_long_lines"); if (wraplonglinesPrefValue) document.getElementById('menu_wrapLongLines').setAttribute("checked", "true"); } catch (ex) { } try { document.getElementById("cmd_highlightSyntax").setAttribute("checked", gPrefs.getBoolPref("view_source.syntax_highlight")); } catch (ex) { } } else { document.getElementById("cmd_highlightSyntax").setAttribute("hidden", "true"); } window._content.focus(); return true;} |
document.getElementById("cmd_highlightSyntax").setAttribute("hidden", "true"); | document.getElementById("menu_highlightSyntax").setAttribute("hidden", "true"); | function viewSource(url){ if (!url) return false; // throw Components.results.NS_ERROR_FAILURE; try { appCore = Components.classes["@mozilla.org/appshell/component/browser/instance;1"] .createInstance(Components.interfaces.nsIBrowserInstance); // Initialize browser instance.. appCore.setWebShellWindow(window); } catch(ex) { // Give up. window.close(); return false; } var loadFromURL = true; // // Parse the 'arguments' supplied with the dialog. // arg[0] - URL string. // arg[1] - Charset value in the form 'charset=xxx'. // arg[2] - Page descriptor used to load content from the cache. // if ("arguments" in window) { var arg; // // Set the charset of the viewsource window... // if (window.arguments.length >= 2) { arg = window.arguments[1]; try { if (typeof(arg) == "string" && arg.indexOf('charset=') != -1) { var arrayArgComponents = arg.split('='); if (arrayArgComponents) { //we should "inherit" the charset menu setting in a new window getMarkupDocumentViewer().defaultCharacterSet = arrayArgComponents[1]; } } } catch (ex) { // Ignore the failure and keep processing arguments... } } // // Use the page descriptor to load the content from the cache (if // available). // if (window.arguments.length >= 3) { arg = window.arguments[2]; try { if (typeof(arg) == "object" && arg != null) { var PageLoader = getBrowser().webNavigation.QueryInterface(pageLoaderIface); // // Load the page using the page descriptor rather than the URL. // This allows the content to be fetched from the cache (if // possible) rather than the network... // PageLoader.LoadPage(arg, pageLoaderIface.DISPLAY_AS_SOURCE); // The content was successfully loaded from the page cookie. loadFromURL = false; } } catch(ex) { // Ignore the failure. The content will be loaded via the URL // that was supplied in arg[0]. } } } if (loadFromURL) { // // Currently, an exception is thrown if the URL load fails... // var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; var viewSrcUrl = "view-source:" + url; getBrowser().webNavigation.loadURI(viewSrcUrl, loadFlags, null, null, null); } //check the view_source.wrap_long_lines pref and set the menuitem's checked attribute accordingly if (gPrefs) { try { var wraplonglinesPrefValue = gPrefs.getBoolPref("view_source.wrap_long_lines"); if (wraplonglinesPrefValue) document.getElementById('menu_wrapLongLines').setAttribute("checked", "true"); } catch (ex) { } try { document.getElementById("cmd_highlightSyntax").setAttribute("checked", gPrefs.getBoolPref("view_source.syntax_highlight")); } catch (ex) { } } else { document.getElementById("cmd_highlightSyntax").setAttribute("hidden", "true"); } window._content.focus(); return true;} |
createBrowserInstance(); if (appCore == null) { | appCore = Components.classes["@mozilla.org/appshell/component/browser/instance;1"] .createInstance(Components.interfaces.nsIBrowserInstance); appCore.setWebShellWindow(window); } catch(ex) { | function viewSource(url){ if (!url) return false; // throw Components.results.NS_ERROR_FAILURE; try { createBrowserInstance(); if (appCore == null) { // Give up. window.close(); return false; } // Initialize browser instance.. appCore.setWebShellWindow(window); } catch(ex) { } var docShellElement = document.getElementById("content-frame"); var docShell = docShellElement.docShell; docShell.viewMode = Components.interfaces.nsIDocShell.viewSource; var webNav = docShell.QueryInterface(Components.interfaces.nsIWebNavigation); try { if (window.arguments && window.arguments[1]) { if (window.arguments[1].indexOf('charset=') != -1) { var arrayArgComponents = window.arguments[1].split('='); if (arrayArgComponents) { appCore.SetDocumentCharset(arrayArgComponents[1]); } } } } catch(ex) { } var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; webNav.loadURI(url, loadFlags); return true;} |
} appCore.setWebShellWindow(window); | function viewSource(url){ if (!url) return false; // throw Components.results.NS_ERROR_FAILURE; try { createBrowserInstance(); if (appCore == null) { // Give up. window.close(); return false; } // Initialize browser instance.. appCore.setWebShellWindow(window); } catch(ex) { } var docShellElement = document.getElementById("content-frame"); var docShell = docShellElement.docShell; docShell.viewMode = Components.interfaces.nsIDocShell.viewSource; var webNav = docShell.QueryInterface(Components.interfaces.nsIWebNavigation); try { if (window.arguments && window.arguments[1]) { if (window.arguments[1].indexOf('charset=') != -1) { var arrayArgComponents = window.arguments[1].split('='); if (arrayArgComponents) { appCore.SetDocumentCharset(arrayArgComponents[1]); } } } } catch(ex) { } var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; webNav.loadURI(url, loadFlags); return true;} |
|
catch(ex) { } var docShellElement = document.getElementById("content-frame"); var docShell = docShellElement.docShell; docShell.viewMode = Components.interfaces.nsIDocShell.viewSource; var webNav = docShell.QueryInterface(Components.interfaces.nsIWebNavigation); | var docShellElement = document.getElementById("content"); docShellElement.docShell.viewMode = Components.interfaces.nsIDocShell.viewSource; | function viewSource(url){ if (!url) return false; // throw Components.results.NS_ERROR_FAILURE; try { createBrowserInstance(); if (appCore == null) { // Give up. window.close(); return false; } // Initialize browser instance.. appCore.setWebShellWindow(window); } catch(ex) { } var docShellElement = document.getElementById("content-frame"); var docShell = docShellElement.docShell; docShell.viewMode = Components.interfaces.nsIDocShell.viewSource; var webNav = docShell.QueryInterface(Components.interfaces.nsIWebNavigation); try { if (window.arguments && window.arguments[1]) { if (window.arguments[1].indexOf('charset=') != -1) { var arrayArgComponents = window.arguments[1].split('='); if (arrayArgComponents) { appCore.SetDocumentCharset(arrayArgComponents[1]); } } } } catch(ex) { } var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; webNav.loadURI(url, loadFlags); return true;} |
if (window.arguments && window.arguments[1]) { if (window.arguments[1].indexOf('charset=') != -1) { var arrayArgComponents = window.arguments[1].split('='); if (arrayArgComponents) { appCore.SetDocumentCharset(arrayArgComponents[1]); } } | if ("arguments" in window && window.arguments.length >= 2) { if (window.arguments[1].indexOf('charset=') != -1) { var arrayArgComponents = window.arguments[1].split('='); if (arrayArgComponents) { docShellElement.markupDocumentViewer.defaultCharacterSet = arrayArgComponents[1]; } | function viewSource(url){ if (!url) return false; // throw Components.results.NS_ERROR_FAILURE; try { createBrowserInstance(); if (appCore == null) { // Give up. window.close(); return false; } // Initialize browser instance.. appCore.setWebShellWindow(window); } catch(ex) { } var docShellElement = document.getElementById("content-frame"); var docShell = docShellElement.docShell; docShell.viewMode = Components.interfaces.nsIDocShell.viewSource; var webNav = docShell.QueryInterface(Components.interfaces.nsIWebNavigation); try { if (window.arguments && window.arguments[1]) { if (window.arguments[1].indexOf('charset=') != -1) { var arrayArgComponents = window.arguments[1].split('='); if (arrayArgComponents) { appCore.SetDocumentCharset(arrayArgComponents[1]); } } } } catch(ex) { } var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; webNav.loadURI(url, loadFlags); return true;} |
} catch(ex) { | } } catch(ex) { | function viewSource(url){ if (!url) return false; // throw Components.results.NS_ERROR_FAILURE; try { createBrowserInstance(); if (appCore == null) { // Give up. window.close(); return false; } // Initialize browser instance.. appCore.setWebShellWindow(window); } catch(ex) { } var docShellElement = document.getElementById("content-frame"); var docShell = docShellElement.docShell; docShell.viewMode = Components.interfaces.nsIDocShell.viewSource; var webNav = docShell.QueryInterface(Components.interfaces.nsIWebNavigation); try { if (window.arguments && window.arguments[1]) { if (window.arguments[1].indexOf('charset=') != -1) { var arrayArgComponents = window.arguments[1].split('='); if (arrayArgComponents) { appCore.SetDocumentCharset(arrayArgComponents[1]); } } } } catch(ex) { } var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; webNav.loadURI(url, loadFlags); return true;} |
webNav.loadURI(url, loadFlags); | docShellElement.webNavigation.loadURI(url, loadFlags); | function viewSource(url){ if (!url) return false; // throw Components.results.NS_ERROR_FAILURE; try { createBrowserInstance(); if (appCore == null) { // Give up. window.close(); return false; } // Initialize browser instance.. appCore.setWebShellWindow(window); } catch(ex) { } var docShellElement = document.getElementById("content-frame"); var docShell = docShellElement.docShell; docShell.viewMode = Components.interfaces.nsIDocShell.viewSource; var webNav = docShell.QueryInterface(Components.interfaces.nsIWebNavigation); try { if (window.arguments && window.arguments[1]) { if (window.arguments[1].indexOf('charset=') != -1) { var arrayArgComponents = window.arguments[1].split('='); if (arrayArgComponents) { appCore.SetDocumentCharset(arrayArgComponents[1]); } } } } catch(ex) { } var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; webNav.loadURI(url, loadFlags); return true;} |
var pageLoaderIface = Components.interfaces.nsIWebPageDescriptor; | function viewSource(url){ if (!url) return false; // throw Components.results.NS_ERROR_FAILURE; try { appCore = Components.classes["@mozilla.org/appshell/component/browser/instance;1"] .createInstance(Components.interfaces.nsIBrowserInstance); // Initialize browser instance.. appCore.setWebShellWindow(window); } catch(ex) { // Give up. window.close(); return false; } var loadFromURL = true; // // Parse the 'arguments' supplied with the dialog. // arg[0] - URL string. // arg[1] - Charset value in the form 'charset=xxx'. // arg[2] - Page descriptor used to load content from the cache. // if ("arguments" in window) { var arg; // // Set the charset of the viewsource window... // if (window.arguments.length >= 2) { arg = window.arguments[1]; try { if (typeof(arg) == "string" && arg.indexOf('charset=') != -1) { var arrayArgComponents = arg.split('='); if (arrayArgComponents) { //we should "inherit" the charset menu setting in a new window getMarkupDocumentViewer().defaultCharacterSet = arrayArgComponents[1]; } } } catch (ex) { // Ignore the failure and keep processing arguments... } } // // Use the page descriptor to load the content from the cache (if // available). // if (window.arguments.length >= 3) { arg = window.arguments[2]; try { if (typeof(arg) == "object" && arg != null) { var pageLoaderIface = Components.interfaces.nsIWebPageDescriptor; var PageLoader = getBrowser().webNavigation.QueryInterface(pageLoaderIface); // // Load the page using the page descriptor rather than the URL. // This allows the content to be fetched from the cache (if // possible) rather than the network... // PageLoader.LoadPage(arg, pageLoaderIface.DISPLAY_AS_SOURCE); // The content was successfully loaded from the page cookie. loadFromURL = false; } } catch(ex) { // Ignore the failure. The content will be loaded via the URL // that was supplied in arg[0]. } } } if (loadFromURL) { // // Currently, an exception is thrown if the URL load fails... // var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; var viewSrcUrl = "view-source:" + url; getBrowser().webNavigation.loadURI(viewSrcUrl, loadFlags, null, null, null); } //check the view_source.wrap_long_lines pref and set the menuitem's checked attribute accordingly if (gPrefs) { try { var wraplonglinesPrefValue = gPrefs.getBoolPref("view_source.wrap_long_lines"); if (wraplonglinesPrefValue) document.getElementById('menu_wrapLongLines').setAttribute("checked", "true"); } catch (ex) { } } window._content.focus(); return true;} |
|
try { document.getElementById("cmd_highlightSyntax").setAttribute("checked", gPrefs.getBoolPref("view_source.syntax_highlight")); } catch (ex) { } } else { document.getElementById("cmd_highlightSyntax").setAttribute("hidden", "true"); | function viewSource(url){ if (!url) return false; // throw Components.results.NS_ERROR_FAILURE; try { appCore = Components.classes["@mozilla.org/appshell/component/browser/instance;1"] .createInstance(Components.interfaces.nsIBrowserInstance); // Initialize browser instance.. appCore.setWebShellWindow(window); } catch(ex) { // Give up. window.close(); return false; } var loadFromURL = true; // // Parse the 'arguments' supplied with the dialog. // arg[0] - URL string. // arg[1] - Charset value in the form 'charset=xxx'. // arg[2] - Page descriptor used to load content from the cache. // if ("arguments" in window) { var arg; // // Set the charset of the viewsource window... // if (window.arguments.length >= 2) { arg = window.arguments[1]; try { if (typeof(arg) == "string" && arg.indexOf('charset=') != -1) { var arrayArgComponents = arg.split('='); if (arrayArgComponents) { //we should "inherit" the charset menu setting in a new window getMarkupDocumentViewer().defaultCharacterSet = arrayArgComponents[1]; } } } catch (ex) { // Ignore the failure and keep processing arguments... } } // // Use the page descriptor to load the content from the cache (if // available). // if (window.arguments.length >= 3) { arg = window.arguments[2]; try { if (typeof(arg) == "object" && arg != null) { var pageLoaderIface = Components.interfaces.nsIWebPageDescriptor; var PageLoader = getBrowser().webNavigation.QueryInterface(pageLoaderIface); // // Load the page using the page descriptor rather than the URL. // This allows the content to be fetched from the cache (if // possible) rather than the network... // PageLoader.LoadPage(arg, pageLoaderIface.DISPLAY_AS_SOURCE); // The content was successfully loaded from the page cookie. loadFromURL = false; } } catch(ex) { // Ignore the failure. The content will be loaded via the URL // that was supplied in arg[0]. } } } if (loadFromURL) { // // Currently, an exception is thrown if the URL load fails... // var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; var viewSrcUrl = "view-source:" + url; getBrowser().webNavigation.loadURI(viewSrcUrl, loadFlags, null, null, null); } //check the view_source.wrap_long_lines pref and set the menuitem's checked attribute accordingly if (gPrefs) { try { var wraplonglinesPrefValue = gPrefs.getBoolPref("view_source.wrap_long_lines"); if (wraplonglinesPrefValue) document.getElementById('menu_wrapLongLines').setAttribute("checked", "true"); } catch (ex) { } } window._content.focus(); return true;} |
|
try { if ("arguments" in window && window.arguments.length >= 2) { if (window.arguments[1].indexOf('charset=') != -1) { var arrayArgComponents = window.arguments[1].split('='); if (arrayArgComponents) { getMarkupDocumentViewer().defaultCharacterSet = arrayArgComponents[1]; } | var loadFromURL = true; if ("arguments" in window) { var arg; if (window.arguments.length >= 2) { arg = window.arguments[1]; try { if (typeof(arg) == "string" && arg.indexOf('charset=') != -1) { var arrayArgComponents = arg.split('='); if (arrayArgComponents) { getMarkupDocumentViewer().defaultCharacterSet = arrayArgComponents[1]; } } } catch (ex) { | function viewSource(url){ if (!url) return false; // throw Components.results.NS_ERROR_FAILURE; try { appCore = Components.classes["@mozilla.org/appshell/component/browser/instance;1"] .createInstance(Components.interfaces.nsIBrowserInstance); // Initialize browser instance.. appCore.setWebShellWindow(window); } catch(ex) { // Give up. window.close(); return false; } try { if ("arguments" in window && window.arguments.length >= 2) { if (window.arguments[1].indexOf('charset=') != -1) { var arrayArgComponents = window.arguments[1].split('='); if (arrayArgComponents) { //we should "inherit" the charset menu setting in a new window getMarkupDocumentViewer().defaultCharacterSet = arrayArgComponents[1]; } } } } catch(ex) { } var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; var viewSrcUrl = "view-source:" + url; getBrowser().webNavigation.loadURI(viewSrcUrl, loadFlags, null, null, null); //check the view_source.wrap_long_lines pref and set the menuitem's checked attribute accordingly if (gPrefs) { try { var wraplonglinesPrefValue = gPrefs.getBoolPref("view_source.wrap_long_lines"); if (wraplonglinesPrefValue) document.getElementById('menu_wrapLongLines').setAttribute("checked", "true"); } catch (ex) { } } window._content.focus(); return true;} |
} catch(ex) { | if (window.arguments.length >= 3) { arg = window.arguments[2]; try { if (typeof(arg) == "object" && arg != null) { var pageLoaderIface = Components.interfaces.nsIWebPageDescriptor; var PageLoader = getBrowser().webNavigation.QueryInterface(pageLoaderIface); PageLoader.LoadPage(arg, pageLoaderIface.DISPLAY_AS_SOURCE); loadFromURL = false; } } catch(ex) { } } | function viewSource(url){ if (!url) return false; // throw Components.results.NS_ERROR_FAILURE; try { appCore = Components.classes["@mozilla.org/appshell/component/browser/instance;1"] .createInstance(Components.interfaces.nsIBrowserInstance); // Initialize browser instance.. appCore.setWebShellWindow(window); } catch(ex) { // Give up. window.close(); return false; } try { if ("arguments" in window && window.arguments.length >= 2) { if (window.arguments[1].indexOf('charset=') != -1) { var arrayArgComponents = window.arguments[1].split('='); if (arrayArgComponents) { //we should "inherit" the charset menu setting in a new window getMarkupDocumentViewer().defaultCharacterSet = arrayArgComponents[1]; } } } } catch(ex) { } var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; var viewSrcUrl = "view-source:" + url; getBrowser().webNavigation.loadURI(viewSrcUrl, loadFlags, null, null, null); //check the view_source.wrap_long_lines pref and set the menuitem's checked attribute accordingly if (gPrefs) { try { var wraplonglinesPrefValue = gPrefs.getBoolPref("view_source.wrap_long_lines"); if (wraplonglinesPrefValue) document.getElementById('menu_wrapLongLines').setAttribute("checked", "true"); } catch (ex) { } } window._content.focus(); return true;} |
var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; var viewSrcUrl = "view-source:" + url; getBrowser().webNavigation.loadURI(viewSrcUrl, loadFlags, null, null, null); | if (loadFromURL) { var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; var viewSrcUrl = "view-source:" + url; getBrowser().webNavigation.loadURI(viewSrcUrl, loadFlags, null, null, null); } | function viewSource(url){ if (!url) return false; // throw Components.results.NS_ERROR_FAILURE; try { appCore = Components.classes["@mozilla.org/appshell/component/browser/instance;1"] .createInstance(Components.interfaces.nsIBrowserInstance); // Initialize browser instance.. appCore.setWebShellWindow(window); } catch(ex) { // Give up. window.close(); return false; } try { if ("arguments" in window && window.arguments.length >= 2) { if (window.arguments[1].indexOf('charset=') != -1) { var arrayArgComponents = window.arguments[1].split('='); if (arrayArgComponents) { //we should "inherit" the charset menu setting in a new window getMarkupDocumentViewer().defaultCharacterSet = arrayArgComponents[1]; } } } } catch(ex) { } var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; var viewSrcUrl = "view-source:" + url; getBrowser().webNavigation.loadURI(viewSrcUrl, loadFlags, null, null, null); //check the view_source.wrap_long_lines pref and set the menuitem's checked attribute accordingly if (gPrefs) { try { var wraplonglinesPrefValue = gPrefs.getBoolPref("view_source.wrap_long_lines"); if (wraplonglinesPrefValue) document.getElementById('menu_wrapLongLines').setAttribute("checked", "true"); } catch (ex) { } } window._content.focus(); return true;} |
var viewSourceBundle = document.getElementById('viewSourceBundle'); | var viewSourceBundle = getViewSourceBundle(); | function ViewSourceGoToLine(){ var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getService(Components.interfaces.nsIPromptService); var viewSourceBundle = document.getElementById('viewSourceBundle'); var input = {value:gLastLineFound}; for (;;) { var ok = promptService.prompt( window, viewSourceBundle.getString("goToLineTitle"), viewSourceBundle.getString("goToLineText"), input, null, {value:0}); if (!ok) return; var line = parseInt(input.value); if (!(line > 0)) { promptService.alert(window, viewSourceBundle.getString("invalidInputTitle"), viewSourceBundle.getString("invalidInputText")); continue; } var found = goToLine(line); if (found) { break; } promptService.alert(window, viewSourceBundle.getString("outOfRangeTitle"), viewSourceBundle.getString("outOfRangeText")); }} |
escape(windowId), "_blank", | encodeURIComponent(windowId), "_blank", | function vmgr_createwindow (windowId, cb){ var viewManager = this; function onWindowLoaded (window) { var cm = viewManager.commandManager; cm.installKeys (window.document, cm.commands); if (typeof cb == "function") cb(window); }; if (!ASSERT(!(windowId in this.windows), "window " + windowId + " already exists")) { return null; } var win = openDialog ("chrome://venkman/content/venkman-floater.xul?id=" + escape(windowId), "_blank", "chrome,menubar,toolbar,resizable,dialog=no", onWindowLoaded); this.windows[windowId] = win; return win;} |
containerId: (2 in ary) ? ary[2] : VMGR_DEFAULT_CONTAINER | containerId: arrayHasElementAt(ary, 2) ? ary[2] : VMGR_DEFAULT_CONTAINER | function vmgr_parselocation (locationURL){ var parseResult; var ary; if (locationURL.indexOf(VMGR_VURL_SCHEME) != 0) return null; ary = locationURL.substr(VMGR_SCHEME_LEN).match(/([^\/?]+)(?:\/([^\/?]+))?/); if (!ary) return null; parseResult = { url: locationURL, windowId: ary[1], containerId: (2 in ary) ? ary[2] : VMGR_DEFAULT_CONTAINER }; var rest = RegExp.rightContext.substr(1); ary = rest.match(/([^&]+)/); while (ary) { rest = RegExp.rightContext.substr(1); var assignment = ary[1]; ary = assignment.match(/(.+)=(.*)/); if (ASSERT(ary, "error parsing ``" + assignment + "'' from " + locationURL)) { /* only set the property the first time we see it */ if (2 in ary && !(ary[1] in parseResult)) parseResult[ary[1]] = ary[2]; } ary = rest.match(/([^&]+)/); } if (parseResult.windowId == VMGR_NEW) { var id = "floater-" + this.floaterSequence++; while (id in this.windows) id = "floater-" + this.floaterSequence++; parseResult.windowId = id; } //dd (dumpObjectTree(parseResult)); return parseResult;} |
if (2 in ary && !(ary[1] in parseResult)) | if (arrayHasElementAt(ary, 2) && !(ary[1] in parseResult)) | function vmgr_parselocation (locationURL){ var parseResult; var ary; if (locationURL.indexOf(VMGR_VURL_SCHEME) != 0) return null; ary = locationURL.substr(VMGR_SCHEME_LEN).match(/([^\/?]+)(?:\/([^\/?]+))?/); if (!ary) return null; parseResult = { url: locationURL, windowId: ary[1], containerId: (2 in ary) ? ary[2] : VMGR_DEFAULT_CONTAINER }; var rest = RegExp.rightContext.substr(1); ary = rest.match(/([^&]+)/); while (ary) { rest = RegExp.rightContext.substr(1); var assignment = ary[1]; ary = assignment.match(/(.+)=(.*)/); if (ASSERT(ary, "error parsing ``" + assignment + "'' from " + locationURL)) { /* only set the property the first time we see it */ if (2 in ary && !(ary[1] in parseResult)) parseResult[ary[1]] = ary[2]; } ary = rest.match(/([^&]+)/); } if (parseResult.windowId == VMGR_NEW) { var id = "floater-" + this.floaterSequence++; while (id in this.windows) id = "floater-" + this.floaterSequence++; parseResult.windowId = id; } //dd (dumpObjectTree(parseResult)); return parseResult;} |
var container = | container = | function vmrg_endmm(){ --this.multiMoveDepth; ASSERT(this.multiMoveDepth >= 0, "mismatched multi move calls: " + this.multiMoveDepth); if (!this.multiMoveDepth) { // close any empty windows that may have been left open during the // multi move. for (var w in this.windows) { if (w != VMGR_MAINWINDOW) { var window = this.windows[w]; var container = window.document.getElementById(VMGR_DEFAULT_CONTAINER); if (container && container.viewCount == 0) window.close(); } } // deal with any single child tab containers too for (var viewId in this.views) { var view = this.views[viewId]; if (view.currentContent) { var container = view.currentContent.parentNode; if (container.getAttribute("type") == "tab" && container.viewCount == 1) { var parentLocation = this.computeLocation(container); container.viewCount = 0; this.moveView(parentLocation, viewId); container.parentNode.removeChild(container); } } } }} |
if (view.currentContent) | if ("currentContent" in view && view.currentContent) | function vmrg_endmm(){ --this.multiMoveDepth; ASSERT(this.multiMoveDepth >= 0, "mismatched multi move calls: " + this.multiMoveDepth); if (!this.multiMoveDepth) { // close any empty windows that may have been left open during the // multi move. for (var w in this.windows) { if (w != VMGR_MAINWINDOW) { var window = this.windows[w]; var container = window.document.getElementById(VMGR_DEFAULT_CONTAINER); if (container && container.viewCount == 0) window.close(); } } // deal with any single child tab containers too for (var viewId in this.views) { var view = this.views[viewId]; if (view.currentContent) { var container = view.currentContent.parentNode; if (container.getAttribute("type") == "tab" && container.viewCount == 1) { var parentLocation = this.computeLocation(container); container.viewCount = 0; this.moveView(parentLocation, viewId); container.parentNode.removeChild(container); } } } }} |
var container = view.currentContent.parentNode; | container = view.currentContent.parentNode; | function vmrg_endmm(){ --this.multiMoveDepth; ASSERT(this.multiMoveDepth >= 0, "mismatched multi move calls: " + this.multiMoveDepth); if (!this.multiMoveDepth) { // close any empty windows that may have been left open during the // multi move. for (var w in this.windows) { if (w != VMGR_MAINWINDOW) { var window = this.windows[w]; var container = window.document.getElementById(VMGR_DEFAULT_CONTAINER); if (container && container.viewCount == 0) window.close(); } } // deal with any single child tab containers too for (var viewId in this.views) { var view = this.views[viewId]; if (view.currentContent) { var container = view.currentContent.parentNode; if (container.getAttribute("type") == "tab" && container.viewCount == 1) { var parentLocation = this.computeLocation(container); container.viewCount = 0; this.moveView(parentLocation, viewId); container.parentNode.removeChild(container); } } } }} |
this.isContainerOpen = false; | function vr_create(){ if (this.value.jsType != jsdIValue.TYPE_OBJECT) return; function vr_compare (a, b) { aType = a.value.jsType; bType = b.value.jsType; if (aType < bType) return -1; if (aType > bType) return 1; aVal = a.displayName; bVal = b.displayName; if (aVal < bVal) return -1; if (aVal > bVal) return 1; return 0; } this.childData = new Array(); var p = new Object(); this.value.getProperties (p, {}); this.lastPropertyCount = p.value.length; /* we'll end up with the 0 from the prototype */ delete this.hiddenFunctionCount; for (var i = 0; i < p.value.length; ++i) { var prop = p.value[i]; if (this.showFunctions || prop.value.jsType != jsdIValue.TYPE_FUNCTION) { this.childData.push(new ValueRecord(prop.value, prop.name.stringValue, formatFlags(prop.flags))); } else { ++this.hiddenFunctionCount; } } this.childData.sort (vr_compare); if (this.value.jsPrototype) this.childData.unshift (new ValueRecord(this.value.jsPrototype, MSG_VAL_PROTO)); if (this.value.jsParent) this.childData.unshift (new ValueRecord(this.value.jsParent, MSG_VAL_PARENT)); for (i = 0; i < this.childData.length; ++i) { var cd = this.childData[i]; cd.parentRecord = this; cd.childIndex = i; cd.isHidden = false; }} |
|
const kTxMgrProgID = "component: | const kTxMgrContractID = "@mozilla.org/transaction/manager;1"; | function vxVFDTransactionManager() { const kTxMgrProgID = "component://netscape/transaction/manager"; const kTxMgrIID = "nsITransactionManager"; this.mTxMgr = nsJSComponentManager.getService(kTxMgrProgID, kTxMgrIID);} |
this.mTxMgr = nsJSComponentManager.getService(kTxMgrProgID, kTxMgrIID); | this.mTxMgr = nsJSComponentManager.getService(kTxMgrContractID, kTxMgrIID); | function vxVFDTransactionManager() { const kTxMgrProgID = "component://netscape/transaction/manager"; const kTxMgrIID = "nsITransactionManager"; this.mTxMgr = nsJSComponentManager.getService(kTxMgrProgID, kTxMgrIID);} |
} catch(e) {} | function WaitFinishLoadingDocument(msgType){ if (documentLoaded) { //If we are in plain text, we nee to set the wrap column if (! msgCompose.composeHTML) try { window.editorShell.wrapColumn = msgCompose.wrapLength; } catch (e) { dump("### window.editorShell.wrapColumn exception text: " + e + " - failed\n"); } CompFields2Recipients(msgCompose.compFields, msgType); SetComposeWindowTitle(13); AdjustFocus(); window.updateCommands("create"); } else setTimeout("WaitFinishLoadingDocument(" + msgType + ");", 200);} |
|
var msgNavigationService = Components.classes['component: | var msgNavigationService = Components.classes['@mozilla.org/messenger/msgviewnavigationservice;1'].getService(); | function WaitUntilDocumentIsLoaded(){ // FIX ME - we should really have this function available in a global place that does not // require that we have access to mailnews code (msgNavigationService) from address book. var msgNavigationService = Components.classes['component://netscape/messenger/msgviewnavigationservice'].getService(); msgNavigationService= msgNavigationService.QueryInterface(Components.interfaces.nsIMsgViewNavigationService); msgNavigationService.EnsureDocumentIsLoaded(document);} |
wallet = Components.classes['component: | wallet = Components.classes['@mozilla.org/wallet/wallet-service;1']; | function WalletAction( action ) { var strings = document.getElementById("personalManagers"); if (action == "password" || action == "expire" || action == "clear") { wallet = Components.classes['component://netscape/wallet/wallet-service']; wallet = wallet.getService(); wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService); if (action == "password") { if (!wallet.WALLET_ChangePassword()) { window.alert(strings.getAttribute("PasswordNotChanged")); } } else if (action == "expire") { if (wallet.WALLET_ExpirePassword()) { window.alert(strings.getAttribute("PasswordExpired")); } else { window.alert(strings.getAttribute("PasswordNotExpired")); } } else if (action == "clear") { if (window.confirm(strings.getAttribute("AllDataWillBeCleared"))) { wallet.WALLET_DeleteAll(); } } return; } if (action == "encrypt" || action == "obscure") { wallet = Components.classes['component://netscape/wallet/wallet-service']; wallet = wallet.getService(); wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService); wallet.WALLET_InitReencryptCallback(window._content); if (action == "encrypt") { this.pref.SetBoolPref("wallet.crypto", true); } else if (action == "obscure") { this.pref.SetBoolPref("wallet.crypto", false); } return; } if (action == "cookieAllow" || action == "cookieBlock" || action == "imageAllow" || action == "imageBlock") { var cookieViewer = Components.classes["component://netscape/cookieviewer/cookieviewer-world"] .createInstance(Components.interfaces["nsICookieViewer"]); COOKIEPERMISSION = 0; IMAGEPERMISSION = 1; var element; if (action == "cookieAllow") { cookieViewer.AddPermission(window._content, true, COOKIEPERMISSION); element = document.getElementById("AllowCookies"); alert(element.getAttribute("msg")); } else if (action == "cookieBlock") { cookieViewer.AddPermission(window._content, false, COOKIEPERMISSION); element = document.getElementById("BlockCookies"); alert(element.getAttribute("msg")); } else if (action == "imageAllow") { cookieViewer.AddPermission(window._content, true, IMAGEPERMISSION); element = document.getElementById("AllowImages"); alert(element.getAttribute("msg")); } else if (action == "imageBlock") { cookieViewer.AddPermission(window._content, false, IMAGEPERMISSION); element = document.getElementById("BlockImages"); alert(element.getAttribute("msg")); } return; } if( appCore ) { switch( action ) { case "safefill": appCore.walletPreview(window, window._content); break;// case "password":// appCore.walletChangePassword();// break; case "quickfill": appCore.walletQuickFillin(window._content); break; case "capture": default: status = appCore.walletRequestToCapture(window._content); break; } }} |
Components.classes["component: | Components.classes["@mozilla.org/cookieviewer/cookieviewer-world;1"] | function WalletAction( action ) { var strings = document.getElementById("personalManagers"); if (action == "password" || action == "expire" || action == "clear") { wallet = Components.classes['component://netscape/wallet/wallet-service']; wallet = wallet.getService(); wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService); if (action == "password") { if (!wallet.WALLET_ChangePassword()) { window.alert(strings.getAttribute("PasswordNotChanged")); } } else if (action == "expire") { if (wallet.WALLET_ExpirePassword()) { window.alert(strings.getAttribute("PasswordExpired")); } else { window.alert(strings.getAttribute("PasswordNotExpired")); } } else if (action == "clear") { if (window.confirm(strings.getAttribute("AllDataWillBeCleared"))) { wallet.WALLET_DeleteAll(); } } return; } if (action == "encrypt" || action == "obscure") { wallet = Components.classes['component://netscape/wallet/wallet-service']; wallet = wallet.getService(); wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService); wallet.WALLET_InitReencryptCallback(window._content); if (action == "encrypt") { this.pref.SetBoolPref("wallet.crypto", true); } else if (action == "obscure") { this.pref.SetBoolPref("wallet.crypto", false); } return; } if (action == "cookieAllow" || action == "cookieBlock" || action == "imageAllow" || action == "imageBlock") { var cookieViewer = Components.classes["component://netscape/cookieviewer/cookieviewer-world"] .createInstance(Components.interfaces["nsICookieViewer"]); COOKIEPERMISSION = 0; IMAGEPERMISSION = 1; var element; if (action == "cookieAllow") { cookieViewer.AddPermission(window._content, true, COOKIEPERMISSION); element = document.getElementById("AllowCookies"); alert(element.getAttribute("msg")); } else if (action == "cookieBlock") { cookieViewer.AddPermission(window._content, false, COOKIEPERMISSION); element = document.getElementById("BlockCookies"); alert(element.getAttribute("msg")); } else if (action == "imageAllow") { cookieViewer.AddPermission(window._content, true, IMAGEPERMISSION); element = document.getElementById("AllowImages"); alert(element.getAttribute("msg")); } else if (action == "imageBlock") { cookieViewer.AddPermission(window._content, false, IMAGEPERMISSION); element = document.getElementById("BlockImages"); alert(element.getAttribute("msg")); } return; } if( appCore ) { switch( action ) { case "safefill": appCore.walletPreview(window, window._content); break;// case "password":// appCore.walletChangePassword();// break; case "quickfill": appCore.walletQuickFillin(window._content); break; case "capture": default: status = appCore.walletRequestToCapture(window._content); break; } }} |
cookieViewer.AddPermission(window.content, true, COOKIEPERMISSION); | cookieViewer.AddPermission(window._content, true, COOKIEPERMISSION); | function WalletAction( action ) { if (action == "password" || action == "expire" || action == "clear") { wallet = Components.classes['component://netscape/wallet/wallet-service']; wallet = wallet.getService(); wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService); if (action == "password") { wallet.WALLET_ChangePassword(); } else if (action == "expire") { wallet.WALLET_ExpirePassword(); } else if (action == "clear") { wallet.WALLET_DeleteAll(); } return; } if (action == "encrypt" || action == "obscure") { if (action == "encrypt") { this.pref.SetBoolPref("wallet.crypto", true); } else if (action == "obscure") { this.pref.SetBoolPref("wallet.crypto", false); } return; } if (action == "cookieAllow" || action == "cookieBlock" || action == "imageAllow" || action == "imageBlock") { var cookieViewer = Components.classes["component://netscape/cookieviewer/cookieviewer-world"] .createInstance(Components.interfaces["nsICookieViewer"]); COOKIEPERMISSION = 0; IMAGEPERMISSION = 1; var element; if (action == "cookieAllow") { cookieViewer.AddPermission(window.content, true, COOKIEPERMISSION); element = document.getElementById("AllowCookies"); alert(element.getAttribute("msg")); } else if (action == "cookieBlock") { cookieViewer.AddPermission(window.content, false, COOKIEPERMISSION); element = document.getElementById("BlockCookies"); alert(element.getAttribute("msg")); } else if (action == "imageAllow") { cookieViewer.AddPermission(window.content, true, IMAGEPERMISSION); element = document.getElementById("AllowImages"); alert(element.getAttribute("msg")); } else if (action == "imageBlock") { cookieViewer.AddPermission(window.content, false, IMAGEPERMISSION); element = document.getElementById("BlockImages"); alert(element.getAttribute("msg")); } return; } if( appCore ) { switch( action ) { case "safefill": appCore.walletPreview(window, window.content); break;// case "password":// appCore.walletChangePassword();// break; case "quickfill": appCore.walletQuickFillin(window.content); break; case "capture": default: appCore.walletRequestToCapture(window.content); break; } }} |
cookieViewer.AddPermission(window.content, false, COOKIEPERMISSION); | cookieViewer.AddPermission(window._content, false, COOKIEPERMISSION); | function WalletAction( action ) { if (action == "password" || action == "expire" || action == "clear") { wallet = Components.classes['component://netscape/wallet/wallet-service']; wallet = wallet.getService(); wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService); if (action == "password") { wallet.WALLET_ChangePassword(); } else if (action == "expire") { wallet.WALLET_ExpirePassword(); } else if (action == "clear") { wallet.WALLET_DeleteAll(); } return; } if (action == "encrypt" || action == "obscure") { if (action == "encrypt") { this.pref.SetBoolPref("wallet.crypto", true); } else if (action == "obscure") { this.pref.SetBoolPref("wallet.crypto", false); } return; } if (action == "cookieAllow" || action == "cookieBlock" || action == "imageAllow" || action == "imageBlock") { var cookieViewer = Components.classes["component://netscape/cookieviewer/cookieviewer-world"] .createInstance(Components.interfaces["nsICookieViewer"]); COOKIEPERMISSION = 0; IMAGEPERMISSION = 1; var element; if (action == "cookieAllow") { cookieViewer.AddPermission(window.content, true, COOKIEPERMISSION); element = document.getElementById("AllowCookies"); alert(element.getAttribute("msg")); } else if (action == "cookieBlock") { cookieViewer.AddPermission(window.content, false, COOKIEPERMISSION); element = document.getElementById("BlockCookies"); alert(element.getAttribute("msg")); } else if (action == "imageAllow") { cookieViewer.AddPermission(window.content, true, IMAGEPERMISSION); element = document.getElementById("AllowImages"); alert(element.getAttribute("msg")); } else if (action == "imageBlock") { cookieViewer.AddPermission(window.content, false, IMAGEPERMISSION); element = document.getElementById("BlockImages"); alert(element.getAttribute("msg")); } return; } if( appCore ) { switch( action ) { case "safefill": appCore.walletPreview(window, window.content); break;// case "password":// appCore.walletChangePassword();// break; case "quickfill": appCore.walletQuickFillin(window.content); break; case "capture": default: appCore.walletRequestToCapture(window.content); break; } }} |
cookieViewer.AddPermission(window.content, true, IMAGEPERMISSION); | cookieViewer.AddPermission(window._content, true, IMAGEPERMISSION); | function WalletAction( action ) { if (action == "password" || action == "expire" || action == "clear") { wallet = Components.classes['component://netscape/wallet/wallet-service']; wallet = wallet.getService(); wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService); if (action == "password") { wallet.WALLET_ChangePassword(); } else if (action == "expire") { wallet.WALLET_ExpirePassword(); } else if (action == "clear") { wallet.WALLET_DeleteAll(); } return; } if (action == "encrypt" || action == "obscure") { if (action == "encrypt") { this.pref.SetBoolPref("wallet.crypto", true); } else if (action == "obscure") { this.pref.SetBoolPref("wallet.crypto", false); } return; } if (action == "cookieAllow" || action == "cookieBlock" || action == "imageAllow" || action == "imageBlock") { var cookieViewer = Components.classes["component://netscape/cookieviewer/cookieviewer-world"] .createInstance(Components.interfaces["nsICookieViewer"]); COOKIEPERMISSION = 0; IMAGEPERMISSION = 1; var element; if (action == "cookieAllow") { cookieViewer.AddPermission(window.content, true, COOKIEPERMISSION); element = document.getElementById("AllowCookies"); alert(element.getAttribute("msg")); } else if (action == "cookieBlock") { cookieViewer.AddPermission(window.content, false, COOKIEPERMISSION); element = document.getElementById("BlockCookies"); alert(element.getAttribute("msg")); } else if (action == "imageAllow") { cookieViewer.AddPermission(window.content, true, IMAGEPERMISSION); element = document.getElementById("AllowImages"); alert(element.getAttribute("msg")); } else if (action == "imageBlock") { cookieViewer.AddPermission(window.content, false, IMAGEPERMISSION); element = document.getElementById("BlockImages"); alert(element.getAttribute("msg")); } return; } if( appCore ) { switch( action ) { case "safefill": appCore.walletPreview(window, window.content); break;// case "password":// appCore.walletChangePassword();// break; case "quickfill": appCore.walletQuickFillin(window.content); break; case "capture": default: appCore.walletRequestToCapture(window.content); break; } }} |
cookieViewer.AddPermission(window.content, false, IMAGEPERMISSION); | cookieViewer.AddPermission(window._content, false, IMAGEPERMISSION); | function WalletAction( action ) { if (action == "password" || action == "expire" || action == "clear") { wallet = Components.classes['component://netscape/wallet/wallet-service']; wallet = wallet.getService(); wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService); if (action == "password") { wallet.WALLET_ChangePassword(); } else if (action == "expire") { wallet.WALLET_ExpirePassword(); } else if (action == "clear") { wallet.WALLET_DeleteAll(); } return; } if (action == "encrypt" || action == "obscure") { if (action == "encrypt") { this.pref.SetBoolPref("wallet.crypto", true); } else if (action == "obscure") { this.pref.SetBoolPref("wallet.crypto", false); } return; } if (action == "cookieAllow" || action == "cookieBlock" || action == "imageAllow" || action == "imageBlock") { var cookieViewer = Components.classes["component://netscape/cookieviewer/cookieviewer-world"] .createInstance(Components.interfaces["nsICookieViewer"]); COOKIEPERMISSION = 0; IMAGEPERMISSION = 1; var element; if (action == "cookieAllow") { cookieViewer.AddPermission(window.content, true, COOKIEPERMISSION); element = document.getElementById("AllowCookies"); alert(element.getAttribute("msg")); } else if (action == "cookieBlock") { cookieViewer.AddPermission(window.content, false, COOKIEPERMISSION); element = document.getElementById("BlockCookies"); alert(element.getAttribute("msg")); } else if (action == "imageAllow") { cookieViewer.AddPermission(window.content, true, IMAGEPERMISSION); element = document.getElementById("AllowImages"); alert(element.getAttribute("msg")); } else if (action == "imageBlock") { cookieViewer.AddPermission(window.content, false, IMAGEPERMISSION); element = document.getElementById("BlockImages"); alert(element.getAttribute("msg")); } return; } if( appCore ) { switch( action ) { case "safefill": appCore.walletPreview(window, window.content); break;// case "password":// appCore.walletChangePassword();// break; case "quickfill": appCore.walletQuickFillin(window.content); break; case "capture": default: appCore.walletRequestToCapture(window.content); break; } }} |
appCore.walletPreview(window, window.content); | appCore.walletPreview(window, window._content); | function WalletAction( action ) { if (action == "password" || action == "expire" || action == "clear") { wallet = Components.classes['component://netscape/wallet/wallet-service']; wallet = wallet.getService(); wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService); if (action == "password") { wallet.WALLET_ChangePassword(); } else if (action == "expire") { wallet.WALLET_ExpirePassword(); } else if (action == "clear") { wallet.WALLET_DeleteAll(); } return; } if (action == "encrypt" || action == "obscure") { if (action == "encrypt") { this.pref.SetBoolPref("wallet.crypto", true); } else if (action == "obscure") { this.pref.SetBoolPref("wallet.crypto", false); } return; } if (action == "cookieAllow" || action == "cookieBlock" || action == "imageAllow" || action == "imageBlock") { var cookieViewer = Components.classes["component://netscape/cookieviewer/cookieviewer-world"] .createInstance(Components.interfaces["nsICookieViewer"]); COOKIEPERMISSION = 0; IMAGEPERMISSION = 1; var element; if (action == "cookieAllow") { cookieViewer.AddPermission(window.content, true, COOKIEPERMISSION); element = document.getElementById("AllowCookies"); alert(element.getAttribute("msg")); } else if (action == "cookieBlock") { cookieViewer.AddPermission(window.content, false, COOKIEPERMISSION); element = document.getElementById("BlockCookies"); alert(element.getAttribute("msg")); } else if (action == "imageAllow") { cookieViewer.AddPermission(window.content, true, IMAGEPERMISSION); element = document.getElementById("AllowImages"); alert(element.getAttribute("msg")); } else if (action == "imageBlock") { cookieViewer.AddPermission(window.content, false, IMAGEPERMISSION); element = document.getElementById("BlockImages"); alert(element.getAttribute("msg")); } return; } if( appCore ) { switch( action ) { case "safefill": appCore.walletPreview(window, window.content); break;// case "password":// appCore.walletChangePassword();// break; case "quickfill": appCore.walletQuickFillin(window.content); break; case "capture": default: appCore.walletRequestToCapture(window.content); break; } }} |
appCore.walletQuickFillin(window.content); | appCore.walletQuickFillin(window._content); | function WalletAction( action ) { if (action == "password" || action == "expire" || action == "clear") { wallet = Components.classes['component://netscape/wallet/wallet-service']; wallet = wallet.getService(); wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService); if (action == "password") { wallet.WALLET_ChangePassword(); } else if (action == "expire") { wallet.WALLET_ExpirePassword(); } else if (action == "clear") { wallet.WALLET_DeleteAll(); } return; } if (action == "encrypt" || action == "obscure") { if (action == "encrypt") { this.pref.SetBoolPref("wallet.crypto", true); } else if (action == "obscure") { this.pref.SetBoolPref("wallet.crypto", false); } return; } if (action == "cookieAllow" || action == "cookieBlock" || action == "imageAllow" || action == "imageBlock") { var cookieViewer = Components.classes["component://netscape/cookieviewer/cookieviewer-world"] .createInstance(Components.interfaces["nsICookieViewer"]); COOKIEPERMISSION = 0; IMAGEPERMISSION = 1; var element; if (action == "cookieAllow") { cookieViewer.AddPermission(window.content, true, COOKIEPERMISSION); element = document.getElementById("AllowCookies"); alert(element.getAttribute("msg")); } else if (action == "cookieBlock") { cookieViewer.AddPermission(window.content, false, COOKIEPERMISSION); element = document.getElementById("BlockCookies"); alert(element.getAttribute("msg")); } else if (action == "imageAllow") { cookieViewer.AddPermission(window.content, true, IMAGEPERMISSION); element = document.getElementById("AllowImages"); alert(element.getAttribute("msg")); } else if (action == "imageBlock") { cookieViewer.AddPermission(window.content, false, IMAGEPERMISSION); element = document.getElementById("BlockImages"); alert(element.getAttribute("msg")); } return; } if( appCore ) { switch( action ) { case "safefill": appCore.walletPreview(window, window.content); break;// case "password":// appCore.walletChangePassword();// break; case "quickfill": appCore.walletQuickFillin(window.content); break; case "capture": default: appCore.walletRequestToCapture(window.content); break; } }} |
appCore.walletRequestToCapture(window.content); | appCore.walletRequestToCapture(window._content); | function WalletAction( action ) { if (action == "password" || action == "expire" || action == "clear") { wallet = Components.classes['component://netscape/wallet/wallet-service']; wallet = wallet.getService(); wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService); if (action == "password") { wallet.WALLET_ChangePassword(); } else if (action == "expire") { wallet.WALLET_ExpirePassword(); } else if (action == "clear") { wallet.WALLET_DeleteAll(); } return; } if (action == "encrypt" || action == "obscure") { if (action == "encrypt") { this.pref.SetBoolPref("wallet.crypto", true); } else if (action == "obscure") { this.pref.SetBoolPref("wallet.crypto", false); } return; } if (action == "cookieAllow" || action == "cookieBlock" || action == "imageAllow" || action == "imageBlock") { var cookieViewer = Components.classes["component://netscape/cookieviewer/cookieviewer-world"] .createInstance(Components.interfaces["nsICookieViewer"]); COOKIEPERMISSION = 0; IMAGEPERMISSION = 1; var element; if (action == "cookieAllow") { cookieViewer.AddPermission(window.content, true, COOKIEPERMISSION); element = document.getElementById("AllowCookies"); alert(element.getAttribute("msg")); } else if (action == "cookieBlock") { cookieViewer.AddPermission(window.content, false, COOKIEPERMISSION); element = document.getElementById("BlockCookies"); alert(element.getAttribute("msg")); } else if (action == "imageAllow") { cookieViewer.AddPermission(window.content, true, IMAGEPERMISSION); element = document.getElementById("AllowImages"); alert(element.getAttribute("msg")); } else if (action == "imageBlock") { cookieViewer.AddPermission(window.content, false, IMAGEPERMISSION); element = document.getElementById("BlockImages"); alert(element.getAttribute("msg")); } return; } if( appCore ) { switch( action ) { case "safefill": appCore.walletPreview(window, window.content); break;// case "password":// appCore.walletChangePassword();// break; case "quickfill": appCore.walletQuickFillin(window.content); break; case "capture": default: appCore.walletRequestToCapture(window.content); break; } }} |
var strings = document.getElementById("strings"); | var strings = document.getElementById("personalManagers"); | function WalletAction( action ) { var strings = document.getElementById("strings"); if (action == "password" || action == "expire" || action == "clear") { wallet = Components.classes['component://netscape/wallet/wallet-service']; wallet = wallet.getService(); wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService); if (action == "password") { if (!wallet.WALLET_ChangePassword()) { window.alert(strings.getAttribute("PasswordNotChanged")); } } else if (action == "expire") { if (wallet.WALLET_ExpirePassword()) { window.alert(strings.getAttribute("PasswordExpired")); } else { window.alert(strings.getAttribute("PasswordNotExpired")); } } else if (action == "clear") { if (window.confirm(strings.getAttribute("AllDataWillBeCleared"))) { wallet.WALLET_DeleteAll(); } } return; } if (action == "encrypt" || action == "obscure") { if (action == "encrypt") { this.pref.SetBoolPref("wallet.crypto", true); } else if (action == "obscure") { this.pref.SetBoolPref("wallet.crypto", false); } return; } if (action == "cookieAllow" || action == "cookieBlock" || action == "imageAllow" || action == "imageBlock") { var cookieViewer = Components.classes["component://netscape/cookieviewer/cookieviewer-world"] .createInstance(Components.interfaces["nsICookieViewer"]); COOKIEPERMISSION = 0; IMAGEPERMISSION = 1; var element; if (action == "cookieAllow") { cookieViewer.AddPermission(window._content, true, COOKIEPERMISSION); element = document.getElementById("AllowCookies"); alert(element.getAttribute("msg")); } else if (action == "cookieBlock") { cookieViewer.AddPermission(window._content, false, COOKIEPERMISSION); element = document.getElementById("BlockCookies"); alert(element.getAttribute("msg")); } else if (action == "imageAllow") { cookieViewer.AddPermission(window._content, true, IMAGEPERMISSION); element = document.getElementById("AllowImages"); alert(element.getAttribute("msg")); } else if (action == "imageBlock") { cookieViewer.AddPermission(window._content, false, IMAGEPERMISSION); element = document.getElementById("BlockImages"); alert(element.getAttribute("msg")); } return; } if( appCore ) { switch( action ) { case "safefill": if (appCore.walletPreview(window, window._content)) { window.alert(strings.getAttribute("noPrefills")); } break;// case "password":// appCore.walletChangePassword();// break; case "quickfill": if (appCore.walletQuickFillin(window._content)) { window.alert(strings.getAttribute("noPrefills")); } break; case "capture": default: status = appCore.walletRequestToCapture(window._content); if (status == -1) { /* UnableToCapture */ window.alert(strings.getAttribute("UnableToCapture")); } else if (status == 0) { /* Captured */ window.alert(strings.getAttribute("Captured")); } else if (status == +1) { /* NotCaptured */ window.alert(strings.getAttribute("NotCaptured")); } break; } }} |
"_blank","chrome,resizable=no","W"); | "_blank","chrome,resizable","W"); | function WalletDialog(which) { switch( which ) { case "walletsites": window.openDialog("chrome://communicator/content/wallet/SignonViewer.xul", "_blank","chrome,resizable=no","W"); break; case "wallet": default: formShow(); break; } } |
window.content.location.href= 'http: | window._content.location.href= 'http: | function WalletDialog( which ){ switch( which ) { case "signon": window.openDialog("chrome://communicator/content/wallet/SignonViewer.xul","SSViewer","modal=yes,chrome,resizable=no"); break; case "cookie": this.pref.SetBoolPref("cookieviewer.cookieTab", true); window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul","CookieViewer","modal=yes,chrome,resizable=no"); break; case "image": this.pref.SetBoolPref("cookieviewer.cookieTab", false); window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul","CookieViewer","modal=yes,chrome,resizable=no"); break; case "samples": window.content.location.href= 'http://www.mozilla.org/wallet/samples/'; break; case "interview": window.content.location.href= 'http://www.mozilla.org/wallet/samples/INTERVIEW.HTML'; break; case "wallet": default: window.openDialog("chrome://communicator/content/wallet/WalletEditor.xul","walletEditor","modal=yes,chrome,resizable=no"); break; }} |
server = this.pref.getLocalizedUnicharPref("wallet.Samples"); window._content.location.href = server + 'wallet2.html'; | window._content.location.href = 'chrome: | function WalletDialog( which ){ switch( which ) { case "signon": window.openDialog("chrome://communicator/content/wallet/SignonViewer.xul","SSViewer","modal=yes,chrome,resizable=no","S"); break; case "cookie": window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul","CookieViewer","modal=yes,chrome,resizable=no",0); break; case "image": window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul","CookieViewer","modal=yes,chrome,resizable=no",2); break; case "samples": server = this.pref.getLocalizedUnicharPref("wallet.Samples"); window._content.location.href = server + 'wallet2.html'; break; case "interview": window._content.location.href = 'chrome://communicator/content/wallet/interview.html'; break; case "walletsites": window.openDialog("chrome://communicator/content/wallet/SignonViewer.xul","SSViewer","modal=yes,chrome,resizable=no","W"); break; case "tutorial": server = this.pref.getLocalizedUnicharPref("wallet.Samples"); window._content.location.href = 'http://www.mozilla.org/wallet/samples/privacy.html';// window._content.location.href = server + 'privacy.html'; break; case "wallet": default: window.openDialog("chrome://communicator/content/wallet/WalletEditor.xul","walletEditor","modal=yes,chrome,resizable=no"); break; }} |
server = this.pref.getLocalizedUnicharPref("wallet.Samples"); window._content.location.href = 'http: | window._content.location.href = 'chrome: | function WalletDialog( which ){ switch( which ) { case "signon": window.openDialog("chrome://communicator/content/wallet/SignonViewer.xul","SSViewer","modal=yes,chrome,resizable=no","S"); break; case "cookie": window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul","CookieViewer","modal=yes,chrome,resizable=no",0); break; case "image": window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul","CookieViewer","modal=yes,chrome,resizable=no",2); break; case "samples": server = this.pref.getLocalizedUnicharPref("wallet.Samples"); window._content.location.href = server + 'wallet2.html'; break; case "interview": window._content.location.href = 'chrome://communicator/content/wallet/interview.html'; break; case "walletsites": window.openDialog("chrome://communicator/content/wallet/SignonViewer.xul","SSViewer","modal=yes,chrome,resizable=no","W"); break; case "tutorial": server = this.pref.getLocalizedUnicharPref("wallet.Samples"); window._content.location.href = 'http://www.mozilla.org/wallet/samples/privacy.html';// window._content.location.href = server + 'privacy.html'; break; case "wallet": default: window.openDialog("chrome://communicator/content/wallet/WalletEditor.xul","walletEditor","modal=yes,chrome,resizable=no"); break; }} |
alert(msg2); | if (!SimileAjax.Debug.silent) { alert(msg2); } | SimileAjax.Debug.warn = function(msg) { var f; if ("console" in window && "warn" in window.console) { // FireBug installed f = function(msg2) { console.warn(msg2); } } else { f = function(msg2) { alert(msg2); } } SimileAjax.Debug.warn = f; f(msg);}; |
calendar = createCalendar(); | var calendar = createCalendar(); | function WeekView( calendarWindow ){ this.superConstructor( calendarWindow ); //set the time on the left hand side labels //need to do this in JavaScript to preserve formatting for (var i = 0; i < 24; i++) { var TimeToFormat = new Date(); TimeToFormat.setHours( i ); TimeToFormat.setMinutes( "0" ); var FormattedTime = calendarWindow.dateFormater.getFormatedTime( TimeToFormat ); var Label = document.getElementById( "week-view-hour-" + i ); Label.setAttribute( "value", FormattedTime ); } // get week view header items gHeaderDateItemArray = new Array(); for (var dayIndex = 1; dayIndex <= 7; ++dayIndex) { var headerDateItem = document.getElementById( "week-header-date-" + dayIndex ); gHeaderDateItemArray[ dayIndex ] = headerDateItem; } var weekViewEventSelectionObserver = { onSelectionChanged: function( EventSelectionArray ) { if( EventSelectionArray.length > 0 ) { //for some reason, this function causes the tree to go into a select / unselect loop //putting it in a settimeout fixes this. setTimeout( "gCalendarWindow.weekView.clearSelectedDate();", 1 ); var i = 0; for( i = 0; i < EventSelectionArray.length; i++ ) { gCalendarWindow.weekView.selectBoxForEvent( EventSelectionArray[i] ); } } else { //select the proper day gCalendarWindow.weekView.hiliteSelectedDate(); } } } calendarWindow.EventSelection.addObserver( weekViewEventSelectionObserver ); var savedThis = this; var calendarObserver = { onStartBatch: function() { }, onEndBatch: function() { }, onLoad: function() { }, onAddItem: function(aItem) { savedThis.refreshEvents(); }, onModifyItem: function(aNewItem, aOldItem) { savedThis.refreshEvents(); }, onDeleteItem: function(aDeletedItem) { savedThis.refreshEvents(); }, onAlarm: function(aAlarmItem) {}, onError: function(aErrNo, aMessage) { } } calendar = createCalendar(); calendar.addObserver(calendarObserver, calendar.ITEM_FILTER_TYPE_ALL);} |
var searchInput = GetSearchInput(); | function WhichPaneHasFocus(){ var threadTree = GetThreadTree(); var searchInput = GetSearchInput(); var folderTree = GetFolderTree(); var messagePane = GetMessagePane(); if (top.document.commandDispatcher.focusedWindow == GetMessagePaneFrame()) return messagePane; var currentNode = top.document.commandDispatcher.focusedElement; while (currentNode) { if (currentNode === threadTree || currentNode === searchInput || currentNode === folderTree || currentNode === messagePane) return currentNode; currentNode = currentNode.parentNode; } return null;} |
|
currentNode === searchInput || | function WhichPaneHasFocus(){ var threadTree = GetThreadTree(); var searchInput = GetSearchInput(); var folderTree = GetFolderTree(); var messagePane = GetMessagePane(); if (top.document.commandDispatcher.focusedWindow == GetMessagePaneFrame()) return messagePane; var currentNode = top.document.commandDispatcher.focusedElement; while (currentNode) { if (currentNode === threadTree || currentNode === searchInput || currentNode === folderTree || currentNode === messagePane) return currentNode; currentNode = currentNode.parentNode; } return null;} |
|
$.fn.width = function() { | jQuery.fn.width = function() { | $.fn.width = function() { if ( this.get(0) == window ) return self.innerWidth || jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth; if ( this.get(0) == document ) return Math.max( document.body.scrollWidth, document.body.offsetWidth ); return this.css("width");}; |
return this.css("width"); | return this.css("width", arguments[0]); | jQuery.fn.width = function() { if ( this.get(0) == window ) return self.innerWidth || jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth; if ( this.get(0) == document ) return Math.max( document.body.scrollWidth, document.body.offsetWidth ); return this.css("width");}; |
document.commandDispatcher.focusedWindow = window; if (element instanceof Components.interfaces.nsIDOMElement) | if (element instanceof Components.interfaces.nsIDOMWindow) { document.commandDispatcher.focusedWindow = element; document.commandDispatcher.focusedElement = null; } else if (element instanceof Components.interfaces.nsIDOMElement) { document.commandDispatcher.focusedWindow = element.ownerDocument.defaultView; | function WindowFocusTimerCallback(element){ // This fuction is a redo of the fix for jag bug 91884 var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher); if (window == ww.activeWindow) { element.focus(); } else { // set the element in command dispatcher so focus will restore properly // when the window does become active document.commandDispatcher.focusedWindow = window; if (element instanceof Components.interfaces.nsIDOMElement) document.commandDispatcher.focusedElement = element; }} |
} | function WindowFocusTimerCallback(element){ // This fuction is a redo of the fix for jag bug 91884 var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher); if (window == ww.activeWindow) { element.focus(); } else { // set the element in command dispatcher so focus will restore properly // when the window does become active document.commandDispatcher.focusedWindow = window; if (element instanceof Components.interfaces.nsIDOMElement) document.commandDispatcher.focusedElement = element; }} |
|
var cn = browser.mTabContainer.childNodes; | var cn = browser.tabContainer.childNodes; | function WindowIsClosing(){ var browser = getBrowser(); var cn = browser.mTabContainer.childNodes; var numtabs = cn.length; var reallyClose = true; if (numtabs > 1) { var shouldPrompt = pref.getBoolPref("browser.tabs.warnOnClose"); if (shouldPrompt) { var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getService(Components.interfaces.nsIPromptService); //default to true: if it were false, we wouldn't get this far var warnOnClose = {value:true}; var buttonPressed = promptService.confirmEx(window, gNavigatorBundle.getString('tabs.closeWarningTitle'), gNavigatorBundle.getFormattedString("tabs.closeWarning", [numtabs]), (promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0) + (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1), gNavigatorBundle.getString('tabs.closeButton'), null, null, gNavigatorBundle.getString('tabs.closeWarningPromptMe'), warnOnClose); reallyClose = (buttonPressed == 0); //don't set the pref unless they press OK and it's false if (reallyClose && !warnOnClose.value) { pref.setBoolPref("browser.tabs.warnOnClose", false); } } //if the warn-me pref was true } //if multiple tabs are open for (var i = 0; reallyClose && i < numtabs; ++i) { var ds = browser.getBrowserForTab(cn[i]).docShell; if (ds.contentViewer && !ds.contentViewer.permitUnload()) reallyClose = false; } return reallyClose;} |
var numtabs = browser.mTabContainer.childNodes.length; | var cn = browser.mTabContainer.childNodes; var numtabs = cn.length; | function WindowIsClosing(){ var browser = getBrowser(); var numtabs = browser.mTabContainer.childNodes.length; var reallyClose = true; if (numtabs > 1) { var shouldPrompt = pref.getBoolPref("browser.tabs.warnOnClose"); if (shouldPrompt) { var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getService(Components.interfaces.nsIPromptService); //default to true: if it were false, we wouldn't get this far var warnOnClose = {value:true}; var buttonPressed = promptService.confirmEx(window, gNavigatorBundle.getString('tabs.closeWarningTitle'), gNavigatorBundle.getFormattedString("tabs.closeWarning", [numtabs]), (promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0) + (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1), gNavigatorBundle.getString('tabs.closeButton'), null, null, gNavigatorBundle.getString('tabs.closeWarningPromptMe'), warnOnClose); reallyClose = (buttonPressed == 0); //don't set the pref unless they press OK and it's false if (reallyClose && !warnOnClose.value) { pref.setBoolPref("browser.tabs.warnOnClose", false); } } //if the warn-me pref was true } //if multiple tabs are open return reallyClose;} |
for (var i = 0; reallyClose && i < numtabs; ++i) { var ds = browser.getBrowserForTab(cn[i]).docShell; if (ds.contentViewer && !ds.contentViewer.permitUnload()) reallyClose = false; } | function WindowIsClosing(){ var browser = getBrowser(); var numtabs = browser.mTabContainer.childNodes.length; var reallyClose = true; if (numtabs > 1) { var shouldPrompt = pref.getBoolPref("browser.tabs.warnOnClose"); if (shouldPrompt) { var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getService(Components.interfaces.nsIPromptService); //default to true: if it were false, we wouldn't get this far var warnOnClose = {value:true}; var buttonPressed = promptService.confirmEx(window, gNavigatorBundle.getString('tabs.closeWarningTitle'), gNavigatorBundle.getFormattedString("tabs.closeWarning", [numtabs]), (promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0) + (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1), gNavigatorBundle.getString('tabs.closeButton'), null, null, gNavigatorBundle.getString('tabs.closeWarningPromptMe'), warnOnClose); reallyClose = (buttonPressed == 0); //don't set the pref unless they press OK and it's false if (reallyClose && !warnOnClose.value) { pref.setBoolPref("browser.tabs.warnOnClose", false); } } //if the warn-me pref was true } //if multiple tabs are open return reallyClose;} |
|
if (console.prefs["enableChromeFilter"] && this.shortName == "navigator.xul") | if (console.prefs["enableChromeFilter"] && (this.shortName == "navigator.xul" || this.shortName == "browser.xul")) | function WindowRecord (win, baseURL){ function none() { return ""; }; this.setColumnPropertyName ("col-0", "displayName"); this.window = win; this.url = win.location.href; if (this.url.search(/^\w+:/) == -1) { if (this.url[0] == "/") { this.url = win.location.protocol + "//" + win.location.host + this.url; } else { this.url = baseURL + this.url; } this.baseURL = baseURL; } else { this.baseURL = getPathFromURL(this.url); if (this.baseURL.indexOf("file:///") == 0) this.baseURL = "file:/" + this.baseURL.substr(8) } this.reserveChildren(true); this.shortName = getFileFromPath (this.url); if (console.prefs["enableChromeFilter"] && this.shortName == "navigator.xul") { this.displayName = MSG_NAVIGATOR_XUL; } else { this.filesRecord = new FileContainerRecord(this); this.displayName = this.shortName; } } |
if (myWrap.className == ''){ gPrefs.SetBoolPref("view_source.wrap_long_lines", false); | if (myWrap.className == '') { gPrefs.setBoolPref("view_source.wrap_long_lines", false); | function wrapLongLines(){ //get the first pre tag which surrounds the entire viewsource content var myWrap = window._content.document.getElementById('viewsource'); if (myWrap.className == '') myWrap.className = 'wrap'; else myWrap.className = ''; //since multiple viewsource windows are possible, another window could have //affected the pref, so instead of determining the new pref value via the current //pref value, we use myWrap.className if (gPrefs){ try { if (myWrap.className == ''){ gPrefs.SetBoolPref("view_source.wrap_long_lines", false); } else { gPrefs.SetBoolPref("view_source.wrap_long_lines", true); } } catch (ex) { } }} |
gPrefs.SetBoolPref("view_source.wrap_long_lines", true); | gPrefs.setBoolPref("view_source.wrap_long_lines", true); | function wrapLongLines(){ //get the first pre tag which surrounds the entire viewsource content var myWrap = window._content.document.getElementById('viewsource'); if (myWrap.className == '') myWrap.className = 'wrap'; else myWrap.className = ''; //since multiple viewsource windows are possible, another window could have //affected the pref, so instead of determining the new pref value via the current //pref value, we use myWrap.className if (gPrefs){ try { if (myWrap.className == ''){ gPrefs.SetBoolPref("view_source.wrap_long_lines", false); } else { gPrefs.SetBoolPref("view_source.wrap_long_lines", true); } } catch (ex) { } }} |
toolbar.setAttribute('previousset', toolbar.currentSet); | function wrapToolbarItems(){ for (var i = 0; i < gToolbox.childNodes.length; ++i) { var toolbar = getToolbarAt(i); if (isCustomizableToolbar(toolbar)) { for (var k = 0; k < toolbar.childNodes.length; ++k) { var item = toolbar.childNodes[k]; if (isToolbarItem(item)) { var nextSibling = item.nextSibling; var wrapper = wrapToolbarItem(item); if (nextSibling) toolbar.insertBefore(wrapper, nextSibling); else toolbar.appendChild(wrapper); } } } }} |
|
document.write( s + "</font></b></tt><br>" ); | DocumentWrite( s + "</font></b></tt><br>" ); | function writeFormattedResult( expect, actual, string, passed ) { string = string.replace(/[<>&]/g, htmlesc); var s = "<tt>"+ string ; s += "<b>" ; s += ( passed ) ? "<font color=#009900> " + PASSED : "<font color=#aa0000> " + FAILED + expect + "</tt>"; document.write( s + "</font></b></tt><br>" ); return passed;} |
document.write( s + "</font></b></tt><br>" ); | DocumentWrite( s + "</font></b></tt><br>" ); | function writeFormattedResult( expect, actual, string, passed ) { string = String(string); string = string.replace(/[<>&]/g, htmlesc); var s = "<tt>"+ string ; s += "<b>" ; s += ( passed ) ? "<font color=#009900> " + PASSED : "<font color=#aa0000> " + FAILED + expect + "</tt>"; document.write( s + "</font></b></tt><br>" ); return passed;} |
document.write( "<h2>" + string + "</h2>" ); | DocumentWrite( "<h2>" + string + "</h2>" ); | function writeHeaderToLog( string ) { string = string.replace(/[<>&]/g, htmlesc); document.write( "<h2>" + string + "</h2>" );} |
document.write( "<h2>" + string + "</h2>" ); | DocumentWrite( "<h2>" + string + "</h2>" ); | function writeHeaderToLog( string ) { string = String(string); string = string.replace(/[<>&]/g, htmlesc); document.write( "<h2>" + string + "</h2>" );} |
document.write( "<h2>" + string + "</h2>" ); | DocumentWrite( "<h2>" + string + "</h2>" ); | function writeHeaderToLog( string ) { string = String(string); document.write( "<h2>" + string + "</h2>" );} |
pref.SetBoolPref (rootNode + "toolbar.icons", client.ICONS_IN_TOOLBAR); | function writeIRCPrefs (rootNode){ var pref = Components.classes["@mozilla.org/preferences;1"].createInstance(); if(!pref) throw ("Can't find pref component."); if (!rootNode) rootNode = "extensions.irc."; if (!rootNode.match(/\.$/)) rootNode += "."; pref = pref.QueryInterface(Components.interfaces.nsIPref); pref.SetCharPref (rootNode + "nickname", CIRCNetwork.prototype.INITIAL_NICK); pref.SetCharPref (rootNode + "username", CIRCNetwork.prototype.INITIAL_NAME); pref.SetCharPref (rootNode + "desc", CIRCNetwork.prototype.INITIAL_DESC); pref.SetCharPref (rootNode + "nickCompleteStr", client.ADDRESSED_NICK_SEP); pref.SetCharPref (rootNode + "stalkWords", client.stalkingVictims.join ("; ")); pref.SetBoolPref (rootNode + "munger", client.munger.enabled); pref.SetBoolPref (rootNode + "munger.smileyText", client.smileyText); pref.SetBoolPref (rootNode + "toolbar.icons", client.ICONS_IN_TOOLBAR); pref.SetBoolPref (rootNode + "notify.aggressive", client.FLASH_WINDOW); var h = client.eventPump.getHook ("event-tracer"); pref.SetBoolPref (rootNode + "debug.tracer", h.enabled); } |
|
pref.setBoolPref (rootNode + "munger." + entry, client.munger.entries[entry].enabled); | { if (entry[0] != ".") { pref.setBoolPref (rootNode + "munger." + entry, client.munger.entries[entry].enabled); } } | function writeIRCPrefs (rootNode){ pref = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); if(!pref) throw ("Can't find pref component."); if (!rootNode) rootNode = "extensions.irc."; if (!rootNode.match(/\.$/)) rootNode += "."; pref.setCharPref (rootNode + "nickname", CIRCNetwork.prototype.INITIAL_NICK); pref.setCharPref (rootNode + "username", CIRCNetwork.prototype.INITIAL_NAME); pref.setCharPref (rootNode + "desc", CIRCNetwork.prototype.INITIAL_DESC); pref.setCharPref (rootNode + "nickCompleteStr", client.ADDRESSED_NICK_SEP); pref.setCharPref (rootNode + "style.default", client.DEFAULT_STYLE); pref.setCharPref (rootNode + "stalkWords", client.stalkingVictims.join ("; ")); pref.setBoolPref (rootNode + "munger", client.munger.enabled); pref.setBoolPref (rootNode + "munger.smileyText", client.smileyText); for (var entry in client.munger.entries) pref.setBoolPref (rootNode + "munger." + entry, client.munger.entries[entry].enabled); pref.setBoolPref (rootNode + "notify.aggressive", client.FLASH_WINDOW); var h = client.eventPump.getHook ("event-tracer"); pref.setBoolPref (rootNode + "debug.tracer", h.enabled); } |
pref.setBoolPref (rootNode + "views.collapseMsgs", client.COLLAPSE_MSGS); pref.setIntPref (rootNode + "views.client.maxlines", client.MAX_MESSAGES); pref.setIntPref (rootNode + "views.network.maxlines", CIRCChanUser.prototype.MAX_MESSAGES); pref.setIntPref (rootNode + "views.channel.maxlines", CIRCChannel.prototype.MAX_MESSAGES); pref.setIntPref (rootNode + "views.chanuser.maxlines", CIRCChanUser.prototype.MAX_MESSAGES); | function writeIRCPrefs (rootNode){ pref = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); if(!pref) throw ("Can't find pref component."); if (!rootNode) rootNode = "extensions.irc."; if (!rootNode.match(/\.$/)) rootNode += "."; pref.setCharPref (rootNode + "nickname", CIRCNetwork.prototype.INITIAL_NICK); pref.setCharPref (rootNode + "username", CIRCNetwork.prototype.INITIAL_NAME); pref.setCharPref (rootNode + "desc", CIRCNetwork.prototype.INITIAL_DESC); pref.setCharPref (rootNode + "nickCompleteStr", client.ADDRESSED_NICK_SEP); pref.setCharPref (rootNode + "style.default", client.DEFAULT_STYLE); pref.setCharPref (rootNode + "stalkWords", client.stalkingVictims.join ("; ")); pref.setBoolPref (rootNode + "munger", client.munger.enabled); pref.setBoolPref (rootNode + "munger.smileyText", client.smileyText); for (var entry in client.munger.entries) pref.setBoolPref (rootNode + "munger." + entry, client.munger.entries[entry].enabled); pref.setBoolPref (rootNode + "notify.aggressive", client.FLASH_WINDOW); var h = client.eventPump.getHook ("event-tracer"); pref.setBoolPref (rootNode + "debug.tracer", h.enabled); } |
|
document.write( string + "<br>\n"); | DocumentWrite( string + "<br>\n"); | function writeLineToLog( string ) { string = string.replace(/[<>&]/g, htmlesc); document.write( string + "<br>\n");} |
document.write( string + "<br>\n"); | DocumentWrite( string + "<br>\n"); | function writeLineToLog( string ) { string = String(string); string = string.replace(/[<>&]/g, htmlesc); document.write( string + "<br>\n");} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.