mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
[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
1 changed files with 3 additions and 5 deletions
|
|
@ -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 a new issue