Skip to content

Commit 371c9dd

Browse files
committed
hide wrapper children instead of main
1 parent db51129 commit 371c9dd

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

js/consent.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ function getDelegatedLogin() {
2020
*
2121
*/
2222
function hideLogins() {
23-
const mainTags = document.getElementsByTagName('main')
24-
if (mainTags !== null) {
25-
mainTags[0].style.visibility = 'hidden'
26-
}
23+
const wrapper = document.querySelector('.wrapper');
24+
if (!wrapper) return;
25+
26+
Array.from(wrapper.children).forEach(child => {
27+
child.style.visibility = 'hidden';
28+
});
2729
}
2830

2931
/**

0 commit comments

Comments
 (0)