mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-25 10:17:23 +00:00
Remove unused country code selection (#37397)
This commit is contained in:
parent
8630f9bfaa
commit
2e74958101
@ -116,9 +116,6 @@
|
|||||||
let tabContents = dialog.querySelectorAll('.ha-buy-dialog-tab-content');
|
let tabContents = dialog.querySelectorAll('.ha-buy-dialog-tab-content');
|
||||||
let timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
let timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||||
let region = timezone.split('/')[0].toLowerCase();
|
let region = timezone.split('/')[0].toLowerCase();
|
||||||
let locale = Intl.DateTimeFormat().resolvedOptions().locale;
|
|
||||||
let countryCode = locale.split('-')[1].toLowerCase();
|
|
||||||
|
|
||||||
|
|
||||||
let defaultTab = dialog.querySelector(`.ha-buy-dialog-sidebar-tab[data-tab="#${region}"]`);
|
let defaultTab = dialog.querySelector(`.ha-buy-dialog-sidebar-tab[data-tab="#${region}"]`);
|
||||||
if (defaultTab) {
|
if (defaultTab) {
|
||||||
@ -128,11 +125,6 @@
|
|||||||
defaultTab.classList.add('active');
|
defaultTab.classList.add('active');
|
||||||
let tabContent = document.querySelector(defaultTab.getAttribute('data-tab'));
|
let tabContent = document.querySelector(defaultTab.getAttribute('data-tab'));
|
||||||
tabContent.classList.add('active');
|
tabContent.classList.add('active');
|
||||||
|
|
||||||
let country = tabContent.querySelector(`.ha-buy-dialog-distributor-country[data-code="${countryCode}"]`);
|
|
||||||
if (country) {
|
|
||||||
country.scrollIntoView({ behavior: 'instant', block: 'center' });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
Loading…
x
Reference in New Issue
Block a user