rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
switch ( radiogroup.data ) { case "0": for (i = 0; i < manual.length; i++)
|
switch ( radiogroup.value ) { case "0": for (i = 0; i < manual.length; i++)
|
function DoEnabling(){ var i; var ftp = document.getElementById("networkProxyFTP"); var ftpPort = document.getElementById("networkProxyFTP_Port"); var gopher = document.getElementById("networkProxyGopher"); var gopherPort = document.getElementById("networkProxyGopher_Port"); var http = document.getElementById("networkProxyHTTP"); var httpPort = document.getElementById("networkProxyHTTP_Port"); var ssl = document.getElementById("networkProxySSL"); var sslPort = document.getElementById("networkProxySSL_Port"); var socks = document.getElementById("networkProxySOCKS"); var socksPort = document.getElementById("networkProxySOCKS_Port"); var noProxy = document.getElementById("networkProxyNone"); var autoURL = document.getElementById("networkProxyAutoconfigURL"); var autoReload = document.getElementById("autoReload"); // convenience arrays var manual = [ftp, ftpPort, gopher, gopherPort, http, httpPort, ssl, sslPort, socks, socksPort, noProxy]; var auto = [autoURL, autoReload]; // radio buttons var radiogroup = document.getElementById("networkProxyType"); switch ( radiogroup.data ) { case "0": for (i = 0; i < manual.length; i++) manual[i].setAttribute( "disabled", "true" ); for (i = 0; i < auto.length; i++) auto[i].setAttribute( "disabled", "true" ); break; case "1": for (i = 0; i < auto.length; i++) auto[i].setAttribute( "disabled", "true" ); for (i = 0; i < manual.length; i++) manual[i].removeAttribute( "disabled" ); break; case "2": default: for (i = 0; i < manual.length; i++) manual[i].setAttribute( "disabled", "true" ); for (i = 0; i < auto.length; i++) auto[i].removeAttribute( "disabled" ); break; }}
|
if ( sidebarSearchText.value == "" ) { if ( !searchButton.getAttribute("disabled") ) searchButton.setAttribute("disabled","true"); } else { if ( searchButton.getAttribute("disabled") == "true") { searchButton.removeAttribute("disabled"); } }
|
if (!sidebarSearchText.value) { if (!searchButton.disabled) searchButton.disabled = true; } else if (searchButton.disabled) searchButton.disabled = false;
|
function doEnabling(){ var searchButton = document.getElementById("searchbutton"); var sidebarSearchText = document.getElementById("sidebar-search-text"); if ( sidebarSearchText.value == "" ) { // No input, disable search button if enabled. if ( !searchButton.getAttribute("disabled") ) searchButton.setAttribute("disabled","true"); } else { if ( searchButton.getAttribute("disabled") == "true") { searchButton.removeAttribute("disabled"); } }}
|
{ if ( dialog.input.value == "" ) { if ( !dialog.open.getAttribute("disabled") ) dialog.open.setAttribute("disabled","true"); } else { if ( dialog.open.getAttribute("disabled") ) dialog.open.removeAttribute( "disabled" ); }
|
{ if (!dialog.input.value) { dialog.open.setAttribute("disabled","true");
|
function doEnabling() { if ( dialog.input.value == "" ) { // No input, disable ok button if enabled. if ( !dialog.open.getAttribute("disabled") ) dialog.open.setAttribute("disabled","true"); } else { if ( dialog.open.getAttribute("disabled") ) dialog.open.removeAttribute( "disabled" ); } }
|
else { dialog.open.removeAttribute("disabled"); } }
|
function doEnabling() { if ( dialog.input.value == "" ) { // No input, disable ok button if enabled. if ( !dialog.open.getAttribute("disabled") ) dialog.open.setAttribute("disabled","true"); } else { if ( dialog.open.getAttribute("disabled") ) dialog.open.removeAttribute( "disabled" ); } }
|
|
dialog.MisspelledWordLabel.setAttribute("value",GetString("CheckSpellingDone"));
|
dialog.MisspelledWord.setAttribute("value",GetString("CheckSpellingDone"));
|
function DoEnabling(){ if (MisspelledWord.length == 0) { dialog.MisspelledWordLabel.setAttribute("value",GetString("CheckSpellingDone")); SetElementEnabledById("MisspelledWord", false); SetElementEnabledById("ReplaceWordLabel", false); SetElementEnabledById("ReplaceWord", false); SetElementEnabledById("CheckWord", false); SetElementEnabledById("SuggestedListLabel", false); SetElementEnabledById("SuggestedList", false); SetElementEnabledById("Ignore", false); SetElementEnabledById("IgnoreAll", false); SetElementEnabledById("Replace", false); SetElementEnabledById("ReplaceAll", false); SetElementEnabledById("AddToDictionary", false); } else { dialog.MisspelledWordLabel.setAttribute("value",GetString("MisspelledWordLabel")); SetElementEnabledById("MisspelledWord", true); SetElementEnabledById("ReplaceWordLabel", true); SetElementEnabledById("ReplaceWord", true); SetElementEnabledById("CheckWord", true); SetElementEnabledById("SuggestedListLabel", true); SetElementEnabledById("SuggestedList", true); SetElementEnabledById("Ignore", true); SetElementEnabledById("IgnoreAll", true); SetElementEnabledById("Replace", true); SetElementEnabledById("ReplaceAll", true); SetElementEnabledById("AddToDictionary", true); }}
|
SetElementEnabledById("MisspelledWord", false);
|
SetElementEnabledById("MisspelledWordLabel", false);
|
function DoEnabling(){ if (MisspelledWord.length == 0) { dialog.MisspelledWordLabel.setAttribute("value",GetString("CheckSpellingDone")); SetElementEnabledById("MisspelledWord", false); SetElementEnabledById("ReplaceWordLabel", false); SetElementEnabledById("ReplaceWord", false); SetElementEnabledById("CheckWord", false); SetElementEnabledById("SuggestedListLabel", false); SetElementEnabledById("SuggestedList", false); SetElementEnabledById("Ignore", false); SetElementEnabledById("IgnoreAll", false); SetElementEnabledById("Replace", false); SetElementEnabledById("ReplaceAll", false); SetElementEnabledById("AddToDictionary", false); } else { dialog.MisspelledWordLabel.setAttribute("value",GetString("MisspelledWordLabel")); SetElementEnabledById("MisspelledWord", true); SetElementEnabledById("ReplaceWordLabel", true); SetElementEnabledById("ReplaceWord", true); SetElementEnabledById("CheckWord", true); SetElementEnabledById("SuggestedListLabel", true); SetElementEnabledById("SuggestedList", true); SetElementEnabledById("Ignore", true); SetElementEnabledById("IgnoreAll", true); SetElementEnabledById("Replace", true); SetElementEnabledById("ReplaceAll", true); SetElementEnabledById("AddToDictionary", true); }}
|
dialog.MisspelledWordLabel.setAttribute("value",GetString("MisspelledWordLabel")); SetElementEnabledById("MisspelledWord", true);
|
SetElementEnabledById("MisspelledWordLabel", true);
|
function DoEnabling(){ if (MisspelledWord.length == 0) { dialog.MisspelledWordLabel.setAttribute("value",GetString("CheckSpellingDone")); SetElementEnabledById("MisspelledWord", false); SetElementEnabledById("ReplaceWordLabel", false); SetElementEnabledById("ReplaceWord", false); SetElementEnabledById("CheckWord", false); SetElementEnabledById("SuggestedListLabel", false); SetElementEnabledById("SuggestedList", false); SetElementEnabledById("Ignore", false); SetElementEnabledById("IgnoreAll", false); SetElementEnabledById("Replace", false); SetElementEnabledById("ReplaceAll", false); SetElementEnabledById("AddToDictionary", false); } else { dialog.MisspelledWordLabel.setAttribute("value",GetString("MisspelledWordLabel")); SetElementEnabledById("MisspelledWord", true); SetElementEnabledById("ReplaceWordLabel", true); SetElementEnabledById("ReplaceWord", true); SetElementEnabledById("CheckWord", true); SetElementEnabledById("SuggestedListLabel", true); SetElementEnabledById("SuggestedList", true); SetElementEnabledById("Ignore", true); SetElementEnabledById("IgnoreAll", true); SetElementEnabledById("Replace", true); SetElementEnabledById("ReplaceAll", true); SetElementEnabledById("AddToDictionary", true); }}
|
SetElementEnabledById("Replace", true); SetElementEnabledById("ReplaceAll", true);
|
function DoEnabling(){ if (MisspelledWord.length == 0) { dialog.MisspelledWordLabel.setAttribute("value",GetString("CheckSpellingDone")); SetElementEnabledById("MisspelledWord", false); SetElementEnabledById("ReplaceWordLabel", false); SetElementEnabledById("ReplaceWord", false); SetElementEnabledById("CheckWord", false); SetElementEnabledById("SuggestedListLabel", false); SetElementEnabledById("SuggestedList", false); SetElementEnabledById("Ignore", false); SetElementEnabledById("IgnoreAll", false); SetElementEnabledById("Replace", false); SetElementEnabledById("ReplaceAll", false); SetElementEnabledById("AddToDictionary", false); } else { dialog.MisspelledWordLabel.setAttribute("value",GetString("MisspelledWordLabel")); SetElementEnabledById("MisspelledWord", true); SetElementEnabledById("ReplaceWordLabel", true); SetElementEnabledById("ReplaceWord", true); SetElementEnabledById("CheckWord", true); SetElementEnabledById("SuggestedListLabel", true); SetElementEnabledById("SuggestedList", true); SetElementEnabledById("Ignore", true); SetElementEnabledById("IgnoreAll", true); SetElementEnabledById("Replace", true); SetElementEnabledById("ReplaceAll", true); SetElementEnabledById("AddToDictionary", true); }}
|
|
SetReplaceEnable();
|
function DoEnabling(){ if (MisspelledWord.length == 0) { dialog.MisspelledWordLabel.setAttribute("value",GetString("CheckSpellingDone")); SetElementEnabledById("MisspelledWord", false); SetElementEnabledById("ReplaceWordLabel", false); SetElementEnabledById("ReplaceWord", false); SetElementEnabledById("CheckWord", false); SetElementEnabledById("SuggestedListLabel", false); SetElementEnabledById("SuggestedList", false); SetElementEnabledById("Ignore", false); SetElementEnabledById("IgnoreAll", false); SetElementEnabledById("Replace", false); SetElementEnabledById("ReplaceAll", false); SetElementEnabledById("AddToDictionary", false); } else { dialog.MisspelledWordLabel.setAttribute("value",GetString("MisspelledWordLabel")); SetElementEnabledById("MisspelledWord", true); SetElementEnabledById("ReplaceWordLabel", true); SetElementEnabledById("ReplaceWord", true); SetElementEnabledById("CheckWord", true); SetElementEnabledById("SuggestedListLabel", true); SetElementEnabledById("SuggestedList", true); SetElementEnabledById("Ignore", true); SetElementEnabledById("IgnoreAll", true); SetElementEnabledById("Replace", true); SetElementEnabledById("ReplaceAll", true); SetElementEnabledById("AddToDictionary", true); }}
|
|
gReplaceDialog.enabled = gReplaceDialog.findKey.value; gReplaceDialog.findNext.disabled = !gReplaceDialog.findKey.value; gReplaceDialog.replace.disabled = (!gReplaceDialog.findKey.value || !gReplaceDialog.replaceKey.value); gReplaceDialog.replaceAll.disabled = (!gReplaceDialog.findKey.value || !gReplaceDialog.replaceKey.value);
|
var findStr = gReplaceDialog.findInput.value; var repStr = gReplaceDialog.replaceInput.value; gReplaceDialog.enabled = findStr; gReplaceDialog.findNext.disabled = !findStr; gReplaceDialog.replace.disabled = (!findStr || !repStr); gReplaceDialog.replaceAndFind.disabled = (!findStr || !repStr); gReplaceDialog.replaceAll.disabled = (!findStr || !repStr);
|
function doEnabling(){ gReplaceDialog.enabled = gReplaceDialog.findKey.value; gReplaceDialog.findNext.disabled = !gReplaceDialog.findKey.value; gReplaceDialog.replace.disabled = (!gReplaceDialog.findKey.value || !gReplaceDialog.replaceKey.value); gReplaceDialog.replaceAll.disabled = (!gReplaceDialog.findKey.value || !gReplaceDialog.replaceKey.value);}
|
SetElementEnabledByID("MisspelledWord", false); SetElementEnabledByID("ReplaceWordLabel", false); SetElementEnabledByID("ReplaceWord", false); SetElementEnabledByID("CheckWord", false); SetElementEnabledByID("SuggestedListLabel", false); SetElementEnabledByID("SuggestedList", false); SetElementEnabledByID("Ignore", false); SetElementEnabledByID("IgnoreAll", false); SetElementEnabledByID("Replace", false); SetElementEnabledByID("ReplaceAll", false); SetElementEnabledByID("AddToDictionary", false);
|
SetElementEnabledById("MisspelledWord", false); SetElementEnabledById("ReplaceWordLabel", false); SetElementEnabledById("ReplaceWord", false); SetElementEnabledById("CheckWord", false); SetElementEnabledById("SuggestedListLabel", false); SetElementEnabledById("SuggestedList", false); SetElementEnabledById("Ignore", false); SetElementEnabledById("IgnoreAll", false); SetElementEnabledById("Replace", false); SetElementEnabledById("ReplaceAll", false); SetElementEnabledById("AddToDictionary", false);
|
function DoEnabling(){ if (MisspelledWord.length == 0) { dialog.MisspelledWordLabel.setAttribute("value",GetString("CheckSpellingDone")); SetElementEnabledByID("MisspelledWord", false); SetElementEnabledByID("ReplaceWordLabel", false); SetElementEnabledByID("ReplaceWord", false); SetElementEnabledByID("CheckWord", false); SetElementEnabledByID("SuggestedListLabel", false); SetElementEnabledByID("SuggestedList", false); SetElementEnabledByID("Ignore", false); SetElementEnabledByID("IgnoreAll", false); SetElementEnabledByID("Replace", false); SetElementEnabledByID("ReplaceAll", false); SetElementEnabledByID("AddToDictionary", false); } else { dialog.MisspelledWordLabel.setAttribute("value",GetString("MisspelledWordLabel")); SetElementEnabledByID("MisspelledWord", true); SetElementEnabledByID("ReplaceWordLabel", true); SetElementEnabledByID("ReplaceWord", true); SetElementEnabledByID("CheckWord", true); SetElementEnabledByID("SuggestedListLabel", true); SetElementEnabledByID("SuggestedList", true); SetElementEnabledByID("Ignore", true); SetElementEnabledByID("IgnoreAll", true); SetElementEnabledByID("Replace", true); SetElementEnabledByID("ReplaceAll", true); SetElementEnabledByID("AddToDictionary", true); }}
|
SetElementEnabledByID("MisspelledWord", true); SetElementEnabledByID("ReplaceWordLabel", true); SetElementEnabledByID("ReplaceWord", true); SetElementEnabledByID("CheckWord", true); SetElementEnabledByID("SuggestedListLabel", true); SetElementEnabledByID("SuggestedList", true); SetElementEnabledByID("Ignore", true); SetElementEnabledByID("IgnoreAll", true); SetElementEnabledByID("Replace", true); SetElementEnabledByID("ReplaceAll", true); SetElementEnabledByID("AddToDictionary", true);
|
SetElementEnabledById("MisspelledWord", true); SetElementEnabledById("ReplaceWordLabel", true); SetElementEnabledById("ReplaceWord", true); SetElementEnabledById("CheckWord", true); SetElementEnabledById("SuggestedListLabel", true); SetElementEnabledById("SuggestedList", true); SetElementEnabledById("Ignore", true); SetElementEnabledById("IgnoreAll", true); SetElementEnabledById("Replace", true); SetElementEnabledById("ReplaceAll", true); SetElementEnabledById("AddToDictionary", true);
|
function DoEnabling(){ if (MisspelledWord.length == 0) { dialog.MisspelledWordLabel.setAttribute("value",GetString("CheckSpellingDone")); SetElementEnabledByID("MisspelledWord", false); SetElementEnabledByID("ReplaceWordLabel", false); SetElementEnabledByID("ReplaceWord", false); SetElementEnabledByID("CheckWord", false); SetElementEnabledByID("SuggestedListLabel", false); SetElementEnabledByID("SuggestedList", false); SetElementEnabledByID("Ignore", false); SetElementEnabledByID("IgnoreAll", false); SetElementEnabledByID("Replace", false); SetElementEnabledByID("ReplaceAll", false); SetElementEnabledByID("AddToDictionary", false); } else { dialog.MisspelledWordLabel.setAttribute("value",GetString("MisspelledWordLabel")); SetElementEnabledByID("MisspelledWord", true); SetElementEnabledByID("ReplaceWordLabel", true); SetElementEnabledByID("ReplaceWord", true); SetElementEnabledByID("CheckWord", true); SetElementEnabledByID("SuggestedListLabel", true); SetElementEnabledByID("SuggestedList", true); SetElementEnabledByID("Ignore", true); SetElementEnabledByID("IgnoreAll", true); SetElementEnabledByID("Replace", true); SetElementEnabledByID("ReplaceAll", true); SetElementEnabledByID("AddToDictionary", true); }}
|
if (event.button != 1) return(false);
|
var engineTabBox = document.getElementById("engineTabs"); var toggledEls = engineTabBox.getElementsByAttribute("toggled", "true"); for (var i = 0; i < toggledEls.length; i++) toggledEls[i].removeAttribute("toggled"); event.target.setAttribute("toggled", "true");
|
function doEngineClick( event, aNode ){ if (event.button != 1) return(false); var html = null; var resultsTree = document.getElementById("internetresultstree"); var contentArea = document.getElementById("content"); var splitter = document.getElementById("gray_horizontal_splitter"); var engineURI = aNode.getAttribute("id"); if (engineURI == "allEngines") { resultsTree.setAttribute("style", "display: table;"); splitter.setAttribute("style","display: block;"); contentArea.setAttribute("style", "height: 100; width: 100%;"); } else { resultsTree.setAttribute("style", "display: none;"); splitter.setAttribute("style","display: none"); try { var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); if (rdf) { var internetSearchStore = rdf.GetDataSource("rdf:internetsearch"); if (internetSearchStore) { var src = rdf.GetResource(engineURI, true); var htmlProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#HTML", true); html = internetSearchStore.GetTarget(src, htmlProperty, true); if ( html ) html = html.QueryInterface(Components.interfaces.nsIRDFLiteral); if ( html ) html = html.Value; } } } catch(ex) { } } if ( html ) { var doc = window.frames[0].document; if (doc) { doc.open("text/html", "replace"); doc.writeln( html ); doc.close(); } } else { window.frames[0].document.location = "chrome://communicator/locale/search/default.htm"; }}
|
var splitter = document.getElementById("gray_horizontal_splitter"); var engineURI = aNode.getAttribute("id"); if (engineURI == "allEngines") { resultsTree.setAttribute("style", "display: table;"); splitter.setAttribute("style","display: block;"); contentArea.setAttribute("style", "height: 100; width: 100%;");
|
var splitter = document.getElementById("results-splitter"); var engineURI = aNode.id; if (engineURI == "allEngines") { resultsTree.removeAttribute("hidden"); splitter.removeAttribute("hidden");
|
function doEngineClick( event, aNode ){ if (event.button != 1) return(false); var html = null; var resultsTree = document.getElementById("internetresultstree"); var contentArea = document.getElementById("content"); var splitter = document.getElementById("gray_horizontal_splitter"); var engineURI = aNode.getAttribute("id"); if (engineURI == "allEngines") { resultsTree.setAttribute("style", "display: table;"); splitter.setAttribute("style","display: block;"); contentArea.setAttribute("style", "height: 100; width: 100%;"); } else { resultsTree.setAttribute("style", "display: none;"); splitter.setAttribute("style","display: none"); try { var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); if (rdf) { var internetSearchStore = rdf.GetDataSource("rdf:internetsearch"); if (internetSearchStore) { var src = rdf.GetResource(engineURI, true); var htmlProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#HTML", true); html = internetSearchStore.GetTarget(src, htmlProperty, true); if ( html ) html = html.QueryInterface(Components.interfaces.nsIRDFLiteral); if ( html ) html = html.Value; } } } catch(ex) { } } if ( html ) { var doc = window.frames[0].document; if (doc) { doc.open("text/html", "replace"); doc.writeln( html ); doc.close(); } } else { window.frames[0].document.location = "chrome://communicator/locale/search/default.htm"; }}
|
resultsTree.setAttribute("style", "display: none;"); splitter.setAttribute("style","display: none");
|
resultsTree.setAttribute("hidden", "true"); splitter.setAttribute("hidden", "true");
|
function doEngineClick( event, aNode ){ if (event.button != 1) return(false); var html = null; var resultsTree = document.getElementById("internetresultstree"); var contentArea = document.getElementById("content"); var splitter = document.getElementById("gray_horizontal_splitter"); var engineURI = aNode.getAttribute("id"); if (engineURI == "allEngines") { resultsTree.setAttribute("style", "display: table;"); splitter.setAttribute("style","display: block;"); contentArea.setAttribute("style", "height: 100; width: 100%;"); } else { resultsTree.setAttribute("style", "display: none;"); splitter.setAttribute("style","display: none"); try { var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); if (rdf) { var internetSearchStore = rdf.GetDataSource("rdf:internetsearch"); if (internetSearchStore) { var src = rdf.GetResource(engineURI, true); var htmlProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#HTML", true); html = internetSearchStore.GetTarget(src, htmlProperty, true); if ( html ) html = html.QueryInterface(Components.interfaces.nsIRDFLiteral); if ( html ) html = html.Value; } } } catch(ex) { } } if ( html ) { var doc = window.frames[0].document; if (doc) { doc.open("text/html", "replace"); doc.writeln( html ); doc.close(); } } else { window.frames[0].document.location = "chrome://communicator/locale/search/default.htm"; }}
|
var doc = window.frames[0].document;
|
var doc = frames[0].document;
|
function doEngineClick( event, aNode ){ if (event.button != 1) return(false); var html = null; var resultsTree = document.getElementById("internetresultstree"); var contentArea = document.getElementById("content"); var splitter = document.getElementById("gray_horizontal_splitter"); var engineURI = aNode.getAttribute("id"); if (engineURI == "allEngines") { resultsTree.setAttribute("style", "display: table;"); splitter.setAttribute("style","display: block;"); contentArea.setAttribute("style", "height: 100; width: 100%;"); } else { resultsTree.setAttribute("style", "display: none;"); splitter.setAttribute("style","display: none"); try { var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); if (rdf) { var internetSearchStore = rdf.GetDataSource("rdf:internetsearch"); if (internetSearchStore) { var src = rdf.GetResource(engineURI, true); var htmlProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#HTML", true); html = internetSearchStore.GetTarget(src, htmlProperty, true); if ( html ) html = html.QueryInterface(Components.interfaces.nsIRDFLiteral); if ( html ) html = html.Value; } } } catch(ex) { } } if ( html ) { var doc = window.frames[0].document; if (doc) { doc.open("text/html", "replace"); doc.writeln( html ); doc.close(); } } else { window.frames[0].document.location = "chrome://communicator/locale/search/default.htm"; }}
|
{ window.frames[0].document.location = "chrome: }
|
frames[0].document.location = "chrome:
|
function doEngineClick( event, aNode ){ if (event.button != 1) return(false); var html = null; var resultsTree = document.getElementById("internetresultstree"); var contentArea = document.getElementById("content"); var splitter = document.getElementById("gray_horizontal_splitter"); var engineURI = aNode.getAttribute("id"); if (engineURI == "allEngines") { resultsTree.setAttribute("style", "display: table;"); splitter.setAttribute("style","display: block;"); contentArea.setAttribute("style", "height: 100; width: 100%;"); } else { resultsTree.setAttribute("style", "display: none;"); splitter.setAttribute("style","display: none"); try { var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); if (rdf) { var internetSearchStore = rdf.GetDataSource("rdf:internetsearch"); if (internetSearchStore) { var src = rdf.GetResource(engineURI, true); var htmlProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#HTML", true); html = internetSearchStore.GetTarget(src, htmlProperty, true); if ( html ) html = html.QueryInterface(Components.interfaces.nsIRDFLiteral); if ( html ) html = html.Value; } } } catch(ex) { } } if ( html ) { var doc = window.frames[0].document; if (doc) { doc.open("text/html", "replace"); doc.writeln( html ); doc.close(); } } else { window.frames[0].document.location = "chrome://communicator/locale/search/default.htm"; }}
|
for (var i=0; i < RE.length; i++) {
|
for (var i=0; i < RE.length; ++i) {
|
function doFind() { var searchTree = document.getElementById("help-search-tree"); var findText = document.getElementById("findText"); // clear any previous results. clearDatabases(searchTree.database); // split search string into separate terms and compile into regexp's RE = findText.value.split(/\s+/); for (var i=0; i < RE.length; i++) { if (RE[i] == "") continue; RE[i] = new RegExp(RE[i], "i"); } var resultsDS = Components.classes["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"].createInstance(Components.interfaces.nsIRDFDataSource); var tree = document.getElementById("help-toc-tree"); var sourceDS = tree.database; doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); // search index. tree = document.getElementById("help-index-tree"); sourceDS = tree.database; if (!sourceDS) // If the index has never been displayed this will be null (sigh!). sourceDS = loadCompositeDS(tree.datasources); doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); // search glossary. tree = document.getElementById("help-glossary-tree"); sourceDS = tree.database; if (!sourceDS) // If the glossary has never been displayed this will be null (sigh!). sourceDS = loadCompositeDS(tree.datasources); doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); // Add the datasource to the search tree searchTree.database.AddDataSource(resultsDS); searchTree.builder.rebuild();}
|
RE[i] = new RegExp(RE[i], "i");
|
RE[i] = new RegExp(RE[i].substring(0, RE[i].length-1) +"\w?", "i");
|
function doFind() { var searchTree = document.getElementById("help-search-tree"); var findText = document.getElementById("findText"); // clear any previous results. clearDatabases(searchTree.database); // split search string into separate terms and compile into regexp's RE = findText.value.split(/\s+/); for (var i=0; i < RE.length; i++) { if (RE[i] == "") continue; RE[i] = new RegExp(RE[i], "i"); } var resultsDS = Components.classes["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"].createInstance(Components.interfaces.nsIRDFDataSource); var tree = document.getElementById("help-toc-tree"); var sourceDS = tree.database; doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); // search index. tree = document.getElementById("help-index-tree"); sourceDS = tree.database; if (!sourceDS) // If the index has never been displayed this will be null (sigh!). sourceDS = loadCompositeDS(tree.datasources); doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); // search glossary. tree = document.getElementById("help-glossary-tree"); sourceDS = tree.database; if (!sourceDS) // If the glossary has never been displayed this will be null (sigh!). sourceDS = loadCompositeDS(tree.datasources); doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); // Add the datasource to the search tree searchTree.database.AddDataSource(resultsDS); searchTree.builder.rebuild();}
|
tree = document.getElementById("help-index-tree"); sourceDS = tree.database; if (!sourceDS) sourceDS = loadCompositeDS(tree.datasources); doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0);
|
if (searchDatasources != "rdf:null") { if (!searchDS) searchDS = loadCompositeDS(searchDatasources); doFindOnDatasource(resultsDS, searchDS, RDF_ROOT, 0); }
|
function doFind() { var searchTree = document.getElementById("help-search-tree"); var findText = document.getElementById("findText"); // clear any previous results. clearDatabases(searchTree.database); // split search string into separate terms and compile into regexp's RE = findText.value.split(/\s+/); for (var i=0; i < RE.length; i++) { if (RE[i] == "") continue; RE[i] = new RegExp(RE[i], "i"); } var resultsDS = Components.classes["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"].createInstance(Components.interfaces.nsIRDFDataSource); var tree = document.getElementById("help-toc-tree"); var sourceDS = tree.database; doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); // search index. tree = document.getElementById("help-index-tree"); sourceDS = tree.database; if (!sourceDS) // If the index has never been displayed this will be null (sigh!). sourceDS = loadCompositeDS(tree.datasources); doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); // search glossary. tree = document.getElementById("help-glossary-tree"); sourceDS = tree.database; if (!sourceDS) // If the glossary has never been displayed this will be null (sigh!). sourceDS = loadCompositeDS(tree.datasources); doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); // Add the datasource to the search tree searchTree.database.AddDataSource(resultsDS); searchTree.builder.rebuild();}
|
tree = helpSearchPanel;
|
tree = helpGlossaryPanel;
|
function doFind() { var searchTree = document.getElementById("help-search-tree"); var findText = document.getElementById("findText"); // clear any previous results. clearDatabases(searchTree.database); // split search string into separate terms and compile into regexp's RE = findText.value.split(/\s+/); for (var i=0; i < RE.length; ++i) { if (RE[i] == "") continue; RE[i] = new RegExp(RE[i], "i"); } emptySearch = true; // search TOC var resultsDS = Components.classes["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"] .createInstance(Components.interfaces.nsIRDFDataSource); var tree = helpTocPanel; var sourceDS = tree.database; doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); // search glossary. tree = helpSearchPanel; sourceDS = tree.database; // If the glossary has never been displayed this will be null (sigh!). if (!sourceDS) sourceDS = loadCompositeDS(tree.datasources); doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); // search index tree = helpIndexPanel; sourceDS = tree.database; //If the index has never been displayed this will be null if (!sourceDS) sourceDS = loadCompositeDS(tree.datasources); doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); if (emptySearch) assertSearchEmpty(resultsDS); // Add the datasource to the search tree searchTree.database.AddDataSource(resultsDS); searchTree.builder.rebuild();}
|
var tree = document.getElementById("help-toc-tree");
|
var tree = document.getElementById("help-toc-panel");
|
function doFind() { var searchTree = document.getElementById("help-search-tree"); var findText = document.getElementById("findText"); // clear any previous results. clearDatabases(searchTree.database); // split search string into separate terms and compile into regexp's RE = findText.value.split(/\s+/); for (var i=0; i < RE.length; ++i) { if (RE[i] == "") continue; if (RE[i].length > 3) { RE[i] = new RegExp(RE[i].substring(0, RE[i].length-1) +"\w?", "i"); } else { RE[i] = new RegExp(RE[i], "i"); } } emptySearch = true; // search TOC var resultsDS = Components.classes["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"].createInstance(Components.interfaces.nsIRDFDataSource); var tree = document.getElementById("help-toc-tree"); var sourceDS = tree.database; doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); // search additional search datasources if (searchDatasources != "rdf:null") { if (!searchDS) searchDS = loadCompositeDS(searchDatasources); doFindOnDatasource(resultsDS, searchDS, RDF_ROOT, 0); } // search index. tree = document.getElementById("help-index-tree"); sourceDS = tree.database; if (!sourceDS) // If the index has never been displayed this will be null. sourceDS = loadCompositeDS(tree.datasources); doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); // search glossary. tree = document.getElementById("help-glossary-tree"); sourceDS = tree.database; if (!sourceDS) // If the glossary has never been displayed this will be null (sigh!). sourceDS = loadCompositeDS(tree.datasources); doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); if (emptySearch) assertSearchEmpty(resultsDS); // Add the datasource to the search tree searchTree.database.AddDataSource(resultsDS); searchTree.builder.rebuild();}
|
tree = document.getElementById("help-index-tree");
|
tree = document.getElementById("help-index-panel");
|
function doFind() { var searchTree = document.getElementById("help-search-tree"); var findText = document.getElementById("findText"); // clear any previous results. clearDatabases(searchTree.database); // split search string into separate terms and compile into regexp's RE = findText.value.split(/\s+/); for (var i=0; i < RE.length; ++i) { if (RE[i] == "") continue; if (RE[i].length > 3) { RE[i] = new RegExp(RE[i].substring(0, RE[i].length-1) +"\w?", "i"); } else { RE[i] = new RegExp(RE[i], "i"); } } emptySearch = true; // search TOC var resultsDS = Components.classes["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"].createInstance(Components.interfaces.nsIRDFDataSource); var tree = document.getElementById("help-toc-tree"); var sourceDS = tree.database; doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); // search additional search datasources if (searchDatasources != "rdf:null") { if (!searchDS) searchDS = loadCompositeDS(searchDatasources); doFindOnDatasource(resultsDS, searchDS, RDF_ROOT, 0); } // search index. tree = document.getElementById("help-index-tree"); sourceDS = tree.database; if (!sourceDS) // If the index has never been displayed this will be null. sourceDS = loadCompositeDS(tree.datasources); doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); // search glossary. tree = document.getElementById("help-glossary-tree"); sourceDS = tree.database; if (!sourceDS) // If the glossary has never been displayed this will be null (sigh!). sourceDS = loadCompositeDS(tree.datasources); doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); if (emptySearch) assertSearchEmpty(resultsDS); // Add the datasource to the search tree searchTree.database.AddDataSource(resultsDS); searchTree.builder.rebuild();}
|
RE = findText.value.split(/\s+/);
|
RE = findText.value.match(/\S+/g); if (!RE) { searchTree.builder.rebuild(); return; }
|
function doFind() { var searchTree = document.getElementById("help-search-tree"); var findText = document.getElementById("findText"); // clear any previous results. clearDatabases(searchTree.database); // split search string into separate terms and compile into regexp's RE = findText.value.split(/\s+/); for (var i=0; i < RE.length; ++i) { if (RE[i] == "") continue; RE[i] = new RegExp(RE[i], "i"); } emptySearch = true; // search TOC var resultsDS = Components.classes["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"] .createInstance(Components.interfaces.nsIRDFDataSource); var tree = helpTocPanel; var sourceDS = tree.database; doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); // search glossary. tree = helpGlossaryPanel; sourceDS = tree.database; // If the glossary has never been displayed this will be null (sigh!). if (!sourceDS) sourceDS = loadCompositeDS(tree.datasources); doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); // search index tree = helpIndexPanel; sourceDS = tree.database; //If the index has never been displayed this will be null if (!sourceDS) sourceDS = loadCompositeDS(tree.datasources); doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); if (emptySearch) assertSearchEmpty(resultsDS); // Add the datasource to the search tree searchTree.database.AddDataSource(resultsDS); searchTree.builder.rebuild();}
|
if (RE[i] == "") continue; RE[i] = new RegExp(RE[i], "i");
|
RE[i] = new RegExp(RE[i], "i");
|
function doFind() { var searchTree = document.getElementById("help-search-tree"); var findText = document.getElementById("findText"); // clear any previous results. clearDatabases(searchTree.database); // split search string into separate terms and compile into regexp's RE = findText.value.split(/\s+/); for (var i=0; i < RE.length; ++i) { if (RE[i] == "") continue; RE[i] = new RegExp(RE[i], "i"); } emptySearch = true; // search TOC var resultsDS = Components.classes["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"] .createInstance(Components.interfaces.nsIRDFDataSource); var tree = helpTocPanel; var sourceDS = tree.database; doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); // search glossary. tree = helpGlossaryPanel; sourceDS = tree.database; // If the glossary has never been displayed this will be null (sigh!). if (!sourceDS) sourceDS = loadCompositeDS(tree.datasources); doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); // search index tree = helpIndexPanel; sourceDS = tree.database; //If the index has never been displayed this will be null if (!sourceDS) sourceDS = loadCompositeDS(tree.datasources); doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); if (emptySearch) assertSearchEmpty(resultsDS); // Add the datasource to the search tree searchTree.database.AddDataSource(resultsDS); searchTree.builder.rebuild();}
|
var datasource = datasourceNode.selectedItem.getAttribute("data"); gDatasourceName = datasourceNode.selectedItem.getAttribute("value");
|
var datasource = datasourceNode.selectedItem.getAttribute("value"); gDatasourceName = datasourceNode.selectedItem.getAttribute("label");
|
function doFind(){ // get RDF datasource to query var datasourceNode = document.getElementById("datasource"); if (!datasourceNode) return false; var datasource = datasourceNode.selectedItem.getAttribute("data"); gDatasourceName = datasourceNode.selectedItem.getAttribute("value"); // get match var matchNode = document.getElementById("match"); if (!matchNode) return false; var match = matchNode.selectedItem.getAttribute("data"); gMatchName = matchNode.selectedItem.getAttribute("value"); // get method var methodNode = document.getElementById("method"); if (!methodNode) return false; var method = methodNode.selectedItem.getAttribute("data"); gMethodName = methodNode.selectedItem.getAttribute("value"); // get user text to find if (!gFindText || !gFindText.value) return false; gTextName = gFindText.value; // construct find URL var url = "find:datasource=" + datasource; url += "&match=" + match; url += "&method=" + method; url += "&text=" + escape(gTextName); // load find URL into results pane var resultsTree = document.getElementById("findresultstree"); resultsTree.setAttribute("ref", ""); resultsTree.setAttribute("ref", url); // enable "Save Search" button var searchButton = document.getElementById("SaveSearch"); searchButton.removeAttribute("disabled"); resultsTree.focus(); return true;}
|
var match = matchNode.selectedItem.getAttribute("data"); gMatchName = matchNode.selectedItem.getAttribute("value");
|
var match = matchNode.selectedItem.getAttribute("value"); gMatchName = matchNode.selectedItem.getAttribute("label");
|
function doFind(){ // get RDF datasource to query var datasourceNode = document.getElementById("datasource"); if (!datasourceNode) return false; var datasource = datasourceNode.selectedItem.getAttribute("data"); gDatasourceName = datasourceNode.selectedItem.getAttribute("value"); // get match var matchNode = document.getElementById("match"); if (!matchNode) return false; var match = matchNode.selectedItem.getAttribute("data"); gMatchName = matchNode.selectedItem.getAttribute("value"); // get method var methodNode = document.getElementById("method"); if (!methodNode) return false; var method = methodNode.selectedItem.getAttribute("data"); gMethodName = methodNode.selectedItem.getAttribute("value"); // get user text to find if (!gFindText || !gFindText.value) return false; gTextName = gFindText.value; // construct find URL var url = "find:datasource=" + datasource; url += "&match=" + match; url += "&method=" + method; url += "&text=" + escape(gTextName); // load find URL into results pane var resultsTree = document.getElementById("findresultstree"); resultsTree.setAttribute("ref", ""); resultsTree.setAttribute("ref", url); // enable "Save Search" button var searchButton = document.getElementById("SaveSearch"); searchButton.removeAttribute("disabled"); resultsTree.focus(); return true;}
|
var method = methodNode.selectedItem.getAttribute("data"); gMethodName = methodNode.selectedItem.getAttribute("value");
|
var method = methodNode.selectedItem.getAttribute("value"); gMethodName = methodNode.selectedItem.getAttribute("label");
|
function doFind(){ // get RDF datasource to query var datasourceNode = document.getElementById("datasource"); if (!datasourceNode) return false; var datasource = datasourceNode.selectedItem.getAttribute("data"); gDatasourceName = datasourceNode.selectedItem.getAttribute("value"); // get match var matchNode = document.getElementById("match"); if (!matchNode) return false; var match = matchNode.selectedItem.getAttribute("data"); gMatchName = matchNode.selectedItem.getAttribute("value"); // get method var methodNode = document.getElementById("method"); if (!methodNode) return false; var method = methodNode.selectedItem.getAttribute("data"); gMethodName = methodNode.selectedItem.getAttribute("value"); // get user text to find if (!gFindText || !gFindText.value) return false; gTextName = gFindText.value; // construct find URL var url = "find:datasource=" + datasource; url += "&match=" + match; url += "&method=" + method; url += "&text=" + escape(gTextName); // load find URL into results pane var resultsTree = document.getElementById("findresultstree"); resultsTree.setAttribute("ref", ""); resultsTree.setAttribute("ref", url); // enable "Save Search" button var searchButton = document.getElementById("SaveSearch"); searchButton.removeAttribute("disabled"); resultsTree.focus(); return true;}
|
var datasourceNode = document.getElementById("datasource"); var dataSource = datasourceNode.selectedItem.data; gDataSourceName = datasourceNode.selectedItem.value; dump("Datasource: " + gDatasourceName + "\n");
|
var datasourceNode = document.getElementById("datasource"); var dataSource = datasourceNode.selectedItem.value; gDataSourceName = datasourceNode.selectedItem.label; dump("Datasource: " + gDatasourceName + "\n");
|
function doFind(){ gDatasourceName = ""; gMatchName = ""; gMethodName = ""; gTextName = ""; // get RDF datasource to query var datasourceNode = document.getElementById("datasource"); var dataSource = datasourceNode.selectedItem.data; gDataSourceName = datasourceNode.selectedItem.value; dump("Datasource: " + gDatasourceName + "\n"); // get match var matchNode = document.getElementById("match"); var match = matchNode.selectedItem.data; gMatchName = matchNode.selectedItem.value; dump("Match: " + gMatchName + "\n"); // get method var methodNode = document.getElementById("method"); var method = methodNode.selectedItem.data; gMethodName = methodNode.selectedItem.value; dump("Method: " + method + "\n"); // get user text to find var textNode = document.getElementById("findtext"); if (!textNode.value) return false; gTextName = textNode.value; dump("Find text: " + text + "\n"); // construct find URL var url = "find:datasource=" + datasource; url += "&match=" + match; url += "&method=" + method; url += "&text=" + text; dump("Find URL: " + url + "\n"); // load find URL into results pane var resultsTree = parent.frames[1].document.getElementById("findresultstree"); if (!resultsTree) return false; resultsTree.setAttribute("ref", url); // enable "Save Search" button var searchButton = document.getElementById("SaveSearch"); if (searchButton) searchButton.removeAttribute("disabled", "false"); dump("doFind done.\n"); return(true);}
|
var matchNode = document.getElementById("match"); var match = matchNode.selectedItem.data; gMatchName = matchNode.selectedItem.value; dump("Match: " + gMatchName + "\n");
|
var matchNode = document.getElementById("match"); var match = matchNode.selectedItem.value; gMatchName = matchNode.selectedItem.label; dump("Match: " + gMatchName + "\n");
|
function doFind(){ gDatasourceName = ""; gMatchName = ""; gMethodName = ""; gTextName = ""; // get RDF datasource to query var datasourceNode = document.getElementById("datasource"); var dataSource = datasourceNode.selectedItem.data; gDataSourceName = datasourceNode.selectedItem.value; dump("Datasource: " + gDatasourceName + "\n"); // get match var matchNode = document.getElementById("match"); var match = matchNode.selectedItem.data; gMatchName = matchNode.selectedItem.value; dump("Match: " + gMatchName + "\n"); // get method var methodNode = document.getElementById("method"); var method = methodNode.selectedItem.data; gMethodName = methodNode.selectedItem.value; dump("Method: " + method + "\n"); // get user text to find var textNode = document.getElementById("findtext"); if (!textNode.value) return false; gTextName = textNode.value; dump("Find text: " + text + "\n"); // construct find URL var url = "find:datasource=" + datasource; url += "&match=" + match; url += "&method=" + method; url += "&text=" + text; dump("Find URL: " + url + "\n"); // load find URL into results pane var resultsTree = parent.frames[1].document.getElementById("findresultstree"); if (!resultsTree) return false; resultsTree.setAttribute("ref", url); // enable "Save Search" button var searchButton = document.getElementById("SaveSearch"); if (searchButton) searchButton.removeAttribute("disabled", "false"); dump("doFind done.\n"); return(true);}
|
var methodNode = document.getElementById("method"); var method = methodNode.selectedItem.data; gMethodName = methodNode.selectedItem.value; dump("Method: " + method + "\n");
|
var methodNode = document.getElementById("method"); var method = methodNode.selectedItem.value; gMethodName = methodNode.selectedItem.label; dump("Method: " + method + "\n");
|
function doFind(){ gDatasourceName = ""; gMatchName = ""; gMethodName = ""; gTextName = ""; // get RDF datasource to query var datasourceNode = document.getElementById("datasource"); var dataSource = datasourceNode.selectedItem.data; gDataSourceName = datasourceNode.selectedItem.value; dump("Datasource: " + gDatasourceName + "\n"); // get match var matchNode = document.getElementById("match"); var match = matchNode.selectedItem.data; gMatchName = matchNode.selectedItem.value; dump("Match: " + gMatchName + "\n"); // get method var methodNode = document.getElementById("method"); var method = methodNode.selectedItem.data; gMethodName = methodNode.selectedItem.value; dump("Method: " + method + "\n"); // get user text to find var textNode = document.getElementById("findtext"); if (!textNode.value) return false; gTextName = textNode.value; dump("Find text: " + text + "\n"); // construct find URL var url = "find:datasource=" + datasource; url += "&match=" + match; url += "&method=" + method; url += "&text=" + text; dump("Find URL: " + url + "\n"); // load find URL into results pane var resultsTree = parent.frames[1].document.getElementById("findresultstree"); if (!resultsTree) return false; resultsTree.setAttribute("ref", url); // enable "Save Search" button var searchButton = document.getElementById("SaveSearch"); if (searchButton) searchButton.removeAttribute("disabled", "false"); dump("doFind done.\n"); return(true);}
|
var searchButton = document.getElementById("SaveSearch"); if (searchButton) searchButton.removeAttribute("disabled", "false");
|
var searchButton = document.getElementById("SaveSearch"); if (searchButton) searchButton.removeAttribute("disabled");
|
function doFind(){ gDatasourceName = ""; gMatchName = ""; gMethodName = ""; gTextName = ""; // get RDF datasource to query var datasourceNode = document.getElementById("datasource"); var dataSource = datasourceNode.selectedItem.data; gDataSourceName = datasourceNode.selectedItem.value; dump("Datasource: " + gDatasourceName + "\n"); // get match var matchNode = document.getElementById("match"); var match = matchNode.selectedItem.data; gMatchName = matchNode.selectedItem.value; dump("Match: " + gMatchName + "\n"); // get method var methodNode = document.getElementById("method"); var method = methodNode.selectedItem.data; gMethodName = methodNode.selectedItem.value; dump("Method: " + method + "\n"); // get user text to find var textNode = document.getElementById("findtext"); if (!textNode.value) return false; gTextName = textNode.value; dump("Find text: " + text + "\n"); // construct find URL var url = "find:datasource=" + datasource; url += "&match=" + match; url += "&method=" + method; url += "&text=" + text; dump("Find URL: " + url + "\n"); // load find URL into results pane var resultsTree = parent.frames[1].document.getElementById("findresultstree"); if (!resultsTree) return false; resultsTree.setAttribute("ref", url); // enable "Save Search" button var searchButton = document.getElementById("SaveSearch"); if (searchButton) searchButton.removeAttribute("disabled", "false"); dump("doFind done.\n"); return(true);}
|
&& aWalker.currentNode.id == this.mFindParams[0];
|
&& re.test(aWalker.currentNode.id);
|
doFindElementById: function(aWalker) { return aWalker.currentNode && "id" in aWalker.currentNode && aWalker.currentNode.id == this.mFindParams[0]; },
|
return aWalker.currentNode
|
var re = new RegExp(this.mFindParams[1], "i"); return aWalker.currentNode
|
doFindElementsByAttr: function(aWalker) { return aWalker.currentNode && aWalker.currentNode.nodeType == Node.ELEMENT_NODE && this.mFindParams[1] == "" ? aWalker.currentNode.hasAttribute(this.mFindParams[0]) : aWalker.currentNode.getAttribute(this.mFindParams[0]) == this.mFindParams[1]; },
|
&& this.mFindParams[1] == ""
|
&& (this.mFindParams[1] == ""
|
doFindElementsByAttr: function(aWalker) { return aWalker.currentNode && aWalker.currentNode.nodeType == Node.ELEMENT_NODE && this.mFindParams[1] == "" ? aWalker.currentNode.hasAttribute(this.mFindParams[0]) : aWalker.currentNode.getAttribute(this.mFindParams[0]) == this.mFindParams[1]; },
|
: aWalker.currentNode.getAttribute(this.mFindParams[0]) == this.mFindParams[1];
|
: re.test(aWalker.currentNode.getAttribute(this.mFindParams[0])));
|
doFindElementsByAttr: function(aWalker) { return aWalker.currentNode && aWalker.currentNode.nodeType == Node.ELEMENT_NODE && this.mFindParams[1] == "" ? aWalker.currentNode.hasAttribute(this.mFindParams[0]) : aWalker.currentNode.getAttribute(this.mFindParams[0]) == this.mFindParams[1]; },
|
&& aWalker.currentNode.localName.toLowerCase() == this.mFindParams[0].toLowerCase();
|
&& re.test(aWalker.currentNode.localName);
|
doFindElementsByTagName: function(aWalker) { return aWalker.currentNode && aWalker.currentNode.nodeType == Node.ELEMENT_NODE && aWalker.currentNode.localName.toLowerCase() == this.mFindParams[0].toLowerCase(); },
|
if (level > MAX_LEVEL) { try { log("Recursive reference to resource: " + resource.Value + "."); } catch (e) { log("Recursive reference to unknown resource."); } return; }
|
function doFindOnDatasource(resultsDS, sourceDS, resource, level) { // find all SUBHEADING children of current resource. var targets = sourceDS.GetTargets(resource, NC_SUBHEADINGS, true); while (targets.hasMoreElements()) { var target = targets.getNext(); target = target.QueryInterface(Components.interfaces.nsIRDFResource); // The first child of a rdf:subheading should (must) be a rdf:seq. // Should we test for a SEQ here? doFindOnSeq(resultsDS, sourceDS, target, level+1); } }
|
|
out.writeln("interface " + cur +";");
|
if(cur == MISSING_INTERFACE) out.writeln("/*\n * !!! Unable to find details for a declared "+ "interface (name unknown)!!!\n */"); else out.writeln("interface " + cur +";");
|
function doForwardDeclarations(out, iid){ var i, cur, prev; var list = []; appendForwardDeclarations(list, new IInfo(iid)); list.sort(); out.writeln("// forward declarations..."); for(i = 0; i < list.length; i++) { cur = list[i]; if(cur != prev && cur != "nsISupports") { out.writeln("interface " + cur +";"); prev = cur; } } out.writeln("");}
|
document.getElementById("nav-bar-contextual").hidden = !gFullScreen;
|
function DoFullScreen(){ gFullScreen = !gFullScreen; document.getElementById("nav-bar").hidden = gFullScreen; getBrowser().setStripVisibilityTo(!gFullScreen); window.fullScreen = gFullScreen; }
|
|
document.getElementById("nav-bar").hidden = gFullScreen;
|
document.getElementById("mini-toolbars").hidden = gFullScreen;
|
function DoFullScreen(){ gFullScreen = !gFullScreen; document.getElementById("nav-bar").hidden = gFullScreen; document.getElementById("browserleftbar").collapsed = gFullScreen; // Is this the simpler approach to count tabs? if(gBrowser.mPanelContainer.childNodes.length>1) { gBrowser.setStripVisibilityTo(!gFullScreen); } window.fullScreen = gFullScreen; }
|
openHelp("chrome:
|
openHelp("imagemap_properties");
|
function doHelpButton(){ openHelp("chrome://help/content/help.xul?imagemap_properties");}
|
openHelp("chrome:
|
openHelp("table_properties");
|
function doHelpButton(){ openHelp("chrome://help/content/help.xul?table_properties");}
|
var helpdoc;
|
function doHelpButton() { var tabControl = document.getElementById("tabbox"); switch (tabControl.selectedTab.id) { case "generalTab": helpdoc = "pageinfo_general"; break; case "formsTab": helpdoc = "pageinfo_forms"; break; case "linksTab": helpdoc = "pageinfo_links"; break; case "mediaTab": helpdoc = "pageinfo_media"; break; case "securityTab": helpdoc = "pageinfo_security"; break; case "p3pTab": helpdoc = "pageinfo_privacy"; break; default: helpdoc = "pageinfo_general"; break; } openHelp(helpdoc); }
|
|
openHelp("comp-doc-publish-site_settings");
|
openHelp("comp-doc-publish-site-settings");
|
function doHelpButton(){ openHelp("comp-doc-publish-site_settings");}
|
openHelp(gHelpURL + fm[subsrc]);
|
openHelp(fm[subsrc]);
|
function doHelpButton() { var subsrc = document.getElementById("panelFrame").getAttribute("src"); if ( fm[subsrc] ) { openHelp(gHelpURL + fm[subsrc]); } else { openHelp(gHelpURL + '?prefs'); }}
|
openHelp(gHelpURL + '?prefs');
|
openHelp('prefs');
|
function doHelpButton() { var subsrc = document.getElementById("panelFrame").getAttribute("src"); if ( fm[subsrc] ) { openHelp(gHelpURL + fm[subsrc]); } else { openHelp(gHelpURL + '?prefs'); }}
|
openHelp("chrome:
|
openHelp("publish_tab");
|
function doHelpButton(){ if (gCurrentPanel == gPublishPanel) openHelp("chrome://help/content/help.xul?publish_tab"); else openHelp("chrome://help/content/help.xul?settings_tab");}
|
openHelp("chrome:
|
openHelp("settings_tab");
|
function doHelpButton(){ if (gCurrentPanel == gPublishPanel) openHelp("chrome://help/content/help.xul?publish_tab"); else openHelp("chrome://help/content/help.xul?settings_tab");}
|
openHelp("chrome:
|
openHelp("link_properties");
|
function doHelpButton(){ openHelp("chrome://help/content/help.xul?link_properties"); return true;}
|
openHelp("chrome:
|
openHelp("image_properties");
|
function doHelpButton(){ openHelp("chrome://help/content/help.xul?image_properties"); return true;}
|
openHelp("chrome:
|
openHelp("site_settings");
|
function doHelpButton(){ openHelp("chrome://help/content/help.xul?site_settings");}
|
openHelp("chrome:
|
openHelp("advanced_property_editor");
|
function doHelpButton(){ openHelp("chrome://help/content/help.xul?advanced_property_editor"); return true;}
|
if (helpTag == "?mail") {
|
if (helpTag == "mail") {
|
function doHelpButton() { // Get the URI of the page loaded in the AccountManager's content frame. var pageSourceURI = document.getElementById("contentFrame").getAttribute("src"); // Get the help tag corresponding to the page loaded. var helpTag = pageTagPairs[pageSourceURI]; // If the help tag is generic, check if there is a need to set tags per server type if (helpTag == "?mail") { // Get server type, as we may need to set help tags per server type for some pages var serverType = GetServerType(); /** * Check the page to be loaded. Following pages needed to be presented with the * help content that is based on server type. For any pages with such requirement * do add comments here about the page and a new case statement for pageSourceURI * switch. * - server settings ("chrome://messenger/content/am-server.xul") * - offline/diskspace settings ("chrome://messenger/content/am-offline.xul") */ switch (pageSourceURI) { case "chrome://messenger/content/am-server.xul": helpTag = "?mail_server_" + serverType; break; case "chrome://messenger/content/am-offline.xul": helpTag = "?mail_offline_" + serverType; break; default : break; } } if ( helpTag ) openHelp(gHelpURL + helpTag); else openHelp(gHelpURL + '?mail'); }
|
helpTag = "?mail_server_" + serverType;
|
helpTag = "mail_server_" + serverType;
|
function doHelpButton() { // Get the URI of the page loaded in the AccountManager's content frame. var pageSourceURI = document.getElementById("contentFrame").getAttribute("src"); // Get the help tag corresponding to the page loaded. var helpTag = pageTagPairs[pageSourceURI]; // If the help tag is generic, check if there is a need to set tags per server type if (helpTag == "?mail") { // Get server type, as we may need to set help tags per server type for some pages var serverType = GetServerType(); /** * Check the page to be loaded. Following pages needed to be presented with the * help content that is based on server type. For any pages with such requirement * do add comments here about the page and a new case statement for pageSourceURI * switch. * - server settings ("chrome://messenger/content/am-server.xul") * - offline/diskspace settings ("chrome://messenger/content/am-offline.xul") */ switch (pageSourceURI) { case "chrome://messenger/content/am-server.xul": helpTag = "?mail_server_" + serverType; break; case "chrome://messenger/content/am-offline.xul": helpTag = "?mail_offline_" + serverType; break; default : break; } } if ( helpTag ) openHelp(gHelpURL + helpTag); else openHelp(gHelpURL + '?mail'); }
|
helpTag = "?mail_offline_" + serverType;
|
helpTag = "mail_offline_" + serverType;
|
function doHelpButton() { // Get the URI of the page loaded in the AccountManager's content frame. var pageSourceURI = document.getElementById("contentFrame").getAttribute("src"); // Get the help tag corresponding to the page loaded. var helpTag = pageTagPairs[pageSourceURI]; // If the help tag is generic, check if there is a need to set tags per server type if (helpTag == "?mail") { // Get server type, as we may need to set help tags per server type for some pages var serverType = GetServerType(); /** * Check the page to be loaded. Following pages needed to be presented with the * help content that is based on server type. For any pages with such requirement * do add comments here about the page and a new case statement for pageSourceURI * switch. * - server settings ("chrome://messenger/content/am-server.xul") * - offline/diskspace settings ("chrome://messenger/content/am-offline.xul") */ switch (pageSourceURI) { case "chrome://messenger/content/am-server.xul": helpTag = "?mail_server_" + serverType; break; case "chrome://messenger/content/am-offline.xul": helpTag = "?mail_offline_" + serverType; break; default : break; } } if ( helpTag ) openHelp(gHelpURL + helpTag); else openHelp(gHelpURL + '?mail'); }
|
openHelp(gHelpURL + helpTag);
|
openHelp(helpTag);
|
function doHelpButton() { // Get the URI of the page loaded in the AccountManager's content frame. var pageSourceURI = document.getElementById("contentFrame").getAttribute("src"); // Get the help tag corresponding to the page loaded. var helpTag = pageTagPairs[pageSourceURI]; // If the help tag is generic, check if there is a need to set tags per server type if (helpTag == "?mail") { // Get server type, as we may need to set help tags per server type for some pages var serverType = GetServerType(); /** * Check the page to be loaded. Following pages needed to be presented with the * help content that is based on server type. For any pages with such requirement * do add comments here about the page and a new case statement for pageSourceURI * switch. * - server settings ("chrome://messenger/content/am-server.xul") * - offline/diskspace settings ("chrome://messenger/content/am-offline.xul") */ switch (pageSourceURI) { case "chrome://messenger/content/am-server.xul": helpTag = "?mail_server_" + serverType; break; case "chrome://messenger/content/am-offline.xul": helpTag = "?mail_offline_" + serverType; break; default : break; } } if ( helpTag ) openHelp(gHelpURL + helpTag); else openHelp(gHelpURL + '?mail'); }
|
openHelp(gHelpURL + '?mail');
|
openHelp('mail');
|
function doHelpButton() { // Get the URI of the page loaded in the AccountManager's content frame. var pageSourceURI = document.getElementById("contentFrame").getAttribute("src"); // Get the help tag corresponding to the page loaded. var helpTag = pageTagPairs[pageSourceURI]; // If the help tag is generic, check if there is a need to set tags per server type if (helpTag == "?mail") { // Get server type, as we may need to set help tags per server type for some pages var serverType = GetServerType(); /** * Check the page to be loaded. Following pages needed to be presented with the * help content that is based on server type. For any pages with such requirement * do add comments here about the page and a new case statement for pageSourceURI * switch. * - server settings ("chrome://messenger/content/am-server.xul") * - offline/diskspace settings ("chrome://messenger/content/am-offline.xul") */ switch (pageSourceURI) { case "chrome://messenger/content/am-server.xul": helpTag = "?mail_server_" + serverType; break; case "chrome://messenger/content/am-offline.xul": helpTag = "?mail_offline_" + serverType; break; default : break; } } if ( helpTag ) openHelp(gHelpURL + helpTag); else openHelp(gHelpURL + '?mail'); }
|
var categoryList = document.getElementById( "categoryList" ); var categoryPopup = document.getElementById( "categoryPopup" ); if( categoryList && categoryPopup ) { var found = false; for( var i = 0; i < categoryPopup.childNodes.length; i++ ) { if( ( lastCategoryName == "" && categoryPopup.childNodes[i].getAttribute("data") == "NC:SearchEngineRoot" ) || ( categoryPopup.childNodes[i].getAttribute("id") == lastCategoryName ) ) { categoryList.selectedItem = categoryPopup.childNodes[i]; found = true; break; } } if (categoryPopup.childNodes.length > 0) { if (found == false) { categoryList.selectedItem = categoryPopup.childNodes[0]; } chooseCategory(categoryList.selectedItem); } }
|
var categoryList = document.getElementById( "categoryList" ); var categoryPopup = document.getElementById( "categoryPopup" ); if( categoryList && categoryPopup ) { var found = false; for( var i = 0; i < categoryPopup.childNodes.length; i++ ) { if( ( lastCategoryName == "" && categoryPopup.childNodes[i].getAttribute("value") == "NC:SearchEngineRoot" ) || ( categoryPopup.childNodes[i].getAttribute("id") == lastCategoryName ) ) { categoryList.selectedItem = categoryPopup.childNodes[i]; found = true; break; } } if (categoryPopup.childNodes.length > 0) { if (found == false) { categoryList.selectedItem = categoryPopup.childNodes[0]; } chooseCategory(categoryList.selectedItem); } }
|
function doLoad(){ doSetOKCancel(Commit); // adjust category popup var internetSearch = Components.classes["@mozilla.org/rdf/datasource;1?name=internetsearch"].getService(); if (internetSearch) internetSearch = internetSearch.QueryInterface(Components.interfaces.nsIInternetSearchService); if (internetSearch) { internetSearchDS = internetSearch.QueryInterface(Components.interfaces.nsIRDFDataSource); catDS = internetSearch.GetCategoryDataSource(); if (catDS) catDS = catDS.QueryInterface(Components.interfaces.nsIRDFDataSource); if (catDS) { var categoryList = document.getElementById("categoryList"); if (categoryList) { categoryList.database.AddDataSource(catDS); var ref = categoryList.getAttribute("ref"); if (ref) categoryList.setAttribute("ref", ref); } var engineList = document.getElementById("engineList"); if (engineList) { engineList.database.AddDataSource(catDS); } } } // try and determine last category name used var lastCategoryName = ""; try { var pref = Components.classes["@mozilla.org/preferences;1"].getService(); if (pref) pref = pref.QueryInterface( Components.interfaces.nsIPref ); if (pref) lastCategoryName = pref.CopyCharPref( "browser.search.last_search_category" ); if (lastCategoryName != "") { // strip off the prefix if necessary var prefix="NC:SearchCategory?category="; if (lastCategoryName.indexOf(prefix) == 0) { lastCategoryName = lastCategoryName.substr(prefix.length); } } } catch( e ) { debug("Exception in SearchPanelStartup\n"); lastCategoryName = ""; } debug("\nSearchPanelStartup: lastCategoryName = '" + lastCategoryName + "'\n"); // select the appropriate category var categoryList = document.getElementById( "categoryList" ); var categoryPopup = document.getElementById( "categoryPopup" ); if( categoryList && categoryPopup ) { var found = false; for( var i = 0; i < categoryPopup.childNodes.length; i++ ) { if( ( lastCategoryName == "" && categoryPopup.childNodes[i].getAttribute("data") == "NC:SearchEngineRoot" ) || ( categoryPopup.childNodes[i].getAttribute("id") == lastCategoryName ) ) { categoryList.selectedItem = categoryPopup.childNodes[i]; found = true; break; } } if (categoryPopup.childNodes.length > 0) { if (found == false) { categoryList.selectedItem = categoryPopup.childNodes[0]; } chooseCategory(categoryList.selectedItem); } }}
|
var pref = Components.classes["@mozilla.org/preferences;1"].getService(); if (pref) pref = pref.QueryInterface( Components.interfaces.nsIPref ); if (pref) lastCategoryName = pref.CopyCharPref( "browser.search.last_search_category" );
|
var pref = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); lastCategoryName = pref.getCharPref( "browser.search.last_search_category" );
|
function doLoad(){ doSetOKCancel(Commit); // adjust category popup var internetSearch = Components.classes["@mozilla.org/rdf/datasource;1?name=internetsearch"].getService(); if (internetSearch) internetSearch = internetSearch.QueryInterface(Components.interfaces.nsIInternetSearchService); if (internetSearch) { internetSearchDS = internetSearch.QueryInterface(Components.interfaces.nsIRDFDataSource); catDS = internetSearch.GetCategoryDataSource(); if (catDS) catDS = catDS.QueryInterface(Components.interfaces.nsIRDFDataSource); if (catDS) { var categoryList = document.getElementById("categoryList"); if (categoryList) { categoryList.database.AddDataSource(catDS); var ref = categoryList.getAttribute("ref"); if (ref) categoryList.setAttribute("ref", ref); } var engineList = document.getElementById("engineList"); if (engineList) { engineList.database.AddDataSource(catDS); } } } // try and determine last category name used var lastCategoryName = ""; try { var pref = Components.classes["@mozilla.org/preferences;1"].getService(); if (pref) pref = pref.QueryInterface( Components.interfaces.nsIPref ); if (pref) lastCategoryName = pref.CopyCharPref( "browser.search.last_search_category" ); if (lastCategoryName != "") { // strip off the prefix if necessary var prefix="NC:SearchCategory?category="; if (lastCategoryName.indexOf(prefix) == 0) { lastCategoryName = lastCategoryName.substr(prefix.length); } } } catch( e ) { debug("Exception in SearchPanelStartup\n"); lastCategoryName = ""; } debug("\nSearchPanelStartup: lastCategoryName = '" + lastCategoryName + "'\n"); // select the appropriate category var categoryList = document.getElementById( "categoryList" ); var categoryPopup = document.getElementById( "categoryPopup" ); if( categoryList && categoryPopup ) { var found = false; for( var i = 0; i < categoryPopup.childNodes.length; i++ ) { if( ( lastCategoryName == "" && categoryPopup.childNodes[i].getAttribute("value") == "NC:SearchEngineRoot" ) || ( categoryPopup.childNodes[i].getAttribute("id") == lastCategoryName ) ) { categoryList.selectedItem = categoryPopup.childNodes[i]; found = true; break; } } if (categoryPopup.childNodes.length > 0) { if (found == false) { categoryList.selectedItem = categoryPopup.childNodes[0]; } chooseCategory(categoryList.selectedItem); } }}
|
window.close();
|
return true;
|
function doLoadDevice(){ var name_box = document.getElementById("device_name"); var path_box = document.getElementById("device_path"); pkcs11.addmodule(name_box.value, path_box.value, 0,0); window.close();}
|
window.sizeToContent();
|
function doLoadForEmailCert(){ var dbkey = self.name; // Get the cert from the cert database certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB); cert = certdb.findCertByDBKey(dbkey, null); var bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties"); var windowReference = document.getElementById('editEmailCert'); var message1 = bundle.formatStringFromName("editTrustEmail", [ cert.commonName ], 1); setText("certmsg", message1); setText("issuer", cert.issuerName); var cacert = getCaCertForEntityCert(cert); if(cacert == null) { setText("explainations",bundle.GetStringFromName("issuerNotKnown")); } else if(certdb.isCertTrusted(cacert, nsIX509Cert.CA_CERT, nsIX509CertDB.TRUSTED_EMAIL)) { setText("explainations",bundle.GetStringFromName("issuerTrusted")); } else { setText("explainations",bundle.GetStringFromName("issuerNotTrusted")); }/* if(cacert == null) { var editButton = document.getElementById('editca-button'); editButton.setAttribute("disabled","true"); }*/ var trustemail = document.getElementById("trustEmailCert"); var notrustemail = document.getElementById("dontTrustEmailCert"); if (certdb.isCertTrusted(cert, nsIX509Cert.EMAIL_CERT, nsIX509CertDB.TRUSTED_EMAIL)) { trustemail.radioGroup.selectedItem = trustemail; } else { trustemail.radioGroup.selectedItem = notrustemail; } window.sizeToContent();}
|
|
window.sizeToContent();
|
function doLoadForSSLCert(){ var dbkey = self.name; // Get the cert from the cert database certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB); cert = certdb.findCertByDBKey(dbkey, null); var bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties"); var windowReference = document.getElementById('editWebsiteCert'); var message1 = bundle.formatStringFromName("editTrustSSL", [ cert.commonName ], 1); setText("certmsg", message1); setText("issuer", cert.issuerName); var cacert = getCaCertForEntityCert(cert); if(cacert == null) { setText("explainations",bundle.GetStringFromName("issuerNotKnown")); } else if(certdb.isCertTrusted(cacert, nsIX509Cert.CA_CERT, nsIX509CertDB.TRUSTED_SSL)) { setText("explainations",bundle.GetStringFromName("issuerTrusted")); } else { setText("explainations",bundle.GetStringFromName("issuerNotTrusted")); }/* if(cacert == null) { var editButton = document.getElementById('editca-button'); editButton.setAttribute("disabled","true"); }*/ var trustssl = document.getElementById("trustSSLCert"); var notrustssl = document.getElementById("dontTrustSSLCert"); if (certdb.isCertTrusted(cert, nsIX509Cert.SERVER_CERT, nsIX509CertDB.TRUSTED_SSL)) { trustssl.radioGroup.selectedItem = trustssl; } else { trustssl.radioGroup.selectedItem = notrustssl; } window.sizeToContent();}
|
|
var xulWindow = document.getElementById("editSSLCert"); var wdth = window.innerWidth; window.sizeToContent(); xulWindow.setAttribute("width",window.innerWidth + 30); var hght = window.innerHeight; window.sizeToContent(); xulWindow.setAttribute("height",window.innerHeight + 70);
|
function doLoadForSSLCert(){ var dbkey = self.name; // Get the cert from the cert database certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB); cert = certdb.getCertByDBKey(dbkey, null); var bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties"); var windowReference = document.getElementById('editSSLCert'); windowReference.setAttribute("title", bundle.GetStringFromName("editTrustWindowTitle")); var message1 = bundle.formatStringFromName("editTrustSSL", [ cert.commonName ], 1); setText("certmsg", message1); setText("issuer", cert.issuerName); var trustssl = document.getElementById("trustSSLCert"); var notrustssl = document.getElementById("dontTrustSSLCert"); if (certdb.getCertTrust(cert, nsIX509Cert.SERVER_CERT, nsIX509CertDB.TRUSTED_SSL)) { trustssl.setAttribute("checked", "true"); } else { notrustssl.setAttribute("checked", "true"); }}
|
|
windowReference.setAttribute("title", bundle.GetStringFromName("editTrustWindowTitle"));
|
function doLoadForSSLCert(){ var dbkey = self.name; // Get the cert from the cert database certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB); cert = certdb.getCertByDBKey(dbkey, null); var bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties"); var windowReference = document.getElementById('editSSLCert'); windowReference.setAttribute("title", bundle.GetStringFromName("editTrustWindowTitle")); var message1 = bundle.formatStringFromName("editTrustSSL", [ cert.commonName ], 1); setText("certmsg", message1); setText("issuer", cert.issuerName); var cacert = getCaCertForServerCert(cert); if(cacert == null) { setText("explainations",bundle.GetStringFromName("issuerNotKnown")); } else if(certdb.getCertTrust(cacert, nsIX509Cert.CA_CERT, nsIX509CertDB.TRUSTED_SSL)) { setText("explainations",bundle.GetStringFromName("issuerTrusted")); } else { setText("explainations",bundle.GetStringFromName("issuerNotTrusted")); }/* if(cacert == null) { var editButton = document.getElementById('editca-button'); editButton.setAttribute("disabled","true"); }*/ var trustssl = document.getElementById("trustSSLCert"); var notrustssl = document.getElementById("dontTrustSSLCert"); if (certdb.getCertTrust(cert, nsIX509Cert.SERVER_CERT, nsIX509CertDB.TRUSTED_SSL)) { trustssl.setAttribute("checked", "true"); } else { notrustssl.setAttribute("checked", "true"); } var xulWindow = document.getElementById("editSSLCert"); var wdth = window.innerWidth; // THIS IS NEEDED, window.sizeToContent(); xulWindow.setAttribute("width",window.innerWidth + 30); var hght = window.innerHeight; // THIS IS NEEDED, window.sizeToContent(); xulWindow.setAttribute("height",window.innerHeight + 70);}
|
|
var pref_string = obj.domain_pref.getAttribute('value');
|
var pref_string = obj.domain_pref.getAttribute('label');
|
function DomainAlreadyPresent(obj, domain_name, dup){ var errorTitle; var errorMsg; var pref_string = obj.domain_pref.getAttribute('value'); var found = false; try { var arrayOfPrefs = pref_string.split(','); if (arrayOfPrefs) for (var i = 0; i < arrayOfPrefs.length; i++) { var str = arrayOfPrefs[i].replace(/ /g,""); if (str == domain_name) { dump("###ERROR DOMAIN ALREADY EXISTS\n"); errorTitle = document.getElementById("domainerrdlg").getAttribute("domainerrdlg_title"); if(dup) errorMsg = document.getElementById("domainerrdlg").getAttribute("duperr"); else errorMsg = document.getElementById("domainerrdlg").getAttribute("dualerr"); var errorMessage = errorMsg.replace(/@string@/, domain_name); if (commonDialogsService) commonDialogsService.Alert(window, errorTitle, errorMessage); else window.alert(errorMessage); found = true; break; }//if }//for return found; }//try catch(ex){ return false; }//catch}
|
var pref = Components.classes["@mozilla.org/preferences;1"]; if (pref) pref = pref.getService(); if (pref) pref = pref.QueryInterface(Components.interfaces.nsIPref); if (pref) { var sDomainList = pref.CopyCharPref("browser.related.disabledForDomains"); if ((sDomainList) && (sDomainList != "")) {
|
var pref = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch);
|
function DomainInSkipList(sDomain){ var bSkipDomainFlag = false; if ('/' == sDomain[sDomain.length - 1]) { sDomain = sDomain.substring(0, sDomain.length - 1); } try { var pref = Components.classes["@mozilla.org/preferences;1"]; if (pref) pref = pref.getService(); if (pref) pref = pref.QueryInterface(Components.interfaces.nsIPref); if (pref) { var sDomainList = pref.CopyCharPref("browser.related.disabledForDomains"); if ((sDomainList) && (sDomainList != "")) { var aDomains = sDomainList.split(","); // split on commas for (var x=0; x < aDomains.length; x++) { var sDomainCopy = sDomain; var sTestDomain = aDomains[x]; if ('*' == sTestDomain[0]) { // wildcard match // strip off the asterisk sTestDomain = sTestDomain.substring(1); if (sDomainCopy.length > sTestDomain.length) { var sDomainIndex = sDomain.length - sTestDomain.length; sDomainCopy = sDomainCopy.substring(sDomainIndex); } } if (0 == sDomainCopy.lastIndexOf(sTestDomain)) { bSkipDomainFlag = true; break; } } } } } catch(ex) { } return(bSkipDomainFlag);}
|
var aDomains = sDomainList.split(",");
|
var sDomainList = pref.getCharPref("browser.related.disabledForDomains"); if ((sDomainList) && (sDomainList != "")) {
|
function DomainInSkipList(sDomain){ var bSkipDomainFlag = false; if ('/' == sDomain[sDomain.length - 1]) { sDomain = sDomain.substring(0, sDomain.length - 1); } try { var pref = Components.classes["@mozilla.org/preferences;1"]; if (pref) pref = pref.getService(); if (pref) pref = pref.QueryInterface(Components.interfaces.nsIPref); if (pref) { var sDomainList = pref.CopyCharPref("browser.related.disabledForDomains"); if ((sDomainList) && (sDomainList != "")) { var aDomains = sDomainList.split(","); // split on commas for (var x=0; x < aDomains.length; x++) { var sDomainCopy = sDomain; var sTestDomain = aDomains[x]; if ('*' == sTestDomain[0]) { // wildcard match // strip off the asterisk sTestDomain = sTestDomain.substring(1); if (sDomainCopy.length > sTestDomain.length) { var sDomainIndex = sDomain.length - sTestDomain.length; sDomainCopy = sDomainCopy.substring(sDomainIndex); } } if (0 == sDomainCopy.lastIndexOf(sTestDomain)) { bSkipDomainFlag = true; break; } } } } } catch(ex) { } return(bSkipDomainFlag);}
|
for (var x=0; x < aDomains.length; x++) { var sDomainCopy = sDomain;
|
var aDomains = sDomainList.split(",");
|
function DomainInSkipList(sDomain){ var bSkipDomainFlag = false; if ('/' == sDomain[sDomain.length - 1]) { sDomain = sDomain.substring(0, sDomain.length - 1); } try { var pref = Components.classes["@mozilla.org/preferences;1"]; if (pref) pref = pref.getService(); if (pref) pref = pref.QueryInterface(Components.interfaces.nsIPref); if (pref) { var sDomainList = pref.CopyCharPref("browser.related.disabledForDomains"); if ((sDomainList) && (sDomainList != "")) { var aDomains = sDomainList.split(","); // split on commas for (var x=0; x < aDomains.length; x++) { var sDomainCopy = sDomain; var sTestDomain = aDomains[x]; if ('*' == sTestDomain[0]) { // wildcard match // strip off the asterisk sTestDomain = sTestDomain.substring(1); if (sDomainCopy.length > sTestDomain.length) { var sDomainIndex = sDomain.length - sTestDomain.length; sDomainCopy = sDomainCopy.substring(sDomainIndex); } } if (0 == sDomainCopy.lastIndexOf(sTestDomain)) { bSkipDomainFlag = true; break; } } } } } catch(ex) { } return(bSkipDomainFlag);}
|
var sTestDomain = aDomains[x];
|
for (var x=0; x < aDomains.length; x++) { var sDomainCopy = sDomain;
|
function DomainInSkipList(sDomain){ var bSkipDomainFlag = false; if ('/' == sDomain[sDomain.length - 1]) { sDomain = sDomain.substring(0, sDomain.length - 1); } try { var pref = Components.classes["@mozilla.org/preferences;1"]; if (pref) pref = pref.getService(); if (pref) pref = pref.QueryInterface(Components.interfaces.nsIPref); if (pref) { var sDomainList = pref.CopyCharPref("browser.related.disabledForDomains"); if ((sDomainList) && (sDomainList != "")) { var aDomains = sDomainList.split(","); // split on commas for (var x=0; x < aDomains.length; x++) { var sDomainCopy = sDomain; var sTestDomain = aDomains[x]; if ('*' == sTestDomain[0]) { // wildcard match // strip off the asterisk sTestDomain = sTestDomain.substring(1); if (sDomainCopy.length > sTestDomain.length) { var sDomainIndex = sDomain.length - sTestDomain.length; sDomainCopy = sDomainCopy.substring(sDomainIndex); } } if (0 == sDomainCopy.lastIndexOf(sTestDomain)) { bSkipDomainFlag = true; break; } } } } } catch(ex) { } return(bSkipDomainFlag);}
|
if ('*' == sTestDomain[0]) {
|
var sTestDomain = aDomains[x];
|
function DomainInSkipList(sDomain){ var bSkipDomainFlag = false; if ('/' == sDomain[sDomain.length - 1]) { sDomain = sDomain.substring(0, sDomain.length - 1); } try { var pref = Components.classes["@mozilla.org/preferences;1"]; if (pref) pref = pref.getService(); if (pref) pref = pref.QueryInterface(Components.interfaces.nsIPref); if (pref) { var sDomainList = pref.CopyCharPref("browser.related.disabledForDomains"); if ((sDomainList) && (sDomainList != "")) { var aDomains = sDomainList.split(","); // split on commas for (var x=0; x < aDomains.length; x++) { var sDomainCopy = sDomain; var sTestDomain = aDomains[x]; if ('*' == sTestDomain[0]) { // wildcard match // strip off the asterisk sTestDomain = sTestDomain.substring(1); if (sDomainCopy.length > sTestDomain.length) { var sDomainIndex = sDomain.length - sTestDomain.length; sDomainCopy = sDomainCopy.substring(sDomainIndex); } } if (0 == sDomainCopy.lastIndexOf(sTestDomain)) { bSkipDomainFlag = true; break; } } } } } catch(ex) { } return(bSkipDomainFlag);}
|
sTestDomain = sTestDomain.substring(1); if (sDomainCopy.length > sTestDomain.length) { var sDomainIndex = sDomain.length - sTestDomain.length; sDomainCopy = sDomainCopy.substring(sDomainIndex); }
|
if ('*' == sTestDomain[0]) { sTestDomain = sTestDomain.substring(1); if (sDomainCopy.length > sTestDomain.length) { var sDomainIndex = sDomain.length - sTestDomain.length; sDomainCopy = sDomainCopy.substring(sDomainIndex);
|
function DomainInSkipList(sDomain){ var bSkipDomainFlag = false; if ('/' == sDomain[sDomain.length - 1]) { sDomain = sDomain.substring(0, sDomain.length - 1); } try { var pref = Components.classes["@mozilla.org/preferences;1"]; if (pref) pref = pref.getService(); if (pref) pref = pref.QueryInterface(Components.interfaces.nsIPref); if (pref) { var sDomainList = pref.CopyCharPref("browser.related.disabledForDomains"); if ((sDomainList) && (sDomainList != "")) { var aDomains = sDomainList.split(","); // split on commas for (var x=0; x < aDomains.length; x++) { var sDomainCopy = sDomain; var sTestDomain = aDomains[x]; if ('*' == sTestDomain[0]) { // wildcard match // strip off the asterisk sTestDomain = sTestDomain.substring(1); if (sDomainCopy.length > sTestDomain.length) { var sDomainIndex = sDomain.length - sTestDomain.length; sDomainCopy = sDomainCopy.substring(sDomainIndex); } } if (0 == sDomainCopy.lastIndexOf(sTestDomain)) { bSkipDomainFlag = true; break; } } } } } catch(ex) { } return(bSkipDomainFlag);}
|
bSkipDomainFlag = true; break; }
|
bSkipDomainFlag = true; break;
|
function DomainInSkipList(sDomain){ var bSkipDomainFlag = false; if ('/' == sDomain[sDomain.length - 1]) { sDomain = sDomain.substring(0, sDomain.length - 1); } try { var pref = Components.classes["@mozilla.org/preferences;1"]; if (pref) pref = pref.getService(); if (pref) pref = pref.QueryInterface(Components.interfaces.nsIPref); if (pref) { var sDomainList = pref.CopyCharPref("browser.related.disabledForDomains"); if ((sDomainList) && (sDomainList != "")) { var aDomains = sDomainList.split(","); // split on commas for (var x=0; x < aDomains.length; x++) { var sDomainCopy = sDomain; var sTestDomain = aDomains[x]; if ('*' == sTestDomain[0]) { // wildcard match // strip off the asterisk sTestDomain = sTestDomain.substring(1); if (sDomainCopy.length > sTestDomain.length) { var sDomainIndex = sDomain.length - sTestDomain.length; sDomainCopy = sDomainCopy.substring(sDomainIndex); } } if (0 == sDomainCopy.lastIndexOf(sTestDomain)) { bSkipDomainFlag = true; break; } } } } } catch(ex) { } return(bSkipDomainFlag);}
|
dialog.tempLabel.setAttribute("hidden", "true"); dialog.progress.setAttribute("hidden", "false"); dialog.cancel.setAttribute("disabled", "false"); var progressLabel = getString("progress"); if (progressLabel == "") { progressLabel = "Progress:"; }
|
function doneIniting() { dialog.tempLabel.setAttribute("hidden", "true"); dialog.progress.setAttribute("hidden", "false"); dialog.cancel.setAttribute("disabled", "false"); var progressLabel = getString("progress"); if (progressLabel == "") { progressLabel = "Progress:"; // better than nothing } //dialog.progressLabel.value = progressLabel; printProgress.doneIniting();}
|
|
nsILayoutRegressionTester.COMPARE_FLAGS_BRIEF)
|
nsILayoutRegressionTester.COMPARE_FLAGS_VERBOSE)
|
doneURL : function() { var basename = new String(this.mCurrentURL.relurl); basename = basename.replace(":", ""); basename = basename.replace("/", "_"); basename = basename.replace(".", "_"); basename = basename.replace("?", "_"); basename = basename.replace("&", "_"); basename += ".rgd"; var data = this.mCurrentURL.dir.clone(); data.append( this.mIsBaseline ? "baseline" : "verify"); data.append(basename); dump("Writing regression data to " + data.QueryInterface(nsILocalFile).persistentDescriptor + "\n"); this.mRegressionTester.dumpFrameModel(gBrowser.contentWindow, data, nsILayoutRegressionTester.DUMP_FLAGS_MASK_DUMP_STYLE); if (!this.mIsBaseline) { var base_data = this.mCurrentURL.dir.clone(); base_data.append("baseline"); base_data.append(basename); dump("Comparing to regression data from " + base_data.QueryInterface(nsILocalFile).persistentDescriptor + "\n"); var filesDiffer = this.mRegressionTester.compareFrameModels(base_data, data, nsILayoutRegressionTester.COMPARE_FLAGS_BRIEF) dump("Comparison for " + this.mCurrentURL.url + " " + (filesDiffer ? "failed" : "passed") + "."); } this.mCurrentURL = null; this.startURL(); },
|
this.mRegressionTester.dumpFrameModel(gBrowser.contentWindow, data, nsILayoutRegressionTester.DUMP_FLAGS_MASK_DUMP_STYLE);
|
if (this.mIsPrinting) { this.mRegressionTester.dumpFrameModel(gBrowser.contentWindow, data, nsILayoutRegressionTester.DUMP_FLAGS_MASK_PRINT_MODE); } else { this.mRegressionTester.dumpFrameModel(gBrowser.contentWindow, data, nsILayoutRegressionTester.DUMP_FLAGS_MASK_DUMP_STYLE); }
|
doneURL : function() { var basename = String(this.mCurrentURL.relurl).replace(/[:=&.\/?]/g, "_") + ".rgd"; var data = this.mCurrentURL.dir.clone(); data.append( this.mIsBaseline ? "baseline" : "verify"); if (!data.exists()) data.create(nsIFile.DIRECTORY_TYPE, 0777) data.append(basename); dump("Writing regression data to " + data.QueryInterface(nsILocalFile).persistentDescriptor + "\n"); this.mRegressionTester.dumpFrameModel(gBrowser.contentWindow, data, nsILayoutRegressionTester.DUMP_FLAGS_MASK_DUMP_STYLE); if (!this.mIsBaseline) { var base_data = this.mCurrentURL.dir.clone(); base_data.append("baseline"); base_data.append(basename); dump("Comparing to regression data from " + base_data.QueryInterface(nsILocalFile).persistentDescriptor + "\n"); var filesDiffer = this.mRegressionTester.compareFrameModels(base_data, data, nsILayoutRegressionTester.COMPARE_FLAGS_BRIEF) dump("Comparison for " + this.mCurrentURL.url + " " + (filesDiffer ? "failed" : "passed") + ".\n"); } this.mCurrentURL = null; this.startURL(); },
|
nsILayoutRegressionTester.COMPARE_FLAGS_VERBOSE)
|
nsILayoutRegressionTester.COMPARE_FLAGS_BRIEF)
|
doneURL : function() { var basename = String(this.mCurrentURL.relurl).replace(/[:=&.\/?]/g, "_") + ".rgd"; var data = this.mCurrentURL.dir.clone(); data.append( this.mIsBaseline ? "baseline" : "verify"); if (!data.exists()) data.create(nsIFile.DIRECTORY_TYPE, 0777) data.append(basename); dump("Writing regression data to " + data.QueryInterface(nsILocalFile).persistentDescriptor + "\n"); this.mRegressionTester.dumpFrameModel(gBrowser.contentWindow, data, nsILayoutRegressionTester.DUMP_FLAGS_MASK_DUMP_STYLE); if (!this.mIsBaseline) { var base_data = this.mCurrentURL.dir.clone(); base_data.append("baseline"); base_data.append(basename); dump("Comparing to regression data from " + base_data.QueryInterface(nsILocalFile).persistentDescriptor + "\n"); var filesDiffer = this.mRegressionTester.compareFrameModels(base_data, data, nsILayoutRegressionTester.COMPARE_FLAGS_VERBOSE) dump("Comparison for " + this.mCurrentURL.url + " " + (filesDiffer ? "failed" : "passed") + ".\n"); } this.mCurrentURL = null; this.startURL(); },
|
gBrowser.hideMessage(gBrowser.selectedBrowser, "top");
|
gBrowser.hideMessage(null, "top");
|
dontShowMessage: function () { var showMessage = gPrefService.getBoolPref("privacy.popups.showBrowserMessage"); var firstTime = gPrefService.getBoolPref("privacy.popups.firstTime"); // If the info message is showing at the top of the window, and the user has never // hidden the message before, show an info box telling the user where the info // will be displayed. if (showMessage && firstTime) this._displayPageReportFirstTime(); gPrefService.setBoolPref("privacy.popups.showBrowserMessage", !showMessage); gBrowser.hideMessage(gBrowser.selectedBrowser, "top"); },
|
certdb.deleteCertificate(certs[i]);
|
if (certs[i]) { certdb.deleteCertificate(certs[i]); certs[i] = null; }
|
function doOK(){ for(var i=0;i<certs.length;i++) { certdb.deleteCertificate(certs[i]); } window.close();}
|
var trustssl = (ssl.checked) ? 1 : 0; var trustemail = (email.checked) ? 2 : 0; var trustobjsign = (objsign.checked) ? 4 : 0;
|
var trustssl = (ssl.checked) ? nsIX509CertDB.TRUSTED_SSL : 0; var trustemail = (email.checked) ? nsIX509CertDB.TRUSTED_EMAIL : 0; var trustobjsign = (objsign.checked) ? nsIX509CertDB.TRUSTED_OBJSIGN : 0;
|
function doOK(){ var ssl = document.getElementById("trustSSL"); var email = document.getElementById("trustEmail"); var objsign = document.getElementById("trustObjSign"); // clean this up var trustssl = (ssl.checked) ? 1 : 0; var trustemail = (email.checked) ? 2 : 0; var trustobjsign = (objsign.checked) ? 4 : 0; // // Set the cert trust // certdb.setCertTrust(cert, 1, trustssl | trustemail | trustobjsign); window.close();}
|
certdb.setCertTrust(cert, 1, trustssl | trustemail | trustobjsign);
|
certdb.setCertTrust(cert, nsIX509Cert.CA_CERT, trustssl | trustemail | trustobjsign);
|
function doOK(){ var ssl = document.getElementById("trustSSL"); var email = document.getElementById("trustEmail"); var objsign = document.getElementById("trustObjSign"); // clean this up var trustssl = (ssl.checked) ? 1 : 0; var trustemail = (email.checked) ? 2 : 0; var trustobjsign = (objsign.checked) ? 4 : 0; // // Set the cert trust // certdb.setCertTrust(cert, 1, trustssl | trustemail | trustobjsign); window.close();}
|
window.close();
|
return true;
|
function doOK(){ var ssl = document.getElementById("trustSSL"); var email = document.getElementById("trustEmail"); var objsign = document.getElementById("trustObjSign"); var trustssl = (ssl.checked) ? nsIX509CertDB.TRUSTED_SSL : 0; var trustemail = (email.checked) ? nsIX509CertDB.TRUSTED_EMAIL : 0; var trustobjsign = (objsign.checked) ? nsIX509CertDB.TRUSTED_OBJSIGN : 0; // // Set the cert trust // certdb.setCertTrust(cert, nsIX509Cert.CA_CERT, trustssl | trustemail | trustobjsign); window.close();}
|
window.close();
|
return true;
|
function doOK(){ dialogParams.SetInt(1,1); window.close();}
|
var alwaysAccept = checkbox.getAttribute("checked");
|
function doOK(){ dialogParams.SetInt(1,1); var checkbox = document.getElementById("alwaysAccept"); var alwaysAccept = checkbox.getAttribute("checked"); dialogParams.SetInt(2, (alwaysAccept ? 0 : 1)); window.close();}
|
|
dialogParams.SetInt(2, (alwaysAccept ? 0 : 1));
|
dialogParams.SetInt(2, !checkbox.checked);
|
function doOK(){ dialogParams.SetInt(1,1); var checkbox = document.getElementById("alwaysAccept"); var alwaysAccept = checkbox.getAttribute("checked"); dialogParams.SetInt(2, (alwaysAccept ? 0 : 1)); window.close();}
|
window.close();
|
return true;
|
function doOK(){ dialogParams.SetInt(0,1); var index = parseInt(document.getElementById("nicknames").value); dialogParams.SetInt(1, index); window.close();}
|
window.close();
|
return true;
|
function doOK(){ var checkSSL = document.getElementById("trustSSL"); var checkEmail = document.getElementById("trustEmail"); var checkObjSign = document.getElementById("trustObjSign"); if (checkSSL.checked) params.SetInt(2,1); else params.SetInt(2,0); if (checkEmail.checked) params.SetInt(3,1); else params.SetInt(3,0); if (checkObjSign.checked) params.SetInt(4,1); else params.SetInt(4,0); params.SetInt(1,1); window.close();}
|
dialogParams.SetInt(1,1); dialogParams.SetString(1, token);
|
dialogParams.SetInt(0,1); dialogParams.SetString(0, token);
|
function doOK(){ var tokenList = document.getElementById("tokens"); var token = tokenList.value; dialogParams.SetInt(1,1); dialogParams.SetString(1, token); window.close();}
|
dialogParams.SetInt(1,1);
|
dialogParams.SetInt(0,1);
|
function doOK(){ dialogParams.SetInt(1,1); var index = parseInt(document.getElementById("nicknames").value); dialogParams.SetInt(2, index); window.close();}
|
dialogParams.SetInt(2, index);
|
dialogParams.SetInt(1, index);
|
function doOK(){ dialogParams.SetInt(1,1); var index = parseInt(document.getElementById("nicknames").value); dialogParams.SetInt(2, index); window.close();}
|
return true;
|
function doOK(){ var selectedID = document.getElementById("whatnow").selectedItem.id; if (selectedID == "refuse") { dialogParams.SetInt(1,0); } else { dialogParams.SetInt(1,1); // 0 = accept perm, 1 = accept for this session var userchoice = 1; if (selectedID == "remember") { userchoice = 0; } dialogParams.SetInt(2, userchoice); }}
|
|
window.close();
|
return true;
|
function doOK() { // Save the prefs try { // Enumerate each checkbox on this page and save the value var prefElements = document.getElementsByAttribute("prefstring", "*"); for (var i = 0; i < prefElements.length; i++) { var element = prefElements[i]; var prefString = element.getAttribute("prefstring"); var prefValue = element.getAttribute("checked"); if (typeof(prefValue) == "string") { prefValue = (prefValue == "true"); } gPrefBranch.setBoolPref(prefString, prefValue); } gPrefService.savePrefFile(null); } catch(e) { } window.close();}
|
window.close();
|
return true;
|
function doOK(){ dialogParams.SetInt(0, 1); var index = parseInt(document.getElementById("nicknames").value); dialogParams.SetInt(1, index); var password = document.getElementById("pw").value; dialogParams.SetString(0, password); window.close();}
|
window.close();
|
return true;
|
function doOK(){ var tokenList = document.getElementById("tokens"); var token = tokenList.value; dialogParams.SetInt(0,1); dialogParams.SetString(0, token); window.close();}
|
window.close();
|
return true;
|
function doOK(){ // On returning our param list will contain keys of those certs that were deleted. // It will contain empty strings for those certs that are still alive. for(var i=0;i<certs.length;i++) { if (certs[i]) { try { certdb.deleteCertificate(certs[i]); } catch (e) { gParams.SetString(i+1, ""); } certs[i] = null; } } gParams.SetInt(1, 1); // means OK window.close();}
|
if ( close )
|
if (close && top)
|
function doOKButton(){ var v = document.commandDispatcher.focusedElement; if (v && v.localName.toLowerCase() == 'textarea') return; var close = true; if ( doOKFunction ) close = doOKFunction(); if ( close ) top.window.close();}
|
if ("doAllowWindowOpen" in window)
|
if ("onCheckboxCheck" in window)
|
function doOnOk(){ //If a user makes a change to this panel, goes to another panel, and returns to this panel to //make another change, then we cannot use data[elementName]. This is because data[elementName] //contains the original xul change and we would loose the new change. Thus we track all changes //by using getElementById. //The nested functions are needed because doOnOk cannot access anything outside of its scope //when it is called function getCheckboxValue(name){ if ("doAllowWindowOpen" in window) return document.getElementById(name).checked; return data[name].checked; } function setCapabilityPolicy(prefName, checkboxValue){ //If checked, we allow the script to do task, so we clear the pref. //since some options are made up of multiple capability policies and users can turn //individual ones on/off via prefs.js, it can happen that we clear a nonexistent pref if (checkboxValue){ try { parent.hPrefWindow.pref.ClearUserPref(prefName); } catch (e) {} } else { parent.hPrefWindow.setPref("string", prefName, "noAccess"); } } var data = parent.hPrefWindow.wsm.dataManager.pageData["chrome://communicator/content/pref/pref-scripts.xul"]; if (data.scriptData["allowWindowOpenChanged"].value){ parent.hPrefWindow.setPref("bool", "dom.disable_open_during_load", !getCheckboxValue('allowWindowOpen')); } if (data.scriptData["allowTargetNewChanged"].value){ parent.hPrefWindow.setPref("bool", "browser.block.target_new_window", !getCheckboxValue('allowTargetNew')); } if (data.scriptData["allowWindowMoveResizeChanged"].value){ var allowWindowMoveResize = getCheckboxValue("allowWindowMoveResize"); setCapabilityPolicy("capability.policy.default.Window.resizeTo", allowWindowMoveResize); setCapabilityPolicy("capability.policy.default.Window.innerWidth.set", allowWindowMoveResize); setCapabilityPolicy("capability.policy.default.Window.innerHeight.set", allowWindowMoveResize); setCapabilityPolicy("capability.policy.default.Window.outerWidth.set", allowWindowMoveResize); setCapabilityPolicy("capability.policy.default.Window.outerHeight.set", allowWindowMoveResize); setCapabilityPolicy("capability.policy.default.Window.sizeToContent", allowWindowMoveResize); setCapabilityPolicy("capability.policy.default.Window.resizeBy", allowWindowMoveResize); setCapabilityPolicy("capability.policy.default.Window.screenX.set", allowWindowMoveResize); setCapabilityPolicy("capability.policy.default.Window.screenY.set", allowWindowMoveResize); setCapabilityPolicy("capability.policy.default.Window.moveTo", allowWindowMoveResize); setCapabilityPolicy("capability.policy.default.Window.moveBy", allowWindowMoveResize); } if (data.scriptData["allowWindowStatusChangeChanged"].value){ var allowWindowStatusChange = getCheckboxValue("allowWindowStatusChange"); setCapabilityPolicy("capability.policy.default.Window.status", allowWindowStatusChange); setCapabilityPolicy("capability.policy.default.Window.defaultStatus", allowWindowStatusChange); } if (data.scriptData["allowWindowFlipChanged"].value){ setCapabilityPolicy("capability.policy.default.Window.focus", getCheckboxValue("allowWindowFlip")); } if (data.scriptData["allowDocumentCookieSetChanged"].value){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.set", getCheckboxValue("allowDocumentCookieSet")); } if (data.scriptData["allowDocumentCookieGetChanged"].value){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.get", getCheckboxValue("allowDocumentCookieGet")); } if (data.scriptData["allowImageSrcChangeChanged"].value){ setCapabilityPolicy("capability.policy.default.HTMLImageElement.src", getCheckboxValue("allowImageSrcChange")); }}
|
SetElementEnabledByID("ok", canEnableAll ); SetElementEnabledByID( "altTextLabel", canEnableAll );
|
SetElementEnabledById("ok", canEnableAll ); SetElementEnabledById( "altTextLabel", canEnableAll );
|
function doOverallEnabling(){ var canEnableAll = IsValidImage(dialog.srcInput.value); if ( wasEnableAll == canEnableAll ) return; wasEnableAll = canEnableAll; SetElementEnabledByID("ok", canEnableAll ); SetElementEnabledByID( "altTextLabel", canEnableAll ); // Do widgets for sizing SetElementEnabledByID( "dimensionsLabel", canEnableAll ); doDimensionEnabling( canEnableAll ); SetElementEnabledByID("alignLabel", canEnableAll ); SetElementEnabledByID("alignTypeSelect", canEnableAll ); // spacing Box SetElementEnabledByID( "spacingLabel", canEnableAll ); SetElementEnabledByID( "imageleftrightInput", canEnableAll ); SetElementEnabledByID( "leftrightLabel", canEnableAll ); SetElementEnabledByID( "leftrighttypeLabel", canEnableAll ); SetElementEnabledByID( "imagetopbottomInput", canEnableAll ); SetElementEnabledByID( "topbottomLabel", canEnableAll ); SetElementEnabledByID( "topbottomtypeLabel", canEnableAll ); SetElementEnabledByID( "border", canEnableAll ); SetElementEnabledByID( "borderLabel", canEnableAll ); SetElementEnabledByID( "bordertypeLabel", canEnableAll ); // This shouldn't find button, but it does! SetElementEnabledByID( "AdvancedEditButton2", canEnableAll ); SetElementEnabledByID( "AdvancedEditButton3", canEnableAll ); SetElementEnabledByID( "editImageMap", canEnableAll ); // TODO: ADD APPROPRIATE DISABLING BASED ON EXISTENCE OF IMAGE MAP SetElementEnabledByID( "removeImageMap", canEnableAll && canRemoveImageMap);}
|
SetElementEnabledByID( "dimensionsLabel", canEnableAll );
|
SetElementEnabledById( "dimensionsLabel", canEnableAll );
|
function doOverallEnabling(){ var canEnableAll = IsValidImage(dialog.srcInput.value); if ( wasEnableAll == canEnableAll ) return; wasEnableAll = canEnableAll; SetElementEnabledByID("ok", canEnableAll ); SetElementEnabledByID( "altTextLabel", canEnableAll ); // Do widgets for sizing SetElementEnabledByID( "dimensionsLabel", canEnableAll ); doDimensionEnabling( canEnableAll ); SetElementEnabledByID("alignLabel", canEnableAll ); SetElementEnabledByID("alignTypeSelect", canEnableAll ); // spacing Box SetElementEnabledByID( "spacingLabel", canEnableAll ); SetElementEnabledByID( "imageleftrightInput", canEnableAll ); SetElementEnabledByID( "leftrightLabel", canEnableAll ); SetElementEnabledByID( "leftrighttypeLabel", canEnableAll ); SetElementEnabledByID( "imagetopbottomInput", canEnableAll ); SetElementEnabledByID( "topbottomLabel", canEnableAll ); SetElementEnabledByID( "topbottomtypeLabel", canEnableAll ); SetElementEnabledByID( "border", canEnableAll ); SetElementEnabledByID( "borderLabel", canEnableAll ); SetElementEnabledByID( "bordertypeLabel", canEnableAll ); // This shouldn't find button, but it does! SetElementEnabledByID( "AdvancedEditButton2", canEnableAll ); SetElementEnabledByID( "AdvancedEditButton3", canEnableAll ); SetElementEnabledByID( "editImageMap", canEnableAll ); // TODO: ADD APPROPRIATE DISABLING BASED ON EXISTENCE OF IMAGE MAP SetElementEnabledByID( "removeImageMap", canEnableAll && canRemoveImageMap);}
|
SetElementEnabledByID("alignLabel", canEnableAll ); SetElementEnabledByID("alignTypeSelect", canEnableAll );
|
SetElementEnabledById("alignLabel", canEnableAll ); SetElementEnabledById("alignTypeSelect", canEnableAll );
|
function doOverallEnabling(){ var canEnableAll = IsValidImage(dialog.srcInput.value); if ( wasEnableAll == canEnableAll ) return; wasEnableAll = canEnableAll; SetElementEnabledByID("ok", canEnableAll ); SetElementEnabledByID( "altTextLabel", canEnableAll ); // Do widgets for sizing SetElementEnabledByID( "dimensionsLabel", canEnableAll ); doDimensionEnabling( canEnableAll ); SetElementEnabledByID("alignLabel", canEnableAll ); SetElementEnabledByID("alignTypeSelect", canEnableAll ); // spacing Box SetElementEnabledByID( "spacingLabel", canEnableAll ); SetElementEnabledByID( "imageleftrightInput", canEnableAll ); SetElementEnabledByID( "leftrightLabel", canEnableAll ); SetElementEnabledByID( "leftrighttypeLabel", canEnableAll ); SetElementEnabledByID( "imagetopbottomInput", canEnableAll ); SetElementEnabledByID( "topbottomLabel", canEnableAll ); SetElementEnabledByID( "topbottomtypeLabel", canEnableAll ); SetElementEnabledByID( "border", canEnableAll ); SetElementEnabledByID( "borderLabel", canEnableAll ); SetElementEnabledByID( "bordertypeLabel", canEnableAll ); // This shouldn't find button, but it does! SetElementEnabledByID( "AdvancedEditButton2", canEnableAll ); SetElementEnabledByID( "AdvancedEditButton3", canEnableAll ); SetElementEnabledByID( "editImageMap", canEnableAll ); // TODO: ADD APPROPRIATE DISABLING BASED ON EXISTENCE OF IMAGE MAP SetElementEnabledByID( "removeImageMap", canEnableAll && canRemoveImageMap);}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.