User:Sur/common.js: Difference between revisions

From Deadlock Wiki
Jump to navigation Jump to search
Sur (talk | contribs)
m testing height matching
Sur (talk | contribs)
m Blanked the page
Tags: Blanking Manual revert
Line 1: Line 1:
document.addEventListener("DOMContentLoaded", function() {
    const infoboxes = document.querySelectorAll('.stat-infobox');


    infoboxes.forEach(function(infobox) {
        const hoverBox = infobox.querySelector('.stat-infobox-hover');
       
        // Adjust the infobox height to match hover box height if needed
        infobox.style.height = `${hoverBox.offsetHeight}px`;
    });
});

Revision as of 18:28, 22 September 2024