mirror of
https://codeberg.org/claui/mobile-config-firefox.git
synced 2024-11-09 19:30:15 +00:00
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() {
|
function trigger_firefox_restart() {
|
||||||
log("Triggering Firefox restart");
|
log("Triggering Firefox restart");
|
||||||
var appStartup = Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup);
|
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");
|
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/
|
// Create nsIFile objects for userChrome.css in <profile>/chrome/ and in /etc/
|
||||||
var chromeFile = chromeDir.clone();
|
var chromeFile = chromeDir.clone();
|
||||||
chromeFile.append("userChrome.css");
|
chromeFile.append("userChrome.css");
|
||||||
|
|
Loading…
Reference in a new issue