var xpi = new Object(); var numxpi = 0; var numstatus = 0; function showprops(obj) { var props = ""; for (i in obj) { props += i+":"+obj[i]+"\n "; } alert(props); } function statusCallback(url,status) { for (i in xpi) { if ( url.indexOf(xpi[i]) != -1 ) { xpi[i] = status; numstatus++; break; } } // if we've gotten all results then display them if (numstatus == numxpi) { var text; var restart = false; dlg = window.open("","resultWindow"); dlg.document.write("
Some files were in use, you must restart to complete the installation"); } dlg.document.write(""); dlg.document.close(); } } function launchwindows() { xpi["PSM"] = "psm_1.2_win32.xpi"; numxpi ++; // showprops(xpi); InstallTrigger.install(xpi,statusCallback); } function launchlinux() { xpi["PSM"] = "psm_1.2_linux.xpi"; numxpi ++; // showprops(xpi); InstallTrigger.install(xpi,statusCallback); }