var name = document.getElementById("name"); var locations = ""; 
var bundle = Cc["@mozilla.org/intl/stringbundle;1"].getService(Ci.nsIStringBundleService); bundle = bundle.createBundle("chrome:  var name = document.getElementById("name").value;   name = name.replace(/^\s+/, "").replace(/\s+$/, ""); if (name.length == 0) { document.getElementById("name").focus(); alert(bundle.GetStringFromName("name.missing")); return false; }   if (/([\\*:?<>|\/\"])/.test(name)) { document.getElementById("name").focus(); alert(bundle.GetStringFromName("name.invalid")); return false; }  var shortcuts = ""; 
  accept : function() {    var name = document.getElementById("name");    var locations = "";    if (document.getElementById("desktop").checked)      locations += "desktop,";    if (document.getElementById("programs").checked)      locations += "programs,";    if (document.getElementById("quicklaunch").checked)      locations += "quicklaunch,";    var programs = document.getElementById("programs");    if (window.arguments && name.value.length > 0 && locations.length > 0) {      var wai = new WebAppInstall();      if (window.arguments.length == 2) {        var uri = document.getElementById("uri");        var doLocation = document.getElementById("location").checked ? true : false;        var doStatus = document.getElementById("status").checked ? true : false;        var doNavigation = document.getElementById("navigation").checked ? true : false;        var params = {id: name.value.toLowerCase() + "@prism.app", uri: uri.value, icon: "app", status: doStatus, location: doLocation, sidebar: "false", navigation: doNavigation};        // Make the web application in the profile folder        var wai = new WebAppInstall();        wai.createApplication(params);        wai.createShortcut(name.value, params.id, params.icon, locations);        // Update the caller's config        window.arguments[0].id = params.id;        window.arguments[0].uri = params.uri;        window.arguments[0].icon = params.icon;        window.arguments[0].status = params.status;        window.arguments[0].location = params.location;        window.arguments[0].navigation = params.navigation;        // Let the caller know we actually installed a web application        window.arguments[1].value = false;      }      // Make any desired shortcuts      wai.createShortcut(name.value, window.arguments[0].id, window.arguments[0].icon, locations);    }    return true;  }
705	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/705/93fff08e266cc7144e35575220285e71fa03053e/install-shortcut.js/buggy/app/chrome/content/install-shortcut.js