зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1185012 - Display a message to a Firefox user the first time they open Firefox in Windows 10. r=MattN
This commit is contained in:
Родитель
f9010caa2c
Коммит
9bb07216b6
|
@ -548,6 +548,24 @@ nsBrowserContentHandler.prototype = {
|
|||
if (overridePage == "about:blank")
|
||||
overridePage = "";
|
||||
|
||||
// Temporary override page for users who are running Firefox on Windows 10 for their first time.
|
||||
let platformVersion = Services.sysinfo.getProperty("version");
|
||||
if (AppConstants.platform == "win" &&
|
||||
Services.vc.compare(platformVersion, "10") == 0 &&
|
||||
Services.prefs.getPrefType("browser.usedOnWindows10") == Services.prefs.PREF_BOOL &&
|
||||
!Services.prefs.getBoolPref("browser.usedOnWindows10")) {
|
||||
Services.prefs.setBoolPref("browser.usedOnWindows10", true);
|
||||
let firstUseOnWindows10URL = Services.urlFormatter.formatURL("https://www.mozilla.org/%LOCALE%/firefox/windows10/");
|
||||
|
||||
if (firstUseOnWindows10URL && firstUseOnWindows10URL.length) {
|
||||
if (overridePage) {
|
||||
overridePage += "|" + firstUseOnWindows10URL;
|
||||
} else {
|
||||
overridePage = firstUseOnWindows10URL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var startPage = "";
|
||||
try {
|
||||
var choice = prefb.getIntPref("browser.startup.page");
|
||||
|
|
Загрузка…
Ссылка в новой задаче