rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
{ | function doFind(){ gDatasourceName = ""; gMatchName = ""; gMethodName = ""; gTextName = ""; // get RDF datasource to query var datasourceNode = document.getElementById("datasource"); if (!datasourceNode) return(false); var x = datasourceNode.selectedIndex; if (x < 0) return(false); var datasource = datasourceNode.options[x].value; if (!datasource) return(false); gDatasourceName = datasourceNode.options[x].text; dump("Datasource: " + gDatasourceName + "\n"); // get match var matchNode = document.getElementById("match"); if (!matchNode) return(false); x = matchNode.selectedIndex; if (x < 0) return(false); var match = matchNode.options[x].value; if (!match) return(false); gMatchName = matchNode.options[x].text; dump("Match: " + gMatchName + "\n"); // get method var methodNode = document.getElementById("method"); if (!methodNode) return(false); x = methodNode.selectedIndex; if (x < 0) return(false); var method = methodNode.options[x].value; if (!method) return(false); gMethodName = methodNode.options[x].text; dump("Method: " + method + "\n"); // get user text to find var textNode = document.getElementById("findtext"); if (!textNode) return(false); var text = textNode.value; if (!text) return(false); gTextName = text; 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);} |
|
} | function doFind(){ gDatasourceName = ""; gMatchName = ""; gMethodName = ""; gTextName = ""; // get RDF datasource to query var datasourceNode = document.getElementById("datasource"); if (!datasourceNode) return(false); var x = datasourceNode.selectedIndex; if (x < 0) return(false); var datasource = datasourceNode.options[x].value; if (!datasource) return(false); gDatasourceName = datasourceNode.options[x].text; dump("Datasource: " + gDatasourceName + "\n"); // get match var matchNode = document.getElementById("match"); if (!matchNode) return(false); x = matchNode.selectedIndex; if (x < 0) return(false); var match = matchNode.options[x].value; if (!match) return(false); gMatchName = matchNode.options[x].text; dump("Match: " + gMatchName + "\n"); // get method var methodNode = document.getElementById("method"); if (!methodNode) return(false); x = methodNode.selectedIndex; if (x < 0) return(false); var method = methodNode.options[x].value; if (!method) return(false); gMethodName = methodNode.options[x].text; dump("Method: " + method + "\n"); // get user text to find var textNode = document.getElementById("findtext"); if (!textNode) return(false); var text = textNode.value; if (!text) return(false); gTextName = text; 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);} |
|
return aWalker.currentNode && "id" in aWalker.currentNode && re.test(aWalker.currentNode.id); | var node = aWalker.currentNode; if (!node) return false; if (node.nodeType != Components.interfaces.nsIDOMNode.ELEMENT_NODE) return false; for (var i = 0; i < node.attributes.length; i++) { var attr = node.attributes[i]; if (attr.isId && re.test(attr.nodeValue)) { return true; } } return false; | doFindElementById: function(aWalker) { var re = new RegExp(this.mFindParams[0], "i"); return aWalker.currentNode && "id" in aWalker.currentNode && re.test(aWalker.currentNode.id); }, |
target = target.QueryInterface(Components.interfaces.nsIRDFResource); | var link = sourceDS.GetTarget(target, NC_LINK, true); | function doFindOnSeq(resultsDS, sourceDS, resource, level) { // load up an RDFContainer so we can access the contents of the current // rdf:seq. RDFContainer.Init(sourceDS, resource); var targets = RDFContainer.GetElements(); while (targets.hasMoreElements()) { var target = targets.getNext(); target = target.QueryInterface(Components.interfaces.nsIRDFResource); var name = sourceDS.GetTarget(target, NC_NAME, true); name = name.QueryInterface(Components.interfaces.nsIRDFLiteral); if (isMatch(name.Value)) { // we have found a search entry - add it to the results datasource. // Get URL of html for this entry. var link = sourceDS.GetTarget(target, NC_LINK, true); link = link.QueryInterface(Components.interfaces.nsIRDFLiteral); urnID++; resultsDS.Assert(RDF_ROOT, RDF.GetResource("http://home.netscape.com/NC-rdf#child"), RDF.GetResource("urn:" + urnID), true); resultsDS.Assert(RDF.GetResource("urn:" + urnID), RDF.GetResource("http://home.netscape.com/NC-rdf#name"), name, true); resultsDS.Assert(RDF.GetResource("urn:" + urnID), RDF.GetResource("http://home.netscape.com/NC-rdf#link"), link, true); emptySearch = false; } // process any nested rdf:seq elements. doFindOnDatasource(resultsDS, sourceDS, target, level+1); }} |
if (isMatch(name.Value)) { | if (link && isMatch(name.Value)) { | function doFindOnSeq(resultsDS, sourceDS, resource, level) { // load up an RDFContainer so we can access the contents of the current // rdf:seq. RDFContainer.Init(sourceDS, resource); var targets = RDFContainer.GetElements(); while (targets.hasMoreElements()) { var target = targets.getNext(); target = target.QueryInterface(Components.interfaces.nsIRDFResource); var name = sourceDS.GetTarget(target, NC_NAME, true); name = name.QueryInterface(Components.interfaces.nsIRDFLiteral); if (isMatch(name.Value)) { // we have found a search entry - add it to the results datasource. // Get URL of html for this entry. var link = sourceDS.GetTarget(target, NC_LINK, true); link = link.QueryInterface(Components.interfaces.nsIRDFLiteral); urnID++; resultsDS.Assert(RDF_ROOT, RDF.GetResource("http://home.netscape.com/NC-rdf#child"), RDF.GetResource("urn:" + urnID), true); resultsDS.Assert(RDF.GetResource("urn:" + urnID), RDF.GetResource("http://home.netscape.com/NC-rdf#name"), name, true); resultsDS.Assert(RDF.GetResource("urn:" + urnID), RDF.GetResource("http://home.netscape.com/NC-rdf#link"), link, true); emptySearch = false; } // process any nested rdf:seq elements. doFindOnDatasource(resultsDS, sourceDS, target, level+1); }} |
var link = sourceDS.GetTarget(target, NC_LINK, true); link = link.QueryInterface(Components.interfaces.nsIRDFLiteral); urnID++; resultsDS.Assert(RDF_ROOT, RDF.GetResource("http: RDF.GetResource("urn:" + urnID), true); resultsDS.Assert(RDF.GetResource("urn:" + urnID), RDF.GetResource("http: name, true); resultsDS.Assert(RDF.GetResource("urn:" + urnID), RDF.GetResource("http: link, true); | function doFindOnSeq(resultsDS, sourceDS, resource, level) { // load up an RDFContainer so we can access the contents of the current // rdf:seq. RDFContainer.Init(sourceDS, resource); var targets = RDFContainer.GetElements(); while (targets.hasMoreElements()) { var target = targets.getNext(); target = target.QueryInterface(Components.interfaces.nsIRDFResource); var name = sourceDS.GetTarget(target, NC_NAME, true); name = name.QueryInterface(Components.interfaces.nsIRDFLiteral); if (isMatch(name.Value)) { // we have found a search entry - add it to the results datasource. // Get URL of html for this entry. var link = sourceDS.GetTarget(target, NC_LINK, true); link = link.QueryInterface(Components.interfaces.nsIRDFLiteral); urnID++; resultsDS.Assert(RDF_ROOT, RDF.GetResource("http://home.netscape.com/NC-rdf#child"), RDF.GetResource("urn:" + urnID), true); resultsDS.Assert(RDF.GetResource("urn:" + urnID), RDF.GetResource("http://home.netscape.com/NC-rdf#name"), name, true); resultsDS.Assert(RDF.GetResource("urn:" + urnID), RDF.GetResource("http://home.netscape.com/NC-rdf#link"), link, true); emptySearch = false; } // process any nested rdf:seq elements. doFindOnDatasource(resultsDS, sourceDS, target, level+1); }} |
|
target = target.QueryInterface(Components.interfaces.nsIRDFResource); | var link = sourceDS.GetTarget(target, NC_LINK, true); | function doFindOnSeq(resultsDS, sourceDS, resource, level) { // load up an RDFContainer so we can access the contents of the current rdf:seq. RDFContainer.Init(sourceDS, resource); var targets = RDFContainer.GetElements(); while (targets.hasMoreElements()) { var target = targets.getNext(); target = target.QueryInterface(Components.interfaces.nsIRDFResource); var name = sourceDS.GetTarget(target, NC_NAME, true); name = name.QueryInterface(Components.interfaces.nsIRDFLiteral); if (isMatch(name.Value)) { // we have found a search entry - add it to the results datasource. // Get URL of html for this entry. var link = sourceDS.GetTarget(target, NC_LINK, true); link = link.QueryInterface(Components.interfaces.nsIRDFLiteral); urnID++; resultsDS.Assert(RDF_ROOT, RDF.GetResource("http://home.netscape.com/NC-rdf#child"), RDF.GetResource("urn:" + urnID), true); resultsDS.Assert(RDF.GetResource("urn:" + urnID), RDF.GetResource("http://home.netscape.com/NC-rdf#name"), name, true); resultsDS.Assert(RDF.GetResource("urn:" + urnID), RDF.GetResource("http://home.netscape.com/NC-rdf#link"), link, true); emptySearch = false; } // process any nested rdf:seq elements. doFindOnDatasource(resultsDS, sourceDS, target, level+1); } } |
if (isMatch(name.Value)) { | if (link && isMatch(name.Value)) { | function doFindOnSeq(resultsDS, sourceDS, resource, level) { // load up an RDFContainer so we can access the contents of the current rdf:seq. RDFContainer.Init(sourceDS, resource); var targets = RDFContainer.GetElements(); while (targets.hasMoreElements()) { var target = targets.getNext(); target = target.QueryInterface(Components.interfaces.nsIRDFResource); var name = sourceDS.GetTarget(target, NC_NAME, true); name = name.QueryInterface(Components.interfaces.nsIRDFLiteral); if (isMatch(name.Value)) { // we have found a search entry - add it to the results datasource. // Get URL of html for this entry. var link = sourceDS.GetTarget(target, NC_LINK, true); link = link.QueryInterface(Components.interfaces.nsIRDFLiteral); urnID++; resultsDS.Assert(RDF_ROOT, RDF.GetResource("http://home.netscape.com/NC-rdf#child"), RDF.GetResource("urn:" + urnID), true); resultsDS.Assert(RDF.GetResource("urn:" + urnID), RDF.GetResource("http://home.netscape.com/NC-rdf#name"), name, true); resultsDS.Assert(RDF.GetResource("urn:" + urnID), RDF.GetResource("http://home.netscape.com/NC-rdf#link"), link, true); emptySearch = false; } // process any nested rdf:seq elements. doFindOnDatasource(resultsDS, sourceDS, target, level+1); } } |
var link = sourceDS.GetTarget(target, NC_LINK, true); link = link.QueryInterface(Components.interfaces.nsIRDFLiteral); urnID++; resultsDS.Assert(RDF_ROOT, RDF.GetResource("http: RDF.GetResource("urn:" + urnID), true); resultsDS.Assert(RDF.GetResource("urn:" + urnID), RDF.GetResource("http: name, true); resultsDS.Assert(RDF.GetResource("urn:" + urnID), RDF.GetResource("http: link, true); | var urn = RDF.GetAnonymousResource(); resultsDS.Assert(urn, NC_NAME, name, true); resultsDS.Assert(urn, NC_LINK, link, true); resultsDS.Assert(RDF_ROOT, NC_CHILD, urn, true); | function doFindOnSeq(resultsDS, sourceDS, resource, level) { // load up an RDFContainer so we can access the contents of the current rdf:seq. RDFContainer.Init(sourceDS, resource); var targets = RDFContainer.GetElements(); while (targets.hasMoreElements()) { var target = targets.getNext(); target = target.QueryInterface(Components.interfaces.nsIRDFResource); var name = sourceDS.GetTarget(target, NC_NAME, true); name = name.QueryInterface(Components.interfaces.nsIRDFLiteral); if (isMatch(name.Value)) { // we have found a search entry - add it to the results datasource. // Get URL of html for this entry. var link = sourceDS.GetTarget(target, NC_LINK, true); link = link.QueryInterface(Components.interfaces.nsIRDFLiteral); urnID++; resultsDS.Assert(RDF_ROOT, RDF.GetResource("http://home.netscape.com/NC-rdf#child"), RDF.GetResource("urn:" + urnID), true); resultsDS.Assert(RDF.GetResource("urn:" + urnID), RDF.GetResource("http://home.netscape.com/NC-rdf#name"), name, true); resultsDS.Assert(RDF.GetResource("urn:" + urnID), RDF.GetResource("http://home.netscape.com/NC-rdf#link"), link, true); emptySearch = false; } // process any nested rdf:seq elements. doFindOnDatasource(resultsDS, sourceDS, target, level+1); } } |
document.getElementById("browserleftbar").collapsed = gFullScreen; | function DoFullScreen(){ gFullScreen = !gFullScreen; document.getElementById("nav-bar").hidden = gFullScreen; // Is this the simpler approach to count tabs? if(gBrowser.mPanelContainer.childNodes.length>1) { gBrowser.setStripVisibilityTo(!gFullScreen); } window.fullScreen = gFullScreen; } |
|
getBrowser().setStripVisibilityTo(!gFullScreen); | if(getBrowser().mPanelContainer.childNodes.length==1) { getBrowser().setStripVisibilityTo(!gFullScreen); } | function DoFullScreen(){ gFullScreen = !gFullScreen; document.getElementById("nav-bar").hidden = gFullScreen; getBrowser().setStripVisibilityTo(!gFullScreen); window.fullScreen = gFullScreen; document.getElementById("nav-bar-contextual").hidden = !gFullScreen; } |
function doGrab(iterator, i) | function doGrab(iterator) | function doGrab(iterator, i){ if (iterator.nextNode()) setTimeout(doGrab, 1, iterator, i);} |
setTimeout(doGrab, 1, iterator, i); | { setTimeout(doGrab, 1, iterator); } | function doGrab(iterator, i){ if (iterator.nextNode()) setTimeout(doGrab, 1, iterator, i);} |
subsrc = document.getElementById("panelFrame").getAttribute("src"); | var subsrc = document.getElementById("panelFrame").getAttribute("src"); | function doHelpButton() { subsrc = document.getElementById("panelFrame").getAttribute("src"); if ( fm[subsrc] ) { openHelp(gHelpURL + fm[subsrc]); } else { openHelp(gHelpURL + '?prefs'); }} |
if (helpTag == "mail") { | if ((helpTag == "mail") || (helpTag == "mail-offline-accounts")) { | 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(helpTag); else openHelp('mail'); } |
openHelp('validation_prefs'); | openHelp("validation-crl-import"); | function doHelpButton(){ openHelp('validation_prefs');} |
openHelp('validation_prefs'); | openHelp("validation-crl-auto-update-prefs"); | function doHelpButton(){ openHelp('validation_prefs');} |
return false; | function doHelpButton(){ // implement help} |
|
doSetOKCancel(Commit); | 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-service;1"] .getService(Components.interfaces.nsIPrefBranch); lastCategoryName = pref.getCharPref( "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); } }} |
|
var internetSearch = Components.classes["component: | var internetSearch = Components.classes["@mozilla.org/rdf/datasource;1?name=internetsearch"].getService(); | function doLoad(){ doSetOKCancel(Commit); // adjust category popup var internetSearch = Components.classes["component://netscape/rdf/datasource?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["component://netscape/preferences"].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["component: | var pref = Components.classes["@mozilla.org/preferences;1"].getService(); | function doLoad(){ doSetOKCancel(Commit); // adjust category popup var internetSearch = Components.classes["component://netscape/rdf/datasource?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["component://netscape/preferences"].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); } }} |
alert("failed to login"); | var alertStr = bundle.GetStringFromName("login_failed"); alert(alertStr); | function doLogin(){ getSelectedItem(); // here's the workaround - login functions are with token var selected_token = selected_slot.getToken(); try { selected_token.login(false); var tok_status = document.getElementById("tok_status"); if (selected_token.isLoggedIn()) { tok_status.setAttribute("label", bundle.GetStringFromName("devinfo_stat_loggedin")); } else { tok_status.setAttribute("label", bundle.GetStringFromName("devinfo_stat_notloggedin")); } } catch (e) { alert("failed to login"); } enableButtons();} |
if (commonDialogsService) commonDialogsService.Alert(window, errorTitle, errorMessage); | if (promptService) promptService.Alert(window, errorTitle, errorMessage); | function DomainAlreadyPresent(obj, domain_name, dup){ var errorTitle; var errorMsg; var pref_string = obj.domain_pref.getAttribute('label'); 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["component: | var pref = Components.classes["@mozilla.org/preferences;1"]; | function DomainInSkipList(sDomain){ var bSkipDomainFlag = false; if ('/' == sDomain[sDomain.length - 1]) { sDomain = sDomain.substring(0, sDomain.length - 1); } try { var pref = Components.classes["component://netscape/preferences"]; 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 != "")) { debug("\nProposed New Domain: '" + sDomain + "'\n"); debug("Skip Domain List: '" + sDomainList + "'\n"); var aDomains = sDomainList.split(","); // split on commas for (var x=0; x < aDomains.length; x++) { var sDomainCopy = sDomain; var sTestDomain = aDomains[x]; debug("Skip Domain #" + x + ": " + sTestDomain + "\n"); if ('*' == sTestDomain[0]) { // wildcard match debug(" Wildcard domain.\n"); // 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)) { debug(" Skip this domain '" + sDomainCopy + "'\n"); bSkipDomainFlag = true; break; } } } } } catch(ex) { } return(bSkipDomainFlag);} |
if ( table && this.nodeName == "TABLE" && a[0].nodeName != "THEAD" ) { | if ( table && this.nodeName.toUpperCase() == "TABLE" && a[0].nodeName.toUpperCase() != "THEAD" ) { | domManip: function(args, table, dir, fn){ var clone = this.size() > 1; var a = jQuery.clean(args); return this.each(function(){ var obj = this; if ( table && this.nodeName == "TABLE" && a[0].nodeName != "THEAD" ) { var tbody = this.getElementsByTagName("tbody"); if ( !tbody.length ) { obj = document.createElement("tbody"); this.appendChild( obj ); } else obj = tbody[0]; } for ( var i = ( dir < 0 ? a.length - 1 : 0 ); i != ( dir < 0 ? dir : a.length ); i += dir ) { fn.apply( obj, [ clone ? a[i].cloneNode(true) : a[i] ] ); } }); }, |
for ( var i=0; i < a.length; i++ ) | for ( var i = 0, al = a.length; i < al; i++ ) | domManip: function(args, table, dir, fn){ var clone = this.length > 1; var a = jQuery.clean(args); if ( dir < 0 ) a.reverse(); return this.each(function(){ var obj = this; if ( table && this.nodeName.toUpperCase() == "TABLE" && a[0].nodeName.toUpperCase() == "TR" ) obj = this.getElementsByTagName("tbody")[0] || this.appendChild(document.createElement("tbody")); for ( var i=0; i < a.length; i++ ) fn.apply( obj, [ clone ? a[i].cloneNode(true) : a[i] ] ); }); }, |
if ( table && this.nodeName == "TABLE" ) { | if ( table && this.nodeName == "TABLE" && a[0].nodeName != "THEAD" ) { | domManip: function(args, table, dir, fn){ var clone = this.size() > 1; var a = jQuery.clean(args); return this.each(function(){ var obj = this; if ( table && this.nodeName == "TABLE" ) { var tbody = this.getElementsByTagName("tbody"); if ( !tbody.length ) { obj = document.createElement("tbody"); this.appendChild( obj ); } else obj = tbody[0]; } for ( var i = ( dir < 0 ? a.length - 1 : 0 ); i != ( dir < 0 ? dir : a.length ); i += dir ) { fn.apply( obj, [ clone ? a[i].cloneNode(true) : a[i] ] ); } }); }, |
i != ( dir < 0 ? dir : a.length ); i += dir ) fn.apply( obj, [ a[i] ] ); | i != ( dir < 0 ? dir : a.length ); i += dir ) { fn.apply( obj, [ clone ? a[i].cloneNode(true) : a[i] ] ); } | domManip: function(args, table, dir, fn){ var clone = this.size() > 1; var a = jQuery.clean(args); return this.each(function(){ var obj = this; if ( table && this.nodeName == "TABLE" ) { var tbody = this.getElementsByTagName("tbody"); if ( !tbody.length ) { obj = document.createElement("tbody"); this.appendChild( obj ); } else obj = tbody[0]; } for ( var i = ( dir < 0 ? a.length - 1 : 0 ); i != ( dir < 0 ? dir : a.length ); i += dir ) fn.apply( obj, [ a[i] ] ); }); }, |
$.fn.domManip = function(fn){ return this.each(function(){ var obj = this; | domManip: function(fn){ return this.each(function(){ var obj = this; if ( this.nodeName == "TABLE" ) { var tbody = this.getElementsByTagName("tbody"); | $.fn.domManip = function(fn){ return this.each(function(){ var obj = this; if ( this.nodeName == 'TABLE' ) { var tbody = this.getElementsByTagName("tbody"); if ( !tbody.length ) { obj = document.createElement("tbody"); this.appendChild( obj ); } else obj = tbody[0]; } $.apply( obj, fn ); });}; |
if ( this.nodeName == 'TABLE' ) { var tbody = this.getElementsByTagName("tbody"); if ( !tbody.length ) { obj = document.createElement("tbody"); this.appendChild( obj ); } else obj = tbody[0]; } $.apply( obj, fn ); }); }; | if ( !tbody.length ) { obj = document.createElement("tbody"); this.appendChild( obj ); } else obj = tbody[0]; } fn.apply( obj ); }); } | $.fn.domManip = function(fn){ return this.each(function(){ var obj = this; if ( this.nodeName == 'TABLE' ) { var tbody = this.getElementsByTagName("tbody"); if ( !tbody.length ) { obj = document.createElement("tbody"); this.appendChild( obj ); } else obj = tbody[0]; } $.apply( obj, fn ); });}; |
gBrowser.hideMessage(null, "top"); | gBrowser.getNotificationBox().removeCurrentNotification(); | 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(null, "top"); }, |
if (data.scriptData["allowWindowOpenChanged"].value){ parent.hPrefWindow.setPref("bool", "dom.disable_open_during_load", !getCheckboxValue('allowWindowOpen')); } | 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 ("onCheckboxCheck" in window) return document.getElementById(name).checked; return data[name].checked; } var data = parent.hPrefWindow.wsm.dataManager.pageData["chrome://browser/content/pref/pref-scripts.xul"]; if (data.scriptData["allowWindowOpenChanged"].value){ parent.hPrefWindow.setPref("bool", "dom.disable_open_during_load", !getCheckboxValue('allowWindowOpen')); } if (data.scriptData["allowWindowMoveResizeChanged"].value){ parent.hPrefWindow.setPref("bool", "dom.disable_window_move_resize", !getCheckboxValue('allowWindowMoveResize')); } if (data.scriptData["allowWindowStatusChangeChanged"].value){ parent.hPrefWindow.setPref("bool", "dom.disable_window_status_change", !getCheckboxValue("allowWindowStatusChange")); } if (data.scriptData["allowWindowFlipChanged"].value){ parent.hPrefWindow.setPref("bool", "dom.disable_window_flip", !getCheckboxValue("allowWindowFlip")); } if (data.scriptData["allowDocumentCookieSetChanged"].value){ parent.hPrefWindow.setPref("bool", "dom.disable_cookie_set", !getCheckboxValue("allowDocumentCookieSet")); } if (data.scriptData["allowDocumentCookieGetChanged"].value){ parent.hPrefWindow.setPref("bool", "dom.disable_cookie_get", !getCheckboxValue("allowDocumentCookieGet")); } if (data.scriptData["allowImageSrcChangeChanged"].value){ parent.hPrefWindow.setPref("bool", "dom.disable_image_src_set", !getCheckboxValue("allowImageSrcChange")); } if (data.scriptData["allowHideStatusBarChanged"].value) { parent.hPrefWindow.setPref("bool", "dom.disable_window_open_feature.status", !getCheckboxValue("allowHideStatusBar")); }} |
|
if (data.scriptData["allowHideStatusBarChanged"].value) { parent.hPrefWindow.setPref("bool", "dom.disable_window_open_feature.status", !getCheckboxValue("allowHideStatusBar")); } | 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 ("onCheckboxCheck" in window) return document.getElementById(name).checked; return data[name].checked; } 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){ parent.hPrefWindow.setPref("bool", "dom.disable_window_move_resize", !getCheckboxValue('allowWindowMoveResize')); } if (data.scriptData["allowWindowStatusChangeChanged"].value){ parent.hPrefWindow.setPref("bool", "dom.disable_window_status_change", !getCheckboxValue("allowWindowStatusChange")); } if (data.scriptData["allowWindowFlipChanged"].value){ parent.hPrefWindow.setPref("bool", "dom.disable_window_flip", !getCheckboxValue("allowWindowFlip")); } if (data.scriptData["allowDocumentCookieSetChanged"].value){ parent.hPrefWindow.setPref("bool", "dom.disable_cookie_set", !getCheckboxValue("allowDocumentCookieSet")); } if (data.scriptData["allowDocumentCookieGetChanged"].value){ parent.hPrefWindow.setPref("bool", "dom.disable_cookie_get", !getCheckboxValue("allowDocumentCookieGet")); } if (data.scriptData["allowImageSrcChangeChanged"].value){ parent.hPrefWindow.setPref("bool", "dom.disable_image_src_set", !getCheckboxValue("allowImageSrcChange")); }} |
|
function setCapabilityPolicy(prefName, checkboxValue){ if (checkboxValue){ try { parent.hPrefWindow.pref.ClearUserPref(prefName); } catch (e) {} } else { parent.hPrefWindow.setPref("string", prefName, "noAccess"); } } | 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 ("onCheckboxCheck" 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")); }} |
|
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); | parent.hPrefWindow.setPref("bool", "dom.disable_window_move_resize", !getCheckboxValue('allowWindowMoveResize')); | 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 ("onCheckboxCheck" 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")); }} |
var allowWindowStatusChange = getCheckboxValue("allowWindowStatusChange"); setCapabilityPolicy("capability.policy.default.Window.status", allowWindowStatusChange); setCapabilityPolicy("capability.policy.default.Window.defaultStatus", allowWindowStatusChange); | parent.hPrefWindow.setPref("bool", "dom.disable_window_status_change", !getCheckboxValue("allowWindowStatusChange")); | 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 ("onCheckboxCheck" 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")); }} |
setCapabilityPolicy("capability.policy.default.Window.focus", getCheckboxValue("allowWindowFlip")); | parent.hPrefWindow.setPref("bool", "dom.disable_window_flip", !getCheckboxValue("allowWindowFlip")); | 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 ("onCheckboxCheck" 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")); }} |
setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.set", getCheckboxValue("allowDocumentCookieSet")); | parent.hPrefWindow.setPref("bool", "dom.disable_cookie_set", !getCheckboxValue("allowDocumentCookieSet")); | 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 ("onCheckboxCheck" 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")); }} |
setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.get", getCheckboxValue("allowDocumentCookieGet")); | parent.hPrefWindow.setPref("bool", "dom.disable_cookie_get", !getCheckboxValue("allowDocumentCookieGet")); | 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 ("onCheckboxCheck" 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")); }} |
setCapabilityPolicy("capability.policy.default.HTMLImageElement.src", getCheckboxValue("allowImageSrcChange")); | parent.hPrefWindow.setPref("bool", "dom.disable_image_src_set", !getCheckboxValue("allowImageSrcChange")); | 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 ("onCheckboxCheck" 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")); }} |
if (allowWindowOpenChanged){ pref.SetBoolPref("dom.disable_open_during_load", !document.getElementById("allowWindowOpen").checked); | function setCapabilityPolicy(prefName, checkboxValue){ if (checkboxValue){ try { parent.hPrefWindow.pref.ClearUserPref(prefName); } catch (e) {} } else { parent.hPrefWindow.setPref("string", prefName, "noAccess"); } | function doOnOk(){ if (allowWindowOpenChanged){ pref.SetBoolPref("dom.disable_open_during_load", !document.getElementById("allowWindowOpen").checked); } if (allowWindowMoveResizeChanged){ var myValue = document.getElementById("allowWindowMoveResize").checked; setCapabilityPolicy("capability.policy.default.Window.resizeTo", myValue); setCapabilityPolicy("capability.policy.default.Window.innerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.innerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.sizeToContent", myValue); setCapabilityPolicy("capability.policy.default.Window.resizeBy", myValue); setCapabilityPolicy("capability.policy.default.Window.screenX.set", myValue); setCapabilityPolicy("capability.policy.default.Window.screenY.set", myValue); setCapabilityPolicy("capability.policy.default.Window.moveTo", myValue); setCapabilityPolicy("capability.policy.default.Window.moveBy", myValue); } if (allowWindowStatusChangeChanged){ setCapabilityPolicy("capability.policy.default.Window.status", document.getElementById("allowWindowStatusChange").checked); } if (allowWindowFlipChanged){ setCapabilityPolicy("capability.policy.default.Window.focus", document.getElementById("allowWindowFlip").checked); } if (allowDocumentCookieSetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.set", document.getElementById("allowDocumentCookieSet").checked); } if (allowDocumentCookieGetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.get", document.getElementById("allowDocumentCookieGet").checked); } if (allowImageSrcChangeChanged){ setCapabilityPolicy("capability.policy.default.HTMLImageElement.src", document.getElementById("allowImageSrcChange").checked); }} |
if (allowWindowMoveResizeChanged){ var myValue = document.getElementById("allowWindowMoveResize").checked; | var data = parent.hPrefWindow.wsm.dataManager.pageData["chrome: if (data.scriptData["allowWindowOpenChanged"].value){ parent.hPrefWindow.setPref("bool", "dom.disable_open_during_load", !getCheckboxValue('allowWindowOpen')); } if (data.scriptData["allowWindowMoveResizeChanged"].value){ var myValue = getCheckboxValue("allowWindowMoveResize"); | function doOnOk(){ if (allowWindowOpenChanged){ pref.SetBoolPref("dom.disable_open_during_load", !document.getElementById("allowWindowOpen").checked); } if (allowWindowMoveResizeChanged){ var myValue = document.getElementById("allowWindowMoveResize").checked; setCapabilityPolicy("capability.policy.default.Window.resizeTo", myValue); setCapabilityPolicy("capability.policy.default.Window.innerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.innerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.sizeToContent", myValue); setCapabilityPolicy("capability.policy.default.Window.resizeBy", myValue); setCapabilityPolicy("capability.policy.default.Window.screenX.set", myValue); setCapabilityPolicy("capability.policy.default.Window.screenY.set", myValue); setCapabilityPolicy("capability.policy.default.Window.moveTo", myValue); setCapabilityPolicy("capability.policy.default.Window.moveBy", myValue); } if (allowWindowStatusChangeChanged){ setCapabilityPolicy("capability.policy.default.Window.status", document.getElementById("allowWindowStatusChange").checked); } if (allowWindowFlipChanged){ setCapabilityPolicy("capability.policy.default.Window.focus", document.getElementById("allowWindowFlip").checked); } if (allowDocumentCookieSetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.set", document.getElementById("allowDocumentCookieSet").checked); } if (allowDocumentCookieGetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.get", document.getElementById("allowDocumentCookieGet").checked); } if (allowImageSrcChangeChanged){ setCapabilityPolicy("capability.policy.default.HTMLImageElement.src", document.getElementById("allowImageSrcChange").checked); }} |
if (allowWindowStatusChangeChanged){ | if (data.scriptData["allowWindowStatusChangeChanged"].value){ | function doOnOk(){ if (allowWindowOpenChanged){ pref.SetBoolPref("dom.disable_open_during_load", !document.getElementById("allowWindowOpen").checked); } if (allowWindowMoveResizeChanged){ var myValue = document.getElementById("allowWindowMoveResize").checked; setCapabilityPolicy("capability.policy.default.Window.resizeTo", myValue); setCapabilityPolicy("capability.policy.default.Window.innerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.innerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.sizeToContent", myValue); setCapabilityPolicy("capability.policy.default.Window.resizeBy", myValue); setCapabilityPolicy("capability.policy.default.Window.screenX.set", myValue); setCapabilityPolicy("capability.policy.default.Window.screenY.set", myValue); setCapabilityPolicy("capability.policy.default.Window.moveTo", myValue); setCapabilityPolicy("capability.policy.default.Window.moveBy", myValue); } if (allowWindowStatusChangeChanged){ setCapabilityPolicy("capability.policy.default.Window.status", document.getElementById("allowWindowStatusChange").checked); } if (allowWindowFlipChanged){ setCapabilityPolicy("capability.policy.default.Window.focus", document.getElementById("allowWindowFlip").checked); } if (allowDocumentCookieSetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.set", document.getElementById("allowDocumentCookieSet").checked); } if (allowDocumentCookieGetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.get", document.getElementById("allowDocumentCookieGet").checked); } if (allowImageSrcChangeChanged){ setCapabilityPolicy("capability.policy.default.HTMLImageElement.src", document.getElementById("allowImageSrcChange").checked); }} |
document.getElementById("allowWindowStatusChange").checked); | getCheckboxValue("allowWindowStatusChange")); | function doOnOk(){ if (allowWindowOpenChanged){ pref.SetBoolPref("dom.disable_open_during_load", !document.getElementById("allowWindowOpen").checked); } if (allowWindowMoveResizeChanged){ var myValue = document.getElementById("allowWindowMoveResize").checked; setCapabilityPolicy("capability.policy.default.Window.resizeTo", myValue); setCapabilityPolicy("capability.policy.default.Window.innerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.innerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.sizeToContent", myValue); setCapabilityPolicy("capability.policy.default.Window.resizeBy", myValue); setCapabilityPolicy("capability.policy.default.Window.screenX.set", myValue); setCapabilityPolicy("capability.policy.default.Window.screenY.set", myValue); setCapabilityPolicy("capability.policy.default.Window.moveTo", myValue); setCapabilityPolicy("capability.policy.default.Window.moveBy", myValue); } if (allowWindowStatusChangeChanged){ setCapabilityPolicy("capability.policy.default.Window.status", document.getElementById("allowWindowStatusChange").checked); } if (allowWindowFlipChanged){ setCapabilityPolicy("capability.policy.default.Window.focus", document.getElementById("allowWindowFlip").checked); } if (allowDocumentCookieSetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.set", document.getElementById("allowDocumentCookieSet").checked); } if (allowDocumentCookieGetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.get", document.getElementById("allowDocumentCookieGet").checked); } if (allowImageSrcChangeChanged){ setCapabilityPolicy("capability.policy.default.HTMLImageElement.src", document.getElementById("allowImageSrcChange").checked); }} |
if (allowWindowFlipChanged){ | if (data.scriptData["allowWindowFlipChanged"].value){ | function doOnOk(){ if (allowWindowOpenChanged){ pref.SetBoolPref("dom.disable_open_during_load", !document.getElementById("allowWindowOpen").checked); } if (allowWindowMoveResizeChanged){ var myValue = document.getElementById("allowWindowMoveResize").checked; setCapabilityPolicy("capability.policy.default.Window.resizeTo", myValue); setCapabilityPolicy("capability.policy.default.Window.innerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.innerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.sizeToContent", myValue); setCapabilityPolicy("capability.policy.default.Window.resizeBy", myValue); setCapabilityPolicy("capability.policy.default.Window.screenX.set", myValue); setCapabilityPolicy("capability.policy.default.Window.screenY.set", myValue); setCapabilityPolicy("capability.policy.default.Window.moveTo", myValue); setCapabilityPolicy("capability.policy.default.Window.moveBy", myValue); } if (allowWindowStatusChangeChanged){ setCapabilityPolicy("capability.policy.default.Window.status", document.getElementById("allowWindowStatusChange").checked); } if (allowWindowFlipChanged){ setCapabilityPolicy("capability.policy.default.Window.focus", document.getElementById("allowWindowFlip").checked); } if (allowDocumentCookieSetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.set", document.getElementById("allowDocumentCookieSet").checked); } if (allowDocumentCookieGetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.get", document.getElementById("allowDocumentCookieGet").checked); } if (allowImageSrcChangeChanged){ setCapabilityPolicy("capability.policy.default.HTMLImageElement.src", document.getElementById("allowImageSrcChange").checked); }} |
document.getElementById("allowWindowFlip").checked); | getCheckboxValue("allowWindowFlip")); | function doOnOk(){ if (allowWindowOpenChanged){ pref.SetBoolPref("dom.disable_open_during_load", !document.getElementById("allowWindowOpen").checked); } if (allowWindowMoveResizeChanged){ var myValue = document.getElementById("allowWindowMoveResize").checked; setCapabilityPolicy("capability.policy.default.Window.resizeTo", myValue); setCapabilityPolicy("capability.policy.default.Window.innerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.innerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.sizeToContent", myValue); setCapabilityPolicy("capability.policy.default.Window.resizeBy", myValue); setCapabilityPolicy("capability.policy.default.Window.screenX.set", myValue); setCapabilityPolicy("capability.policy.default.Window.screenY.set", myValue); setCapabilityPolicy("capability.policy.default.Window.moveTo", myValue); setCapabilityPolicy("capability.policy.default.Window.moveBy", myValue); } if (allowWindowStatusChangeChanged){ setCapabilityPolicy("capability.policy.default.Window.status", document.getElementById("allowWindowStatusChange").checked); } if (allowWindowFlipChanged){ setCapabilityPolicy("capability.policy.default.Window.focus", document.getElementById("allowWindowFlip").checked); } if (allowDocumentCookieSetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.set", document.getElementById("allowDocumentCookieSet").checked); } if (allowDocumentCookieGetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.get", document.getElementById("allowDocumentCookieGet").checked); } if (allowImageSrcChangeChanged){ setCapabilityPolicy("capability.policy.default.HTMLImageElement.src", document.getElementById("allowImageSrcChange").checked); }} |
if (allowDocumentCookieSetChanged){ | if (data.scriptData["allowDocumentCookieSetChanged"].value){ | function doOnOk(){ if (allowWindowOpenChanged){ pref.SetBoolPref("dom.disable_open_during_load", !document.getElementById("allowWindowOpen").checked); } if (allowWindowMoveResizeChanged){ var myValue = document.getElementById("allowWindowMoveResize").checked; setCapabilityPolicy("capability.policy.default.Window.resizeTo", myValue); setCapabilityPolicy("capability.policy.default.Window.innerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.innerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.sizeToContent", myValue); setCapabilityPolicy("capability.policy.default.Window.resizeBy", myValue); setCapabilityPolicy("capability.policy.default.Window.screenX.set", myValue); setCapabilityPolicy("capability.policy.default.Window.screenY.set", myValue); setCapabilityPolicy("capability.policy.default.Window.moveTo", myValue); setCapabilityPolicy("capability.policy.default.Window.moveBy", myValue); } if (allowWindowStatusChangeChanged){ setCapabilityPolicy("capability.policy.default.Window.status", document.getElementById("allowWindowStatusChange").checked); } if (allowWindowFlipChanged){ setCapabilityPolicy("capability.policy.default.Window.focus", document.getElementById("allowWindowFlip").checked); } if (allowDocumentCookieSetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.set", document.getElementById("allowDocumentCookieSet").checked); } if (allowDocumentCookieGetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.get", document.getElementById("allowDocumentCookieGet").checked); } if (allowImageSrcChangeChanged){ setCapabilityPolicy("capability.policy.default.HTMLImageElement.src", document.getElementById("allowImageSrcChange").checked); }} |
document.getElementById("allowDocumentCookieSet").checked); | getCheckboxValue("allowDocumentCookieSet")); | function doOnOk(){ if (allowWindowOpenChanged){ pref.SetBoolPref("dom.disable_open_during_load", !document.getElementById("allowWindowOpen").checked); } if (allowWindowMoveResizeChanged){ var myValue = document.getElementById("allowWindowMoveResize").checked; setCapabilityPolicy("capability.policy.default.Window.resizeTo", myValue); setCapabilityPolicy("capability.policy.default.Window.innerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.innerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.sizeToContent", myValue); setCapabilityPolicy("capability.policy.default.Window.resizeBy", myValue); setCapabilityPolicy("capability.policy.default.Window.screenX.set", myValue); setCapabilityPolicy("capability.policy.default.Window.screenY.set", myValue); setCapabilityPolicy("capability.policy.default.Window.moveTo", myValue); setCapabilityPolicy("capability.policy.default.Window.moveBy", myValue); } if (allowWindowStatusChangeChanged){ setCapabilityPolicy("capability.policy.default.Window.status", document.getElementById("allowWindowStatusChange").checked); } if (allowWindowFlipChanged){ setCapabilityPolicy("capability.policy.default.Window.focus", document.getElementById("allowWindowFlip").checked); } if (allowDocumentCookieSetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.set", document.getElementById("allowDocumentCookieSet").checked); } if (allowDocumentCookieGetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.get", document.getElementById("allowDocumentCookieGet").checked); } if (allowImageSrcChangeChanged){ setCapabilityPolicy("capability.policy.default.HTMLImageElement.src", document.getElementById("allowImageSrcChange").checked); }} |
if (allowDocumentCookieGetChanged){ | if (data.scriptData["allowDocumentCookieGetChanged"].value){ | function doOnOk(){ if (allowWindowOpenChanged){ pref.SetBoolPref("dom.disable_open_during_load", !document.getElementById("allowWindowOpen").checked); } if (allowWindowMoveResizeChanged){ var myValue = document.getElementById("allowWindowMoveResize").checked; setCapabilityPolicy("capability.policy.default.Window.resizeTo", myValue); setCapabilityPolicy("capability.policy.default.Window.innerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.innerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.sizeToContent", myValue); setCapabilityPolicy("capability.policy.default.Window.resizeBy", myValue); setCapabilityPolicy("capability.policy.default.Window.screenX.set", myValue); setCapabilityPolicy("capability.policy.default.Window.screenY.set", myValue); setCapabilityPolicy("capability.policy.default.Window.moveTo", myValue); setCapabilityPolicy("capability.policy.default.Window.moveBy", myValue); } if (allowWindowStatusChangeChanged){ setCapabilityPolicy("capability.policy.default.Window.status", document.getElementById("allowWindowStatusChange").checked); } if (allowWindowFlipChanged){ setCapabilityPolicy("capability.policy.default.Window.focus", document.getElementById("allowWindowFlip").checked); } if (allowDocumentCookieSetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.set", document.getElementById("allowDocumentCookieSet").checked); } if (allowDocumentCookieGetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.get", document.getElementById("allowDocumentCookieGet").checked); } if (allowImageSrcChangeChanged){ setCapabilityPolicy("capability.policy.default.HTMLImageElement.src", document.getElementById("allowImageSrcChange").checked); }} |
document.getElementById("allowDocumentCookieGet").checked); | getCheckboxValue("allowDocumentCookieGet")); | function doOnOk(){ if (allowWindowOpenChanged){ pref.SetBoolPref("dom.disable_open_during_load", !document.getElementById("allowWindowOpen").checked); } if (allowWindowMoveResizeChanged){ var myValue = document.getElementById("allowWindowMoveResize").checked; setCapabilityPolicy("capability.policy.default.Window.resizeTo", myValue); setCapabilityPolicy("capability.policy.default.Window.innerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.innerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.sizeToContent", myValue); setCapabilityPolicy("capability.policy.default.Window.resizeBy", myValue); setCapabilityPolicy("capability.policy.default.Window.screenX.set", myValue); setCapabilityPolicy("capability.policy.default.Window.screenY.set", myValue); setCapabilityPolicy("capability.policy.default.Window.moveTo", myValue); setCapabilityPolicy("capability.policy.default.Window.moveBy", myValue); } if (allowWindowStatusChangeChanged){ setCapabilityPolicy("capability.policy.default.Window.status", document.getElementById("allowWindowStatusChange").checked); } if (allowWindowFlipChanged){ setCapabilityPolicy("capability.policy.default.Window.focus", document.getElementById("allowWindowFlip").checked); } if (allowDocumentCookieSetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.set", document.getElementById("allowDocumentCookieSet").checked); } if (allowDocumentCookieGetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.get", document.getElementById("allowDocumentCookieGet").checked); } if (allowImageSrcChangeChanged){ setCapabilityPolicy("capability.policy.default.HTMLImageElement.src", document.getElementById("allowImageSrcChange").checked); }} |
if (allowImageSrcChangeChanged){ | if (data.scriptData["allowImageSrcChangeChanged"].value){ | function doOnOk(){ if (allowWindowOpenChanged){ pref.SetBoolPref("dom.disable_open_during_load", !document.getElementById("allowWindowOpen").checked); } if (allowWindowMoveResizeChanged){ var myValue = document.getElementById("allowWindowMoveResize").checked; setCapabilityPolicy("capability.policy.default.Window.resizeTo", myValue); setCapabilityPolicy("capability.policy.default.Window.innerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.innerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.sizeToContent", myValue); setCapabilityPolicy("capability.policy.default.Window.resizeBy", myValue); setCapabilityPolicy("capability.policy.default.Window.screenX.set", myValue); setCapabilityPolicy("capability.policy.default.Window.screenY.set", myValue); setCapabilityPolicy("capability.policy.default.Window.moveTo", myValue); setCapabilityPolicy("capability.policy.default.Window.moveBy", myValue); } if (allowWindowStatusChangeChanged){ setCapabilityPolicy("capability.policy.default.Window.status", document.getElementById("allowWindowStatusChange").checked); } if (allowWindowFlipChanged){ setCapabilityPolicy("capability.policy.default.Window.focus", document.getElementById("allowWindowFlip").checked); } if (allowDocumentCookieSetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.set", document.getElementById("allowDocumentCookieSet").checked); } if (allowDocumentCookieGetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.get", document.getElementById("allowDocumentCookieGet").checked); } if (allowImageSrcChangeChanged){ setCapabilityPolicy("capability.policy.default.HTMLImageElement.src", document.getElementById("allowImageSrcChange").checked); }} |
document.getElementById("allowImageSrcChange").checked); | getCheckboxValue("allowImageSrcChange")); | function doOnOk(){ if (allowWindowOpenChanged){ pref.SetBoolPref("dom.disable_open_during_load", !document.getElementById("allowWindowOpen").checked); } if (allowWindowMoveResizeChanged){ var myValue = document.getElementById("allowWindowMoveResize").checked; setCapabilityPolicy("capability.policy.default.Window.resizeTo", myValue); setCapabilityPolicy("capability.policy.default.Window.innerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.innerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerWidth.set", myValue); setCapabilityPolicy("capability.policy.default.Window.outerHeight.set", myValue); setCapabilityPolicy("capability.policy.default.Window.sizeToContent", myValue); setCapabilityPolicy("capability.policy.default.Window.resizeBy", myValue); setCapabilityPolicy("capability.policy.default.Window.screenX.set", myValue); setCapabilityPolicy("capability.policy.default.Window.screenY.set", myValue); setCapabilityPolicy("capability.policy.default.Window.moveTo", myValue); setCapabilityPolicy("capability.policy.default.Window.moveBy", myValue); } if (allowWindowStatusChangeChanged){ setCapabilityPolicy("capability.policy.default.Window.status", document.getElementById("allowWindowStatusChange").checked); } if (allowWindowFlipChanged){ setCapabilityPolicy("capability.policy.default.Window.focus", document.getElementById("allowWindowFlip").checked); } if (allowDocumentCookieSetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.set", document.getElementById("allowDocumentCookieSet").checked); } if (allowDocumentCookieGetChanged){ setCapabilityPolicy("capability.policy.default.HTMLDocument.cookie.get", document.getElementById("allowDocumentCookieGet").checked); } if (allowImageSrcChangeChanged){ setCapabilityPolicy("capability.policy.default.HTMLImageElement.src", document.getElementById("allowImageSrcChange").checked); }} |
var newPrefValue = document.getElementById("startupPage").value; | var newPrefValue; try { newPrefValue = gData.navigatorData["startupPage"].value; } catch(ex) { gData = parent.hPrefWindow.wsm.dataManager .pageData["chrome: newPrefValue = gData.navigatorData["startupPage"].value; } | function doOnOk(){ var newPrefValue = document.getElementById("startupPage").value; if (gData.navigatorData["startupPage"].changed) { // if our home page isn't the last page visited anymore, // set the last_page_visited to "" for privacy reasons. if (gData.navigatorData["startupPage"].originalValue == 2) { parent.hPrefWindow.setPref("string", "browser.history.last_page_visited", ""); } else if (newPrefValue == 2) { parent.hPrefWindow.setPref("string", "browser.history.last_page_visited", getCurrentPage()); } }} |
window.close(); | function doOpen(){ try { var localFile = targetFile.QueryInterface(Components.interfaces.nsILocalFile); if (localFile) localFile.launch(); } catch (ex) {}} |
|
window.close(); | function doOpenFolder(){ try { var localFile = targetFile.QueryInterface(Components.interfaces.nsILocalFile); if (localFile) localFile.reveal(); } catch (ex) {}} |
|
canEnableAll = (dialog.srcInput.value.length > 0); | canEnableAll = imageType; | function doOverallEnabling(){ var canEnableAll; canEnableAll = (dialog.srcInput.value.length > 0); if ( wasEnableAll == canEnableAll ) return; wasEnableAll = canEnableAll; btn = document.getElementById("OK"); if ( btn ) { btn.disabled = (!canEnableAll && hasAnyChanged); } fieldset = document.getElementById("imagedimensionsFieldset"); if ( fieldset ) { SetElementEnabledByID("imagedimensionsFieldset", canEnableAll ); doDimensionEnabling( canEnableAll ); } // handle altText and MoreFewer button SetClassEnabledByID( "image.altTextLabel", canEnableAll ); SetElementEnabledByID("image.altTextInput", canEnableAll ); SetElementEnabledByID("MoreFewerButton", canEnableAll ); SetElementEnabledByID("AdvancedButton", canEnableAll ); // alignment SetClassEnabledByID( "imagealignmentLabel", canEnableAll ); SetElementEnabledByID("image.alignType", canEnableAll ); // spacing fieldset SetElementEnabledByID("spacing.fieldset", canEnableAll ); SetElementEnabledByID("imageleftrightInput", canEnableAll ); SetElementEnabledByID("imagetopbottomInput", canEnableAll ); SetElementEnabledByID("imageborderInput", canEnableAll ); // do spacing labels SetClassEnabledByID( "leftrightLabel", canEnableAll ); SetClassEnabledByID( "leftrighttypeLabel", canEnableAll ); SetClassEnabledByID( "topbottomLabel", canEnableAll ); SetClassEnabledByID( "topbottomtypeLabel", canEnableAll ); SetClassEnabledByID( "borderLabel", canEnableAll ); SetClassEnabledByID( "bordertypeLabel", canEnableAll );} |
customradio = document.getElementById( "customsizeRadio" ); if(customradio.checked){ SetElementEnabledByID("heightunitSelect", canEnableAll ); SetElementEnabledByID("widthunitSelect", canEnableAll ); } | function doOverallEnabling(){ var canEnableAll; canEnableAll = (dialog.srcInput.value.length > 0); if ( wasEnableAll == canEnableAll ) return; wasEnableAll = canEnableAll; btn = document.getElementById("OK"); if ( btn ) { btn.disabled = (!canEnableAll && hasAnyChanged); } fieldset = document.getElementById("imagedimensionsFieldset"); if ( fieldset ) { SetElementEnabledByID("imagedimensionsFieldset", canEnableAll ); doDimensionEnabling( canEnableAll ); } // handle altText and MoreFewer button SetClassEnabledByID( "image.altTextLabel", canEnableAll ); SetElementEnabledByID("image.altTextInput", canEnableAll ); SetElementEnabledByID("MoreFewerButton", canEnableAll ); SetElementEnabledByID("AdvancedButton", canEnableAll ); // alignment SetClassEnabledByID( "imagealignmentLabel", canEnableAll ); SetElementEnabledByID("image.alignType", canEnableAll ); // spacing fieldset SetElementEnabledByID("spacing.fieldset", canEnableAll ); SetElementEnabledByID("imageleftrightInput", canEnableAll ); SetElementEnabledByID("imagetopbottomInput", canEnableAll ); SetElementEnabledByID("imageborderInput", canEnableAll ); // do spacing labels SetClassEnabledByID( "leftrightLabel", canEnableAll ); SetClassEnabledByID( "leftrighttypeLabel", canEnableAll ); SetClassEnabledByID( "topbottomLabel", canEnableAll ); SetClassEnabledByID( "topbottomtypeLabel", canEnableAll ); SetClassEnabledByID( "borderLabel", canEnableAll ); SetClassEnabledByID( "bordertypeLabel", canEnableAll );} |
|
dump("doOverallEnabling called\n"); | function doOverallEnabling(){dump("doOverallEnabling called\n"); var imageTypeExtension = checkForImage(); var canEnableAll = imageTypeExtension != 0; if ( wasEnableAll == canEnableAll ) return; wasEnableAll = canEnableAll; SetElementEnabledByID("ok", canEnableAll ); SetElementEnabledByID( "altTextLabel", canEnableAll ); // Do widgets for sizing SetElementEnabledByID( "originalsizeLabel", canEnableAll ); SetElementEnabledByID( "customsizeLabel", canEnableAll ); SetElementEnabledByID( "dimensionsLabel", canEnableAll ); doDimensionEnabling( canEnableAll ); SetElementEnabledByID("alignLabel", canEnableAll ); SetElementEnabledByID("alignTypeSelect", canEnableAll ); // spacing fieldset 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);} |
|
var pos; | function doPopup(popup) { if (client.inputPopup && client.inputPopup != popup) client.inputPopup.hidePopup(); client.inputPopup = popup; if (popup) { var box = el.boxObject; if (!box) box = el.ownerDocument.getBoxObjectFor(el); if (el.nodeName == "textbox") pos = { x: box.screenX, y: box.screenY - box.height - popup.boxObject.height }; else pos = { x: box.screenX + 5, y: box.screenY + box.height + 25 }; popup.moveTo(pos.x, pos.y); popup.showPopup(el, 0, 0, "tooltip"); } } |
|
var rdf = Components.classes["component: | var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(); | function doResultClick(node){ var theID = node.id; if (!theID) return(false); 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(theID, true); var urlProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#URL", true); var bannerProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Banner", true); var htmlProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#HTML", true); var url = internetSearchStore.GetTarget(src, urlProperty, true); if (url) url = url.QueryInterface(Components.interfaces.nsIRDFLiteral); if (url) url = url.Value; if (url) { var statusNode = document.getElementById("status-button"); if (statusNode) { statusNode.setAttribute("value", url); } } var banner = internetSearchStore.GetTarget(src, bannerProperty, true); if (banner) banner = banner.QueryInterface(Components.interfaces.nsIRDFLiteral); if (banner) banner = banner.Value; var target = internetSearchStore.GetTarget(src, htmlProperty, true); if (target) target = target.QueryInterface(Components.interfaces.nsIRDFLiteral); if (target) target = target.Value; if (target) { var text = "<HTML><HEAD><TITLE>Search</TITLE><BASE TARGET='_top'></HEAD><BODY><FONT POINT-SIZE='9'>"; if (banner) text += banner + "</A><BR>"; // add a </A> and a <BR> just in case text += target; text += "</FONT></BODY></HTML>" var doc = frames[0].document; doc.open("text/html", "replace"); doc.writeln(text); doc.close(); } } } } catch(ex) { } return(true);} |
dump("*** navWindow = " + navWindow + "\n"); | function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click var searchMode = 0; var mClickCount = 1; var prefvalue = false; try { if( pref ) { searchMode = pref.GetIntPref("browser.search.mode"); prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); mClickCount = prefvalue ? 2 : 1; } } catch(e) { searchMode = 0; mClickCount = 1; prefvalue = false; } var tree = document.getElementById("Tree"); if (mClickCount == 1) { tree.setAttribute("singleclick","true"); } else { tree.removeAttribute("singleclick"); } // hide various columns var navWindow = getNavigatorWindow(); if( navWindow._content.isMozillaSearchWindow ) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if(!textNode) return(false); if ( !textNode.value ) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } var searchURL = ""; var foundEngine = false; var engineURIs = []; if (searchMode > 0) { // in advanced search mode, get selected search engines // (for the current search category) var engineBox = document.getElementById("engineKids"); if (!engineBox) return(false); for (var x = 0; x<engineBox.childNodes.length; x++) { var treeitemNode = engineBox.childNodes[x]; if (!treeitemNode) continue; var checkboxNode = treeitemNode.firstChild.firstChild.firstChild; if (!checkboxNode) continue; if ( checkboxNode.checked == true || checkboxNode.checked == "true") { var engineURI = treeitemNode.getAttribute("id"); if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (!foundEngine) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var treeitemNode = engineBox.firstChild; engineURIs[engineURIs.length] = treeitemNode.getAttribute("id"); } else { for( var i = 0; i < engineBox.childNodes.length; i++ ) { var treeitemNode = engineBox.childNodes[i]; var theID = treeitemNode.getAttribute("id"); if( theID.indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = theID; foundEngine = true; break; } } if (foundEngine == false) { alert(bundle.GetStringFromName("enterstringandlocation") ); return(false); } } } } // hide search button var searchButtonNode = document.getElementById("searchbutton"); if (searchButtonNode) searchButtonNode.setAttribute("style", "display: none;"); // show stop button var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) stopButtonNode.removeAttribute("style", "display: none;"); var progressNode = top.document.getElementById("statusbar-icon"); if (progressNode) progressNode.setAttribute( "mode", "undetermined" ); // run the search OpenSearch(textNode.value, engineURIs ); switchTab(0); return(true);} |
|
if( parent.content.isMozillaSearchWindow ) { colNode = parent.content.document.getElementById("RelevanceColumn"); | if( parent._content.isMozillaSearchWindow ) { colNode = parent._content.document.getElementById("RelevanceColumn"); | function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click try { if( pref ) { var prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); var mClickCount = prefvalue ? 2 : 1; } else mClickCount = 1; } catch(e) { mClickCount = 1; } var tree = document.getElementById("Tree"); if (mClickCount == 1) tree.setAttribute("singleclick","true"); else tree.removeAttribute("singleclick"); //end insert for single click appearance // hide search button var searchButtonNode = document.getElementById("searchbutton"); var stopButtonNode = document.getElementById("stopbutton"); var progressNode = top.document.getElementById("statusbar-icon"); if( !stopButtonNode || !searchButtonNode ) return; // hide various columns if( parent.content.isMozillaSearchWindow ) { colNode = parent.content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent.content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent.content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if( !textNode ) return false; if ( !textNode.value ) { alert( bundle.GetStringFromName("enterstringandlocation") ); return false; } // get selected search engines var engineBox = document.getElementById("searchengines"); if (!engineBox) return(false); var searchURL = ""; var foundEngine = false; var engineURIs = []; for (var x = 0; x<engineBox.childNodes.length; x++) { var checkbox = engineBox.childNodes[x]; if (!checkbox) continue; if ( checkbox.checked == true || checkbox.checked == "true") { var engineURI = checkbox.getAttribute("id"); if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (foundEngine == false) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var checkbox = engineBox.firstChild; engineURIs[engineURIs.length] = checkbox.getAttribute( "id" ); } else { debug("*** multiple search engines present, selecting the netscape search engine\n"); for( var i = 0; i < engineBox.childNodes.length; i++ ) { var checkbox = engineBox.childNodes[i]; debug("*** the current URI is = " + checkbox.getAttribute("id") + "\n"); if( checkbox.getAttribute("id").indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = checkbox.getAttribute("id"); break; } } } } progressNode.setAttribute( "mode", "undetermined" ); searchButtonNode.setAttribute("style", "display: none;"); stopButtonNode.removeAttribute("style", "display: none;"); // run the search OpenSearch("internet", false, textNode.value, engineURIs ); switchTab(0); return true;} |
colNode = parent.content.document.getElementById("PriceColumn"); | colNode = parent._content.document.getElementById("PriceColumn"); | function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click try { if( pref ) { var prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); var mClickCount = prefvalue ? 2 : 1; } else mClickCount = 1; } catch(e) { mClickCount = 1; } var tree = document.getElementById("Tree"); if (mClickCount == 1) tree.setAttribute("singleclick","true"); else tree.removeAttribute("singleclick"); //end insert for single click appearance // hide search button var searchButtonNode = document.getElementById("searchbutton"); var stopButtonNode = document.getElementById("stopbutton"); var progressNode = top.document.getElementById("statusbar-icon"); if( !stopButtonNode || !searchButtonNode ) return; // hide various columns if( parent.content.isMozillaSearchWindow ) { colNode = parent.content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent.content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent.content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if( !textNode ) return false; if ( !textNode.value ) { alert( bundle.GetStringFromName("enterstringandlocation") ); return false; } // get selected search engines var engineBox = document.getElementById("searchengines"); if (!engineBox) return(false); var searchURL = ""; var foundEngine = false; var engineURIs = []; for (var x = 0; x<engineBox.childNodes.length; x++) { var checkbox = engineBox.childNodes[x]; if (!checkbox) continue; if ( checkbox.checked == true || checkbox.checked == "true") { var engineURI = checkbox.getAttribute("id"); if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (foundEngine == false) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var checkbox = engineBox.firstChild; engineURIs[engineURIs.length] = checkbox.getAttribute( "id" ); } else { debug("*** multiple search engines present, selecting the netscape search engine\n"); for( var i = 0; i < engineBox.childNodes.length; i++ ) { var checkbox = engineBox.childNodes[i]; debug("*** the current URI is = " + checkbox.getAttribute("id") + "\n"); if( checkbox.getAttribute("id").indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = checkbox.getAttribute("id"); break; } } } } progressNode.setAttribute( "mode", "undetermined" ); searchButtonNode.setAttribute("style", "display: none;"); stopButtonNode.removeAttribute("style", "display: none;"); // run the search OpenSearch("internet", false, textNode.value, engineURIs ); switchTab(0); return true;} |
colNode = parent.content.document.getElementById("AvailabilityColumn"); | colNode = parent._content.document.getElementById("AvailabilityColumn"); | function doSearch(){ var searchButton = document.getElementById("searchbutton"); if ( searchButton.getAttribute("disabled") ) { var sidebarSearchText = document.getElementById("sidebar-search-text"); sidebarSearchText.focus(); return; } //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click try { if( pref ) { var prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); var mClickCount = prefvalue ? 2 : 1; } else mClickCount = 1; } catch(e) { mClickCount = 1; } var tree = document.getElementById("Tree"); if (mClickCount == 1) tree.setAttribute("singleclick","true"); else tree.removeAttribute("singleclick"); //end insert for single click appearance // hide search button var searchButtonNode = document.getElementById("searchbutton"); var stopButtonNode = document.getElementById("stopbutton"); var progressNode = top.document.getElementById("statusbar-icon"); if( !stopButtonNode || !searchButtonNode ) return; // hide various columns if( parent.content.isMozillaSearchWindow ) { colNode = parent.content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent.content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent.content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if( !textNode ) return false; if ( !textNode.value ) { alert( bundle.GetStringFromName("enterstringandlocation") ); return false; } // get selected search engines var engineBox = document.getElementById("searchengines"); if (!engineBox) return(false); var searchURL = ""; var foundEngine = false; var engineURIs = []; for (var x = 0; x<engineBox.childNodes.length; x++) { var checkbox = engineBox.childNodes[x]; if (!checkbox) continue; if ( checkbox.checked == true || checkbox.checked == "true") { var engineURI = checkbox.getAttribute("id"); if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (foundEngine == false) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var checkbox = engineBox.firstChild; engineURIs[engineURIs.length] = checkbox.getAttribute( "id" ); } else { debug("*** multiple search engines present, selecting the netscape search engine\n"); for( var i = 0; i < engineBox.childNodes.length; i++ ) { var checkbox = engineBox.childNodes[i]; debug("*** the current URI is = " + checkbox.getAttribute("id") + "\n"); if( checkbox.getAttribute("id").indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = checkbox.getAttribute("id"); break; } } } } progressNode.setAttribute( "mode", "undetermined" ); searchButtonNode.setAttribute("style", "display: none;"); stopButtonNode.removeAttribute("style", "display: none;"); // run the search OpenSearch("internet", false, textNode.value, engineURIs ); switchTab(0); return true;} |
var checkedFlag = false; var checkbox = treeItem.firstChild.firstChild.firstChild; if ( checkbox.checked == true || checkbox.getAttribute("checked") == "1") checkedFlag = true; | var checkbox = treeItem.firstChild.firstChild.firstChild; var checkedFlag = checkbox.checked; | function doSearch(){ //get click count pref for later //and set tree attribute to cause proper results appearance (like links) to happen //when user set pref to single click try { if( pref ) { var prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" ); var mClickCount = prefvalue ? 2 : 1; } else mClickCount = 1; } catch(e) { mClickCount = 1; } var tree = document.getElementById("Tree"); if (mClickCount == 1) tree.setAttribute("singleclick","true"); else tree.removeAttribute("singleclick"); //end insert for single click appearance // hide search button var searchButtonNode = document.getElementById("searchbutton"); var stopButtonNode = document.getElementById("stopbutton"); var progressNode = top.document.getElementById("statusbar-icon"); if( !stopButtonNode || !searchButtonNode ) return; // hide various columns if( parent.content.isMozillaSearchWindow ) { colNode = parent.content.document.getElementById("RelevanceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent.content.document.getElementById("PriceColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); colNode = parent.content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.setAttribute("style", "width: 0; visibility: collapse;"); } // get user text to find var textNode = document.getElementById("sidebar-search-text"); if( !textNode ) return false; if ( !textNode.value ) { alert( bundle.GetStringFromName("enterstringandlocation") ); return false; } // get selected search engines var treeNode = document.getElementById("searchengines"); if (!treeNode) return(false); var numChildren = treeNode.childNodes.length; for (var x = 0; x<numChildren; x++) { if (treeNode.childNodes[x].tagName == "treechildren") { var treeChildrenNode = treeNode.childNodes[x]; break; } } if ( !treeChildrenNode ) return false; var searchURL = ""; var foundEngine = false; var engineURIs = []; var numEngines = treeChildrenNode.childNodes.length; for (var x = 0; x<numEngines; x++) { var treeItem = treeChildrenNode.childNodes[x]; if (!treeItem) continue; var checkedFlag = false; var checkbox = treeItem.firstChild.firstChild.firstChild; if ( checkbox.checked == true || checkbox.getAttribute("checked") == "1") checkedFlag = true; if ( checkedFlag ) { var engineURI = treeItem.getAttribute("id"); if (!engineURI) continue; engineURIs[engineURIs.length] = engineURI; foundEngine = true; } } if (foundEngine == false) { if( getNumEngines() == 1 ) { // only one engine in this category, check it var treeItem = treeChildrenNode.firstChild; engineURIs[engineURIs.length] = treeItem.getAttribute( "id" ); } else {// dump("*** multiple search engines present, selecting the netscape search engine\n"); for( var i = 0; i < treeChildrenNode.childNodes.length; i++ ) { var currItem = treeChildrenNode.childNodes[i];// dump("*** the current URI is = " + currItem.getAttribute("id") + "\n"); if( currItem.getAttribute("id").indexOf("NetscapeSearch.src") != -1 ) { engineURIs[engineURIs.length] = currItem.getAttribute("id"); break; } } } } progressNode.setAttribute( "mode", "undetermined" ); searchButtonNode.setAttribute("style", "display: none;"); stopButtonNode.removeAttribute("style", "display: none;"); // run the search OpenSearch("internet", false, textNode.value, engineURIs ); return true;} |
var isupports = Components.classes[XULSORTSERVICE_PROGID].getService(); | var isupports = Components.classes[XULSORTSERVICE_CONTRACTID].getService(); | function doSort(sortColName){ var node = document.getElementById(sortColName); if (!node) return(false); // determine column resource to sort on var sortResource = node.getAttribute('resource'); // switch between ascending & descending sort (no natural order support) var sortDirection="ascending"; var isSortActive = node.getAttribute('sortActive'); if (isSortActive == "true") { var currentDirection = node.getAttribute('sortDirection'); if (currentDirection == "ascending") { sortDirection = "descending"; } } try { var isupports = Components.classes[XULSORTSERVICE_PROGID].getService(); if (!isupports) return(false); var xulSortService = isupports.QueryInterface(nsIXULSortService); if (!xulSortService) return(false); xulSortService.Sort(node, sortResource, sortDirection); } catch(ex) { } return(false);} |
var isupports = Components.classes["component: | var isupports = Components.classes["@mozilla.org/rdf/xul-sort-service;1"].getService(); | function doSort(sortColName, naturalOrderResource){ var node = document.getElementById(sortColName); // determine column resource to sort on var sortResource = node.getAttribute('resource'); if (!sortResource) return(false); var sortDirection="ascending"; var isSortActive = node.getAttribute('sortActive'); if (isSortActive == "true") { sortDirection = "ascending"; var currentDirection = node.getAttribute('sortDirection'); if (currentDirection == "ascending") { if (sortResource != naturalOrderResource) { sortDirection = "descending"; } } else if (currentDirection == "descending") { if (naturalOrderResource != null && naturalOrderResource != "") { sortResource = naturalOrderResource; } } } var isupports = Components.classes["component://netscape/rdf/xul-sort-service"].getService(); if (!isupports) return(false); var xulSortService = isupports.QueryInterface(Components.interfaces.nsIXULSortService); if (!xulSortService) return(false); try { xulSortService.Sort(node, sortResource, sortDirection); } catch(ex) { debug("Exception calling xulSortService.Sort()"); } return(true);} |
var isupports = Components.classes["component: | var isupports = Components.classes["@mozilla.org/rdf/xul-sort-service;1"].getService(); | function DoSort(column, key, direction){ var isupports = Components.classes["component://netscape/rdf/xul-sort-service"].getService(); if (!isupports) return(false); var xulSortService = isupports.QueryInterface(Components.interfaces.nsIXULSortService); if (!xulSortService) return(false); var node = document.getElementById(column); if ( node ) { var selectionArray = RememberResultsTreeSelection(); if (selectionArray.length) { xulSortService.Sort(node, key, direction); ClearResultsTreeSelection() ; WaitUntilDocumentIsLoaded(); RestoreResultsTreeSelection(selectionArray); } }} |
window._content.focus(); | gContentWindow.focus(); | function doStatefulCommand(commandID, newState){ var commandNode = document.getElementById(commandID); if (commandNode) commandNode.setAttribute("state", newState); window._content.focus(); // needed for command dispatch to work goDoCommand(commandID);} |
var resultsTree = top.content.document.getElementById("internetresultstree"); | var resultsTree = top._content.document.getElementById("internetresultstree"); | function doStop(){ // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); var stopButtonNode = document.getElementById("stopbutton"); var searchButtonNode = document.getElementById("searchbutton"); if(progressNode && stopButtonNode && searchButtonNode ) { progressNode.setAttribute("mode", "normal"); stopButtonNode.setAttribute("style", "display: none;"); searchButtonNode.setAttribute("style", "display: inherit;"); } // stop any network connections var isupports = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService(); if (isupports) { var internetSearchService = isupports.QueryInterface(Components.interfaces.nsIInternetSearchService); if (internetSearchService) internetSearchService.Stop(); } // get various services var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); var internetSearch = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService(); if (internetSearch) internetSearch = internetSearch.QueryInterface(Components.interfaces.nsIRDFDataSource); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var resultsTree = top.content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); if(hasPriceFlag == true) { var colNode = top.content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top.content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = top.content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = top.content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = top.content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top.content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = top.content.document.getElementById("PageRankColumn"); if (colNode) top.content.setInitialSort(colNode, "ascending"); } switchTab(0);} |
var colNode = top.content.document.getElementById("PriceColumn"); | var colNode = top._content.document.getElementById("PriceColumn"); | function doStop(){ // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); var stopButtonNode = document.getElementById("stopbutton"); var searchButtonNode = document.getElementById("searchbutton"); if(progressNode && stopButtonNode && searchButtonNode ) { progressNode.setAttribute("mode", "normal"); stopButtonNode.setAttribute("style", "display: none;"); searchButtonNode.setAttribute("style", "display: inherit;"); } // stop any network connections var isupports = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService(); if (isupports) { var internetSearchService = isupports.QueryInterface(Components.interfaces.nsIInternetSearchService); if (internetSearchService) internetSearchService.Stop(); } // get various services var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); var internetSearch = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService(); if (internetSearch) internetSearch = internetSearch.QueryInterface(Components.interfaces.nsIRDFDataSource); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var resultsTree = top.content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); if(hasPriceFlag == true) { var colNode = top.content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top.content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = top.content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = top.content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = top.content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top.content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = top.content.document.getElementById("PageRankColumn"); if (colNode) top.content.setInitialSort(colNode, "ascending"); } switchTab(0);} |
top.content.setInitialSort(colNode, "ascending"); | top._content.setInitialSort(colNode, "ascending"); | function doStop(){ // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); var stopButtonNode = document.getElementById("stopbutton"); var searchButtonNode = document.getElementById("searchbutton"); if(progressNode && stopButtonNode && searchButtonNode ) { progressNode.setAttribute("mode", "normal"); stopButtonNode.setAttribute("style", "display: none;"); searchButtonNode.setAttribute("style", "display: inherit;"); } // stop any network connections var isupports = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService(); if (isupports) { var internetSearchService = isupports.QueryInterface(Components.interfaces.nsIInternetSearchService); if (internetSearchService) internetSearchService.Stop(); } // get various services var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); var internetSearch = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService(); if (internetSearch) internetSearch = internetSearch.QueryInterface(Components.interfaces.nsIRDFDataSource); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var resultsTree = top.content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); if(hasPriceFlag == true) { var colNode = top.content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top.content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = top.content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = top.content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = top.content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top.content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = top.content.document.getElementById("PageRankColumn"); if (colNode) top.content.setInitialSort(colNode, "ascending"); } switchTab(0);} |
colNode = top.content.document.getElementById("AvailabilityColumn"); | colNode = top._content.document.getElementById("AvailabilityColumn"); | function doStop(){ // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); var stopButtonNode = document.getElementById("stopbutton"); var searchButtonNode = document.getElementById("searchbutton"); if(progressNode && stopButtonNode && searchButtonNode ) { progressNode.setAttribute("mode", "normal"); stopButtonNode.setAttribute("style", "display: none;"); searchButtonNode.setAttribute("style", "display: inherit;"); } // stop any network connections var isupports = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService(); if (isupports) { var internetSearchService = isupports.QueryInterface(Components.interfaces.nsIInternetSearchService); if (internetSearchService) internetSearchService.Stop(); } // get various services var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); var internetSearch = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService(); if (internetSearch) internetSearch = internetSearch.QueryInterface(Components.interfaces.nsIRDFDataSource); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var resultsTree = top.content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); if(hasPriceFlag == true) { var colNode = top.content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top.content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = top.content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = top.content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = top.content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top.content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = top.content.document.getElementById("PageRankColumn"); if (colNode) top.content.setInitialSort(colNode, "ascending"); } switchTab(0);} |
colNode = top.content.document.getElementById("DateColumn"); | colNode = top._content.document.getElementById("DateColumn"); | function doStop(){ // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); var stopButtonNode = document.getElementById("stopbutton"); var searchButtonNode = document.getElementById("searchbutton"); if(progressNode && stopButtonNode && searchButtonNode ) { progressNode.setAttribute("mode", "normal"); stopButtonNode.setAttribute("style", "display: none;"); searchButtonNode.setAttribute("style", "display: inherit;"); } // stop any network connections var isupports = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService(); if (isupports) { var internetSearchService = isupports.QueryInterface(Components.interfaces.nsIInternetSearchService); if (internetSearchService) internetSearchService.Stop(); } // get various services var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); var internetSearch = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService(); if (internetSearch) internetSearch = internetSearch.QueryInterface(Components.interfaces.nsIRDFDataSource); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var resultsTree = top.content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); if(hasPriceFlag == true) { var colNode = top.content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top.content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = top.content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = top.content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = top.content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top.content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = top.content.document.getElementById("PageRankColumn"); if (colNode) top.content.setInitialSort(colNode, "ascending"); } switchTab(0);} |
colNode = top.content.document.getElementById("RelevanceColumn"); | colNode = top._content.document.getElementById("RelevanceColumn"); | function doStop(){ // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); var stopButtonNode = document.getElementById("stopbutton"); var searchButtonNode = document.getElementById("searchbutton"); if(progressNode && stopButtonNode && searchButtonNode ) { progressNode.setAttribute("mode", "normal"); stopButtonNode.setAttribute("style", "display: none;"); searchButtonNode.setAttribute("style", "display: inherit;"); } // stop any network connections var isupports = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService(); if (isupports) { var internetSearchService = isupports.QueryInterface(Components.interfaces.nsIInternetSearchService); if (internetSearchService) internetSearchService.Stop(); } // get various services var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); var internetSearch = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService(); if (internetSearch) internetSearch = internetSearch.QueryInterface(Components.interfaces.nsIRDFDataSource); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var resultsTree = top.content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); if(hasPriceFlag == true) { var colNode = top.content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top.content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = top.content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = top.content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = top.content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top.content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = top.content.document.getElementById("PageRankColumn"); if (colNode) top.content.setInitialSort(colNode, "ascending"); } switchTab(0);} |
top.content.setInitialSort(colNode, "descending"); | top._content.setInitialSort(colNode, "descending"); | function doStop(){ // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); var stopButtonNode = document.getElementById("stopbutton"); var searchButtonNode = document.getElementById("searchbutton"); if(progressNode && stopButtonNode && searchButtonNode ) { progressNode.setAttribute("mode", "normal"); stopButtonNode.setAttribute("style", "display: none;"); searchButtonNode.setAttribute("style", "display: inherit;"); } // stop any network connections var isupports = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService(); if (isupports) { var internetSearchService = isupports.QueryInterface(Components.interfaces.nsIInternetSearchService); if (internetSearchService) internetSearchService.Stop(); } // get various services var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); var internetSearch = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService(); if (internetSearch) internetSearch = internetSearch.QueryInterface(Components.interfaces.nsIRDFDataSource); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var resultsTree = top.content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); if(hasPriceFlag == true) { var colNode = top.content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top.content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = top.content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = top.content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = top.content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top.content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = top.content.document.getElementById("PageRankColumn"); if (colNode) top.content.setInitialSort(colNode, "ascending"); } switchTab(0);} |
colNode = top.content.document.getElementById("PageRankColumn"); | colNode = top._content.document.getElementById("PageRankColumn"); | function doStop(){ // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); var stopButtonNode = document.getElementById("stopbutton"); var searchButtonNode = document.getElementById("searchbutton"); if(progressNode && stopButtonNode && searchButtonNode ) { progressNode.setAttribute("mode", "normal"); stopButtonNode.setAttribute("style", "display: none;"); searchButtonNode.setAttribute("style", "display: inherit;"); } // stop any network connections var isupports = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService(); if (isupports) { var internetSearchService = isupports.QueryInterface(Components.interfaces.nsIInternetSearchService); if (internetSearchService) internetSearchService.Stop(); } // get various services var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService(); if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); var internetSearch = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService(); if (internetSearch) internetSearch = internetSearch.QueryInterface(Components.interfaces.nsIRDFDataSource); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var resultsTree = top.content.document.getElementById("internetresultstree"); if( !resultsTree ) return(false); var searchURL = resultsTree.getAttribute("ref"); if( !searchURL ) return(false); var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); if(hasPriceFlag == true) { var colNode = top.content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top.content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag == true) { colNode = top.content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag == true) { colNode = top.content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag == true) { colNode = top.content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (sortSetFlag == false) { top.content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (sortSetFlag == false) { colNode = top.content.document.getElementById("PageRankColumn"); if (colNode) top.content.setInitialSort(colNode, "ascending"); } switchTab(0);} |
var internetSearchService = Components.classes[ISEARCH_PROGID].getService(nsIInternetSearchService); | var internetSearchService = Components.classes[ISEARCH_CONTRACTID].getService(nsIInternetSearchService); | function doStop(){ var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) { stopButtonNode.setAttribute("style", "display: none;"); } var searchButtonNode = document.getElementById("searchbutton"); if(searchButtonNode) { searchButtonNode.setAttribute("style", "display: inherit;"); } // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); if (progressNode) { progressNode.setAttribute("mode", "normal"); } // stop any network connections var internetSearchService = Components.classes[ISEARCH_PROGID].getService(nsIInternetSearchService); var internetSearch = null; if (internetSearchService) { internetSearchService.Stop(); internetSearch = internetSearchService.QueryInterface(nsIRDFDataSource); } // get various services var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var navWindow = getNavigatorWindow(false); var resultsTree = navWindow ? navWindow._content.document.getElementById("internetresultstree") : null; if (!resultsTree) return false; var searchURL = resultsTree.getAttribute("ref"); if (!searchURL) return false; var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); var navWindow = getNavigatorWindow(false); if(hasPriceFlag) { var colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (!sortSetFlag) { top._content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag) { colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag) { colNode = navWindow._content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (!sortSetFlag) { navWindow._content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (!sortSetFlag) { colNode = navWindow._content.document.getElementById("PageRankColumn"); if (colNode) navWindow._content.setInitialSort(colNode, "ascending"); } switchTab(0);} |
var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); | var rdf = Components.classes[RDFSERVICE_CONTRACTID].getService(nsIRDFService); | function doStop(){ var stopButtonNode = document.getElementById("stopbutton"); if (stopButtonNode) { stopButtonNode.setAttribute("style", "display: none;"); } var searchButtonNode = document.getElementById("searchbutton"); if(searchButtonNode) { searchButtonNode.setAttribute("style", "display: inherit;"); } // should stop button press also stop the load of the page in the browser? I think so. var progressNode = parent.document.getElementById("statusbar-icon"); if (progressNode) { progressNode.setAttribute("mode", "normal"); } // stop any network connections var internetSearchService = Components.classes[ISEARCH_PROGID].getService(nsIInternetSearchService); var internetSearch = null; if (internetSearchService) { internetSearchService.Stop(); internetSearch = internetSearchService.QueryInterface(nsIRDFDataSource); } // get various services var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); var sortSetFlag = false; // show appropriate column(s) if ((rdf) && (internetSearch)) { var navWindow = getNavigatorWindow(false); var resultsTree = navWindow ? navWindow._content.document.getElementById("internetresultstree") : null; if (!resultsTree) return false; var searchURL = resultsTree.getAttribute("ref"); if (!searchURL) return false; var searchResource = rdf.GetResource(searchURL, true); var priceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true); var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true); var relevanceProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true); var dateProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true); var trueProperty = rdf.GetLiteral("true"); var hasPriceFlag = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true); var hasAvailabilityFlag = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true); var hasRelevanceFlag = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true); var hasDateFlag = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true); var navWindow = getNavigatorWindow(false); if(hasPriceFlag) { var colNode = navWindow._content.document.getElementById("PriceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (!sortSetFlag) { top._content.setInitialSort(colNode, "ascending"); sortSetFlag = true; } } } if (hasAvailabilityFlag) { colNode = navWindow._content.document.getElementById("AvailabilityColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasDateFlag) { colNode = navWindow._content.document.getElementById("DateColumn"); if (colNode) colNode.removeAttribute("style", "width: 0; visibility: collapse;"); } if (hasRelevanceFlag) { colNode = navWindow._content.document.getElementById("RelevanceColumn"); if (colNode) { colNode.removeAttribute("style", "width: 0; visibility: collapse;"); if (!sortSetFlag) { navWindow._content.setInitialSort(colNode, "descending"); sortSetFlag = true; } } } } if (!sortSetFlag) { colNode = navWindow._content.document.getElementById("PageRankColumn"); if (colNode) navWindow._content.setInitialSort(colNode, "ascending"); } switchTab(0);} |
BookmarksUtils.removeSelection("move", this.selection); BookmarksUtils.insertSelection("move", this.selection, this.target); | doTransaction: function () { BookmarksUtils.removeSelection("move", this.selection); BookmarksUtils.insertSelection("move", this.selection, this.target); }, |
|
const kTxMgrPROGID = "component: | const kTxMgrCONTRACTID = "@mozilla.org/transaction/manager;1"; | doTransaction: function (aTransaction) { // XXX Until the txmgr is fully scriptable, we need to perform the // transaction ourself aTransaction.doTransaction(); if (!this.mDoSeq) { // If a Transaction Seq does not exist, create one. this.makeSeq(vxVFDDoTransactionSeq); } _dd("we've successfully made a sequence\n"); // add the transaction to the stack this.mDoSeq.AppendElement(aTransaction); if (!this.mTxMgr) { // If a Transaction Manager does not exist for this VFD, // create one. const kTxMgrPROGID = "component://netscape/transaction/manager"; const kTxMgrIID = "nsITransactionManager"; // XXX comment this out until this works // this.mTxMgr = nsJSComponentManager.getService(kTxMgrPROGID, kTxMgrIID); } // do the transaction // XXX comment this out until this works // this.mTxMgr.doTransaction(aTransaction); }, |
if ( !imageType ) return; | function doValueChanged(){ if ( !imageType ) return; if ( !hasAnyChanged ) { hasAnyChanged = true; doOverallEnabling(); hasAnyChanged = false; }} |
|
allowWindowFlipChanged = !allowWindowFlipChanged; | data.scriptData["allowWindowFlipChanged"].value = !data.scriptData["allowWindowFlipChanged"].value; | function doWindowFlipChange(){ allowWindowFlipChanged = !allowWindowFlipChanged;} |
allowWindowMoveResizeChanged = !allowWindowMoveResizeChanged; | data.scriptData["allowWindowMoveResizeChanged"].value = !data.scriptData["allowWindowMoveResizeChanged"].value; | function doWindowMoveResize(){ allowWindowMoveResizeChanged = !allowWindowMoveResizeChanged;} |
allowWindowStatusChangeChanged = !allowWindowStatusChangeChanged; | data.scriptData["allowWindowStatusChangeChanged"].value = !data.scriptData["allowWindowStatusChangeChanged"].value; | function doWindowStatusChange(){ allowWindowStatusChangeChanged = !allowWindowStatusChangeChanged;} |
return this.onParseError(this); | { this.onParseError(this); return; } | download: function(aParseItems, aCallback) { this.downloadCallback = aCallback; // may be null // Whether or not to parse items when downloading and parsing the feed. // Defaults to true, but setting to false is useful for obtaining // just the title of the feed when the user subscribes to it. this.parseItems = aParseItems == null ? true : aParseItems ? true : false; // Before we do anything...make sure the url is an http url. This is just a sanity check // so we don't try opening mailto urls, imap urls, etc. that the user may have tried to subscribe to // as an rss feed.. var uri = Components.classes["@mozilla.org/network/standard-url;1"]. createInstance(Components.interfaces.nsIURI); uri.spec = this.url; if (!(uri.schemeIs("http") || uri.schemeIs("https"))) return this.onParseError(this); // simulate an invalid feed error // Before we try to download the feed, make sure we aren't already processing the feed // by looking up the url in our feed cache if (FeedCache.getFeed(this.url)) { if (this.downloadCallback) this.downloadCallback.downloaded(this, kNewsBlogFeedIsBusy); return ; // don't do anything, the feed is already in use } this.request = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"] .createInstance(Components.interfaces.nsIXMLHttpRequest); this.request.onprogress = this.onProgress; // must be set before calling .open this.request.open("GET", this.url, true); var lastModified = this.lastModified; if (lastModified) this.request.setRequestHeader("If-Modified-Since", lastModified); this.request.overrideMimeType("text/xml"); this.request.onload = this.onDownloaded; this.request.onerror = this.onDownloadError; FeedCache.putFeed(this); this.request.send(null); }, |
var filepath = fp.file.QueryInterface(nsIFile); | function downloadChooseFolder() { const nsIFilePicker = Components.interfaces.nsIFilePicker; const nsIFile = Components.interfaces.nsIFile; var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); var refLocalFile = Components.classes["@mozilla.org/file/local;1"].createInstance(nsIFile ); fp.init(window, null, nsIFilePicker.modeSave); const nsILocalFile = Components.interfaces.nsILocalFile; var customDirPref = document.getElementById("downloadDir"); if (customDirPref.value) { var fileCustomDirFile= refLocalFile.QueryInterface(nsILocalFile); fileCustomDirFile.initWithPath(customDirPref.value); fp.displayDirectory = fileCustomDirFile; } fp.appendFilters(nsIFilePicker.filterAll); var returnFilePickerValue=fp.show(); if (returnFilePickerValue == nsIFilePicker.returnOK) { var file = fp.file.QueryInterface(nsILocalFile); var filepath = fp.file.QueryInterface(nsIFile); var currentDirPref = document.getElementById("downloadDir"); customDirPref.value = currentDirPref.value = file.path; }} |
|
customDirPref.value = currentDirPref.value = file.path; | customDirPref.value = currentDirPref.value = file.parent.path; | function downloadChooseFolder() { const nsIFilePicker = Components.interfaces.nsIFilePicker; const nsIFile = Components.interfaces.nsIFile; var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); var refLocalFile = Components.classes["@mozilla.org/file/local;1"].createInstance(nsIFile ); fp.init(window, null, nsIFilePicker.modeSave); const nsILocalFile = Components.interfaces.nsILocalFile; var customDirPref = document.getElementById("downloadDir"); if (customDirPref.value) { var fileCustomDirFile= refLocalFile.QueryInterface(nsILocalFile); fileCustomDirFile.initWithPath(customDirPref.value); fp.displayDirectory = fileCustomDirFile; } fp.appendFilters(nsIFilePicker.filterAll); var returnFilePickerValue=fp.show(); if (returnFilePickerValue == nsIFilePicker.returnOK) { var file = fp.file.QueryInterface(nsILocalFile); var filepath = fp.file.QueryInterface(nsIFile); var currentDirPref = document.getElementById("downloadDir"); customDirPref.value = currentDirPref.value = file.path; }} |
var id = aDownload.target.persistentDescriptor; | var id = aDownload.target.path; | function downloadCompleted(aDownload) { // Wrap this in try...catch since this can be called while shutting down... // it doesn't really matter if it fails then since well.. we're shutting down // and there's no UI to update! try { var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); var rdfc = Components.classes["@mozilla.org/rdf/container;1"].createInstance(Components.interfaces.nsIRDFContainer); var db = gDownloadManager.datasource; rdfc.Init(db, rdf.GetResource("NC:DownloadsRoot")); var id = aDownload.target.persistentDescriptor; var dlRes = rdf.GetUnicodeResource(id); var insertIndex = gDownloadManager.activeDownloadCount + 1; // Don't bother inserting the item into the same place! if (insertIndex != rdfc.IndexOf(dlRes)) { rdfc.RemoveElement(dlRes, true); if (insertIndex == rdfc.GetCount() || insertIndex < 1) rdfc.AppendElement(dlRes); else rdfc.InsertElementAt(dlRes, insertIndex, true); } // Remove the download from our book-keeping list and if the count // falls to zero, update the title here, since we won't be getting // any more progress notifications in which to do it. for (var i = 0; i < gActiveDownloads.length; ++i) { if (gActiveDownloads[i] == aDownload) { gActiveDownloads.splice(i, 1); break; } } if (gActiveDownloads.length == 0) window.title = document.documentElement.getAttribute("statictitle"); } catch (e) { }} |
window.title = document.documentElement.getAttribute("statictitle"); | document.title = document.documentElement.getAttribute("statictitle"); | function downloadCompleted(aDownload) { // Wrap this in try...catch since this can be called while shutting down... // it doesn't really matter if it fails then since well.. we're shutting down // and there's no UI to update! try { var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); var rdfc = Components.classes["@mozilla.org/rdf/container;1"].createInstance(Components.interfaces.nsIRDFContainer); var db = gDownloadManager.datasource; rdfc.Init(db, rdf.GetResource("NC:DownloadsRoot")); var id = aDownload.targetFile.path; // Refresh the icon, so that executable icons are shown. var mimeService = Components.classes["@mozilla.org/uriloader/external-helper-app-service;1"].getService(Components.interfaces.nsIMIMEService); var contentType = mimeService.getTypeFromFile(aDownload.targetFile); var listItem = document.getElementById(id); var oldImage = listItem.getAttribute("image"); // I tack on the content-type here as a hack to bypass the cache which seems // to be interfering despite the fact the image has 'validate="always"' set // on it. listItem.setAttribute("image", oldImage + "&contentType=" + contentType); var dlRes = rdf.GetUnicodeResource(id); var insertIndex = gDownloadManager.activeDownloadCount + 1; // Don't bother inserting the item into the same place! if (insertIndex != rdfc.IndexOf(dlRes)) { rdfc.RemoveElement(dlRes, true); if (insertIndex == rdfc.GetCount() || insertIndex < 1) rdfc.AppendElement(dlRes); else rdfc.InsertElementAt(dlRes, insertIndex, true); } // Remove the download from our book-keeping list and if the count // falls to zero, update the title here, since we won't be getting // any more progress notifications in which to do it. for (var i = 0; i < gActiveDownloads.length; ++i) { if (gActiveDownloads[i] == aDownload) { gActiveDownloads.splice(i, 1); break; } } gDownloadViewController.onCommandUpdate(); if (gActiveDownloads.length == 0) window.title = document.documentElement.getAttribute("statictitle"); } catch (e) { }} |
addFeed(feed.url, feed.name, null, folder); | addFeed(feed.url, feed.name, folder); | downloaded: function(feed, aErrorCode) { if (this.mSubscribeMode && aErrorCode == kNewsBlogSuccess) { // if we get here...we should always have a folder by now...either // in feed.folder or FeedItems created the folder for us.... var folder = feed.folder ? feed.folder : feed.server.rootMsgFolder.getChildNamed(feed.name); updateFolderFeedUrl(folder, feed.url, false); addFeed(feed.url, feed.name, null, folder); // add feed just adds the feed to the subscription UI and flushes the datasource } else if (aErrorCode == kNewsBlogInvalidFeed) this.mStatusFeedback.showStatusString(GetNewsBlogStringBundle().formatStringFromName("newsblog-invalidFeed", [feed.url], 1)); else if (aErrorCode == kNewsBlogRequestFailure) this.mStatusFeedback.showStatusString(GetNewsBlogStringBundle().formatStringFromName("newsblog-networkError", [feed.url], 1)); this.mStatusFeedback.stopMeteors(); gNumPendingFeedDownloads--; if (!gNumPendingFeedDownloads) { this.mFeeds = new Array; this.mSubscribeMode = false; // should we do this on a timer so the text sticks around for a little while? // It doesnt look like we do it on a timer for newsgroups so we'll follow that model. if (aErrorCode == kNewsBlogSuccess) // don't clear the status text if we just dumped an error to the status bar! this.mStatusFeedback.showStatusString(""); } }, |
addFeed(feed.url, feed.name, null, folder); | addFeed(feed.url, feed.name, folder); | downloaded: function(feed, aErrorCode) { // feed is null if our attempt to parse the feed failed if (aErrorCode == kNewsBlogSuccess) { updateStatusItem('progressMeter', 100); // if we get here...we should always have a folder by now...either // in feed.folder or FeedItems created the folder for us.... var folder = feed.folder ? feed.folder : gRSSServer.rootMsgFolder.getChildNamed(feed.name); updateFolderFeedUrl(folder, feed.url, false); // add feed just adds the feed we have validated and downloaded to the subscription UI. // it also flushes the subscription datasource addFeed(feed.url, feed.name, null, folder); } else if (aErrorCode == kNewsBlogInvalidFeed) // the feed was bad... window.alert(document.getElementById('bundle_newsblog').getFormattedString('newsblog-invalidFeed', [feed.url])); else // we never even downloaded the feed...(kNewsBlogRequestFailure) window.alert(document.getElementById('bundle_newsblog').getFormattedString('newsblog-networkError', [feed.url])); // our operation is done...clear out the status text and progressmeter setTimeout(clearStatusInfo, 1000); }, |
downloaded: function(feed, aSuccess) | downloaded: function(feed, aErrorCode) | downloaded: function(feed, aSuccess) { // feed is null if our attempt to parse the feed failed if (aSuccess) { updateStatusItem('progressMeter', 100); // if we get here...we should always have a folder by now...either // in feed.folder or FeedItems created the folder for us.... var folder = feed.folder ? feed.folder : gRSSServer.rootMsgFolder.getChildNamed(feed.name); updateFolderFeedUrl(folder, feed.url, false); // add feed just adds the feed we have validated and downloaded to the subscription UI. // it also flushes the subscription datasource addFeed(feed.url, feed.name, null, folder); } else { // Add some code to alert the user that the feed was not something we could understand... } // our operation is done...clear out the status text and progressmeter setTimeout(clearStatusInfo, 1000); }, |
if (aSuccess) | if (aErrorCode == kNewsBlogSuccess) | downloaded: function(feed, aSuccess) { // feed is null if our attempt to parse the feed failed if (aSuccess) { updateStatusItem('progressMeter', 100); // if we get here...we should always have a folder by now...either // in feed.folder or FeedItems created the folder for us.... var folder = feed.folder ? feed.folder : gRSSServer.rootMsgFolder.getChildNamed(feed.name); updateFolderFeedUrl(folder, feed.url, false); // add feed just adds the feed we have validated and downloaded to the subscription UI. // it also flushes the subscription datasource addFeed(feed.url, feed.name, null, folder); } else { // Add some code to alert the user that the feed was not something we could understand... } // our operation is done...clear out the status text and progressmeter setTimeout(clearStatusInfo, 1000); }, |
else { } | else if (aErrorCode == kNewsBlogInvalidFeed) window.alert(document.getElementById('bundle_newsblog').getFormattedString('newsblog-invalidFeed', [feed.url])); else window.alert(document.getElementById('bundle_newsblog').getFormattedString('newsblog-networkError', [feed.url])); | downloaded: function(feed, aSuccess) { // feed is null if our attempt to parse the feed failed if (aSuccess) { updateStatusItem('progressMeter', 100); // if we get here...we should always have a folder by now...either // in feed.folder or FeedItems created the folder for us.... var folder = feed.folder ? feed.folder : gRSSServer.rootMsgFolder.getChildNamed(feed.name); updateFolderFeedUrl(folder, feed.url, false); // add feed just adds the feed we have validated and downloaded to the subscription UI. // it also flushes the subscription datasource addFeed(feed.url, feed.name, null, folder); } else { // Add some code to alert the user that the feed was not something we could understand... } // our operation is done...clear out the status text and progressmeter setTimeout(clearStatusInfo, 1000); }, |
downloaded: function(feed) | downloaded: function(feed, aSuccess) | downloaded: function(feed) { // feed is null if our attempt to parse the feed failed if (feed) { updateStatusItem('progressMeter', 100); // if we get here...we should always have a folder by now...either // in feed.folder or FeedItems created the folder for us.... var folder = feed.folder ? feed.folder : gRSSServer.rootMsgFolder.getChildNamed(feed.name); updateFolderFeedUrl(folder, feed.url, false); // add feed just adds the feed we have validated and downloaded to the subscription UI. // it also flushes the subscription datasource addFeed(feed.url, feed.name, null, folder); } else { // Add some code to alert the user that the feed was not something we could understand... } // our operation is done...clear out the status text and progressmeter setTimeout(clearStatusInfo, 1000); }, |
if (feed) | if (aSuccess) | downloaded: function(feed) { // feed is null if our attempt to parse the feed failed if (feed) { updateStatusItem('progressMeter', 100); // if we get here...we should always have a folder by now...either // in feed.folder or FeedItems created the folder for us.... var folder = feed.folder ? feed.folder : gRSSServer.rootMsgFolder.getChildNamed(feed.name); updateFolderFeedUrl(folder, feed.url, false); // add feed just adds the feed we have validated and downloaded to the subscription UI. // it also flushes the subscription datasource addFeed(feed.url, feed.name, null, folder); } else { // Add some code to alert the user that the feed was not something we could understand... } // our operation is done...clear out the status text and progressmeter setTimeout(clearStatusInfo, 1000); }, |
var folder = feed.folder ? feed.folder : feed.server.rootMsgFolder.getChildNamed(feed.name); updateFolderFeedUrl(folder, feed.url, false); addFeed(feed.url, feed.name, folder); | updateFolderFeedUrl(feed.folder, feed.url, false); addFeed(feed.url, feed.name, feed.folder); | downloaded: function(feed, aErrorCode) { if (this.mSubscribeMode && aErrorCode == kNewsBlogSuccess) { // if we get here...we should always have a folder by now...either // in feed.folder or FeedItems created the folder for us.... var folder = feed.folder ? feed.folder : feed.server.rootMsgFolder.getChildNamed(feed.name); updateFolderFeedUrl(folder, feed.url, false); addFeed(feed.url, feed.name, folder); // add feed just adds the feed to the subscription UI and flushes the datasource } if (this.mStatusFeedback) { if (aErrorCode == kNewsBlogInvalidFeed) this.mStatusFeedback.showStatusString(GetNewsBlogStringBundle().formatStringFromName("newsblog-invalidFeed", [feed.url], 1)); else if (aErrorCode == kNewsBlogRequestFailure) this.mStatusFeedback.showStatusString(GetNewsBlogStringBundle().formatStringFromName("newsblog-networkError", [feed.url], 1)); this.mStatusFeedback.stopMeteors(); } gNumPendingFeedDownloads--; if (!gNumPendingFeedDownloads) { this.mFeeds = new Array; this.mSubscribeMode = false; // should we do this on a timer so the text sticks around for a little while? // It doesnt look like we do it on a timer for newsgroups so we'll follow that model. if (aErrorCode == kNewsBlogSuccess && this.mStatusFeedback) // don't clear the status text if we just dumped an error to the status bar! this.mStatusFeedback.showStatusString(""); } }, |
downloaded: function(feed) | downloaded: function(feed, aErrorCode) | downloaded: function(feed) { this.mStatusFeedback.stopMeteors(); gNumPendingFeedDownloads--; if (!gNumPendingFeedDownloads) { this.mFeeds = new Array; // no more pending actions...clear the status bar text...should we do this on a timer // so the text sticks around for a little while? It doesnt look like we do it on a timer for // newsgroups so we'll follow that model. this.mStatusFeedback.showStatusString(""); } }, |
this.mSubscribeMode = false; | downloaded: function(feed) { this.mStatusFeedback.stopMeteors(); gNumPendingFeedDownloads--; if (!gNumPendingFeedDownloads) { this.mFeeds = new Array; // no more pending actions...clear the status bar text...should we do this on a timer // so the text sticks around for a little while? It doesnt look like we do it on a timer for // newsgroups so we'll follow that model. this.mStatusFeedback.showStatusString(""); } }, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.