Skip to content

Commit f147dd8

Browse files
committed
fix
1 parent bf32e26 commit f147dd8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/governance.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ function applyRestrictions(allowedSelectors) {
3838
selectorElement.style.border = '2px solid green';
3939
}
4040

41+
// mark all instrumented children as verified
42+
const children = selectorElement.querySelectorAll('[data-aue-type]');
43+
children.forEach(child => {
44+
child.dataset.aueVerified = 'true';
45+
});
46+
4147
// if its a container block item or default content
4248
// if it doesnt have a class 'block' try the closest parent that has a class block
4349
if (!selectorElement.classList.contains('block')) {
@@ -72,7 +78,7 @@ function applyRestrictions(allowedSelectors) {
7278

7379
// remove instrumention from the rest of the elements
7480
// select all elements that dont have data-aue-verified="true" and that dont have an ancestor that has data-aue-verified="true"
75-
const unverifiedElements = document.querySelector('main')?.querySelectorAll('*:not([data-aue-verified="true"]) *:not([data-aue-verified="true"])');
81+
const unverifiedElements = document.querySelector('main')?.querySelectorAll('*[data-aue-type]:not([data-aue-verified="true"])');
7682

7783

7884
console.log('Unverified Elements:', unverifiedElements);

0 commit comments

Comments
 (0)