mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 762966 - reset homepage pref for users who have it set to google.com/firefox r=dao
This commit is contained in:
parent
1b25a20a8d
commit
f61f9fa5aa
@ -1207,7 +1207,7 @@ BrowserGlue.prototype = {
|
||||
},
|
||||
|
||||
_migrateUI: function BG__migrateUI() {
|
||||
const UI_VERSION = 7;
|
||||
const UI_VERSION = 8;
|
||||
const BROWSER_DOCURL = "chrome://browser/content/browser.xul#";
|
||||
let currentUIVersion = 0;
|
||||
try {
|
||||
@ -1342,6 +1342,15 @@ BrowserGlue.prototype = {
|
||||
}
|
||||
}
|
||||
|
||||
if (currentUIVersion < 8) {
|
||||
// Reset homepage pref for users who have it set to google.com/firefox
|
||||
let uri = Services.prefs.getComplexValue("browser.startup.homepage",
|
||||
Ci.nsIPrefLocalizedString).data;
|
||||
if (uri && /^https?:\/\/(www\.)?google(\.\w{2,3}){1,2}\/firefox\/?$/.test(uri)) {
|
||||
Services.prefs.clearUserPref("browser.startup.homepage");
|
||||
}
|
||||
}
|
||||
|
||||
if (this._dirty)
|
||||
this._dataSource.QueryInterface(Ci.nsIRDFRemoteDataSource).Flush();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user