mirror of https://github.com/gorhill/uBlock.git
[mv3] Use navigator.languages instead of i18n.getAcceptLanguages
Related issue: - https://github.com/w3c/webextensions/issues/107
This commit is contained in:
parent
d2cece5efe
commit
fa21f97b68
|
@ -348,11 +348,9 @@ async function defaultRulesetsFromLanguage() {
|
|||
|
||||
const langSet = new Set();
|
||||
|
||||
await i18n.getAcceptLanguages().then(langs => {
|
||||
for ( const lang of langs.map(dropCountry) ) {
|
||||
langSet.add(lang);
|
||||
}
|
||||
});
|
||||
for ( const lang of navigator.languages.map(dropCountry) ) {
|
||||
langSet.add(lang);
|
||||
}
|
||||
langSet.add(dropCountry(i18n.getUILanguage()));
|
||||
|
||||
const reTargetLang = new RegExp(
|
||||
|
|
Loading…
Reference in New Issue