autoconfig: add get_firefox_version function
This commit is contained in:
parent
a9dbfcd48b
commit
473cb45ee7
1 changed files with 12 additions and 0 deletions
|
@ -44,6 +44,15 @@ function log_obj(obj) {
|
|||
}
|
||||
}
|
||||
|
||||
function get_firefox_version() {
|
||||
try {
|
||||
return Services.appinfo.lastAppVersion;
|
||||
} catch(e) {
|
||||
log("Failed to get FF version: " + e);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
function trigger_firefox_restart() {
|
||||
log("Triggering Firefox restart");
|
||||
var appStartup = Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup);
|
||||
|
@ -74,6 +83,9 @@ function set_default_prefs() {
|
|||
|
||||
log("Running mobile-config-autoconfig.js");
|
||||
|
||||
var ff_version = get_firefox_version();
|
||||
log("Firefox version: " + ff_version);
|
||||
|
||||
// Create nsIFile objects for userChrome.css in <profile>/chrome/ and in /etc/
|
||||
var chromeFile = chromeDir.clone();
|
||||
chromeFile.append("userChrome.css");
|
||||
|
|
Loading…
Reference in a new issue