Skip to content

Commit 6b18e39

Browse files
committed
cleanup js
1 parent de41778 commit 6b18e39

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

docs/StardustDocs/cfg/resize-iframes.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
mutations.forEach((mutation) => {
1717
if (mutation.type === 'attributes' && mutation.attributeName === 'class') {
1818
const theme = htmlElement.classList.contains('theme-light') ? 'light' : 'dark';
19-
console.log(theme)
19+
// console.log(theme)
2020
updateIframeThemes(theme);
2121
}
2222
});
@@ -65,11 +65,11 @@
6565
}
6666

6767
function observeIFrame(el) {
68-
console.log("el.contentWindow: " + el.contentWindow)
69-
console.log("el.contentWindow.document: " + el.contentWindow.document)
70-
console.log("el.contentWindow.document.body: " + el.contentWindow.document.body)
71-
console.log("el.contentWindow.performance: " + el.contentWindow.performance)
72-
console.log("el.contentWindow.performance.timing.loadEventEnd: " + el.contentWindow.performance.timing.loadEventEnd)
68+
// console.log("el.contentWindow: " + el.contentWindow)
69+
// console.log("el.contentWindow.document: " + el.contentWindow.document)
70+
// console.log("el.contentWindow.document.body: " + el.contentWindow.document.body)
71+
// console.log("el.contentWindow.performance: " + el.contentWindow.performance)
72+
// console.log("el.contentWindow.performance.timing.loadEventEnd: " + el.contentWindow.performance.timing.loadEventEnd)
7373

7474
if (el.contentWindow && el.contentWindow.performance && el.contentWindow.performance.timing.loadEventEnd === 0) {
7575
console.log("ready path")
@@ -99,13 +99,13 @@
9999

100100
function traverse(node) {
101101
if (node.tagName === 'IFRAME') {
102-
observeIFrame(node);
103-
}
102+
observeIFrame(node);
103+
}
104104

105-
for (let i = 0; i < node.children.length; i++) {
106-
traverse(node.children[i]);
105+
for (let i = 0; i < node.children.length; i++) {
106+
traverse(node.children[i]);
107+
}
107108
}
108-
}
109109

110110
traverse(addedNode);
111111
}

0 commit comments

Comments
 (0)