mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-19 13:47:31 +09:00
Remove browser.search.region usage. Tag #245.
This commit is contained in:
parent
732e1e66f3
commit
f591aeb2fa
2 changed files with 1 additions and 17 deletions
|
|
@ -3236,14 +3236,7 @@ SearchService.prototype = {
|
||||||
|
|
||||||
// Fallback to building a list based on the regions in the JSON
|
// Fallback to building a list based on the regions in the JSON
|
||||||
if (!engineNames || !engineNames.length) {
|
if (!engineNames || !engineNames.length) {
|
||||||
let region;
|
engineNames = searchSettings["default"]["visibleDefaultEngines"];
|
||||||
if (Services.prefs.prefHasUserValue("browser.search.region")) {
|
|
||||||
region = Services.prefs.getCharPref("browser.search.region");
|
|
||||||
}
|
|
||||||
if (!region || !(region in searchSettings)) {
|
|
||||||
region = "default";
|
|
||||||
}
|
|
||||||
engineNames = searchSettings[region]["visibleDefaultEngines"];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let name of engineNames) {
|
for (let name of engineNames) {
|
||||||
|
|
|
||||||
|
|
@ -91,15 +91,6 @@ nsURLFormatterService.prototype = {
|
||||||
LOCALE: () => Cc["@mozilla.org/chrome/chrome-registry;1"].
|
LOCALE: () => Cc["@mozilla.org/chrome/chrome-registry;1"].
|
||||||
getService(Ci.nsIXULChromeRegistry).
|
getService(Ci.nsIXULChromeRegistry).
|
||||||
getSelectedLocale('global'),
|
getSelectedLocale('global'),
|
||||||
REGION: function() {
|
|
||||||
try {
|
|
||||||
// When the geoip lookup failed to identify the region, we fallback to
|
|
||||||
// the 'ZZ' region code to mean 'unknown'.
|
|
||||||
return Services.prefs.getCharPref("browser.search.region") || "ZZ";
|
|
||||||
} catch(e) {
|
|
||||||
return "ZZ";
|
|
||||||
}
|
|
||||||
},
|
|
||||||
VENDOR: function() { return this.appInfo.vendor; },
|
VENDOR: function() { return this.appInfo.vendor; },
|
||||||
NAME: function() { return this.appInfo.name; },
|
NAME: function() { return this.appInfo.name; },
|
||||||
ID: function() { return this.appInfo.ID; },
|
ID: function() { return this.appInfo.ID; },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue