File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212class EthmarksFooter extends HTMLElement {
1313 connectedCallback() {
1414 this.innerHTML = %s;
15+
16+ // Add overflow detection functionality
17+ function updateOverflowClasses() {
18+ const heightOverflowClass = "height-overflow";
19+ const body = document.body;
20+ const containerHeight = window.innerHeight;
21+ const contentHeight = Math.max(
22+ document.documentElement.scrollHeight,
23+ document.body.scrollHeight
24+ );
25+
26+ if (contentHeight === 0) { return; }
27+
28+ if (contentHeight > containerHeight) {
29+ body.classList.add(heightOverflowClass);
30+ } else {
31+ body.classList.remove(heightOverflowClass);
32+ }
33+ }
34+
35+ const resizeObserver = new ResizeObserver(() => {
36+ updateOverflowClasses();
37+ });
38+
39+ resizeObserver.observe(document.body);
40+ updateOverflowClasses();
1541 }
1642}
1743
You can’t perform that action at this time.
0 commit comments