rem: var throbber1 = 'pref("browser.throbber.url",            "chrome: var homepage1 = 'pref("browser.startup.homepage",        "chrome: var homepage2 = 'pref("browser.startup.homepage_reset",  "chrome: var homepage3 = 'pref("startup.homepage_override_url",   "chrome: 
add: var throbber1 = 'pref("browser.throbber.url",            "'; var homepage1 = 'pref("browser.startup.homepage",        "'; var homepage2 = 'pref("startup.homepage_override_url",   "chrome: var chromeurl =   "chrome: var prefend = '");\n'; 
context: function CCKWriteDefaultJS(destdir){  var throbber1 = 'pref("browser.throbber.url",            "chrome://cck/content/cck.properties");\n';  var homepage1 = 'pref("browser.startup.homepage",        "chrome://cck/content/cck.properties");\n';  var homepage2 = 'pref("browser.startup.homepage_reset",  "chrome://cck/content/cck.properties");\n';  var homepage3 = 'pref("startup.homepage_override_url",   "chrome://cck/content/cck.properties");\n';    var useragent1begin = 'pref("general.useragent.vendorComment", "CK-';  var useragent2begin = 'pref("general.useragent.extra.cck", "(CK-';  var useragent1end = '");\n';  var useragent2end = ')");\n';  var file = destdir.clone();  file.append("firefox-cck.js");               var fos = Components.classes["@mozilla.org/network/file-output-stream;1"]                       .createInstance(Components.interfaces.nsIFileOutputStream);  fos.init(file, -1, -1, false);  var logobuttonurl = document.getElementById("AnimatedLogoURL").value;  if (logobuttonurl && (logobuttonurl.length > 0)) {    fos.write(throbber1, throbber1.length);  }  var browserstartuppage = document.getElementById("HomePageURL").value;  var overrideurl = document.getElementById('HomePageOverrideURL').value;  if (browserstartuppage && (browserstartuppage.length > 0)) {    fos.write(homepage1, homepage1.length);    fos.write(homepage2, homepage2.length);    fos.write(homepage3, homepage3.length);      } else if (overrideurl && overrideurl.length) {    fos.write(homepage3, homepage3.length);      }    var useragent = document.getElementById("OrganizationName").value;  if (useragent && (useragent.length > 0)) {    fos.write(useragent1begin, useragent1begin.length);    fos.write(useragent, useragent.length);    fos.write(useragent1end, useragent1end.length);    fos.write(useragent2begin, useragent2begin.length);    fos.write(useragent, useragent.length);    fos.write(useragent2end, useragent2end.length);  }    // Preferences  listbox = document.getElementById("prefList");  for (var i=0; i < listbox.getRowCount(); i++) {    listitem = listbox.getItemAtIndex(i);    var listitemvalue = listitem.value;    /* allow for locking prefs without setting value */    if (listitem.value.length) {      if ((listitemvalue == "FALSE") || (listitemvalue == "TRUE")) {        listitemvalue = listitemvalue.toLowerCase()          }      var line = 'pref("' + listitem.label + '", ' + listitemvalue + ');\n';      fos.write(line, line.length);    }  }    var radiogroup = document.getElementById("ProxyType");  if (radiogroup.value == "")    radiogroup.value = "0";  switch ( radiogroup.value ) {    case "1":      var proxystringlist = ["HTTPproxyname","SSLproxyname","FTPproxyname","Gopherproxyname","NoProxyname","autoproxyurl" ];        for (i = 0; i < proxystringlist.length; i++) {        var proxyitem = document.getElementById(proxystringlist[i]);        if (proxyitem.value.length > 0) {          var line = 'pref("' + proxyitem.getAttribute("preference") + '", "' + proxyitem.value + '");\n';          fos.write(line, line.length);        }      }        var proxyintegerlist = ["HTTPportno","SSLportno","FTPportno","Gopherportno","socksv","ProxyType"];      for (i = 0; i < proxyintegerlist.length; i++) {        var proxyitem = document.getElementById(proxyintegerlist[i]);        if (proxyitem.value.length > 0) {          var line = 'pref("' + proxyitem.getAttribute("preference") + '", ' + proxyitem.value + ');\n';          fos.write(line, line.length);        }      }        var proxyitem = document.getElementById("shareAllProxies");      var line = 'pref("' + proxyitem.getAttribute("preference") + '", ' + proxyitem.checked + ');\n';      fos.write(line, line.length);      break;    case "2":      var proxystringlist = ["autoproxyurl"];        for (i = 0; i < proxystringlist.length; i++) {        var proxyitem = document.getElementById(proxystringlist[i]);        if (proxyitem.value.length > 0) {          var line = 'pref("' + proxyitem.getAttribute("preference") + '", "' + proxyitem.value + '");\n';          fos.write(line, line.length);        }      }            var proxyintegerlist = ["ProxyType"];      for (i = 0; i < proxyintegerlist.length; i++) {        var proxyitem = document.getElementById(proxyintegerlist[i]);        if (proxyitem.value.length > 0) {          var line = 'pref("' + proxyitem.getAttribute("preference") + '", ' + proxyitem.value + ');\n';          fos.write(line, line.length);        }      }      break;  }  fos.close();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/08693957b520525da5173d0b53d590e795e583a2/cckwizard.js/clean/extensions/cck/browser/resources/content/cckwizard/cckwizard.js