gecko-dev/calendar/install.js

41 строка
1.0 KiB
JavaScript
Исходник Обычный вид История

initInstall("Mozilla Calendar", "Mozilla/Calendar", "0.7");
2001-12-20 23:13:53 +03:00
calendarDir = getFolder("Chrome","calendar");
setPackageFolder(calendarDir);
addDirectory( "resources" );
2001-12-20 23:13:53 +03:00
addDirectory("", "components", getFolder( "Components" ), "" );
var err = getLastError();
2001-12-20 23:13:53 +03:00
if ( err == SUCCESS ) {
registerChrome(CONTENT, calendarDir, "content");
registerChrome(SKIN, calendarDir, "skin/modern");
registerChrome(LOCALE, calendarDir, "locale/en-US");
2001-12-20 23:13:53 +03:00
err = performInstall();
2001-12-20 23:13:53 +03:00
if ( err == SUCCESS ) {
refreshPlugins();
alert("The Mozilla Calendar has been succesfully installed. \n"
2001-12-20 23:13:53 +03:00
+"Please restart your browser to continue.");
}
else {
2001-12-20 23:13:53 +03:00
alert("performInstall() failed. \n"
+"_____________________________\nError code:" + err);
cancelInstall(err);
}
2001-12-20 23:13:53 +03:00
}
else {
alert("Failed to create directory. \n"
+"You probably don't have appropriate permissions \n"
+"(write access to mozilla/chrome directory). \n"
+"_____________________________\nError code:" + err);
cancelInstall(err);
}