Anonymous

MediaWiki:Common.js: Difference between revisions

From Melvor Idle
m
Changed let to var
(Added semicolon?)
m (Changed let to var)
Line 6: Line 6:
   const stickyTables = document.getElementsByClassName('stickyHeader');
   const stickyTables = document.getElementsByClassName('stickyHeader');
   const headHeight = document.getElementById('mw-header-container').offsetHeight;
   const headHeight = document.getElementById('mw-header-container').offsetHeight;
   for (i = 0; i < stickyTables.length; i++) {
   for (var i = 0; i < stickyTables.length; i++) {
     const firstRow = stickyTables[i].getElementsByClassName('firstHeaderRow');
     const firstRow = stickyTables[i].getElementsByClassName('firstHeaderRow');
     const secondRow = stickyTables[i].getElementsByClassName('secondHeaderRow');
     const secondRow = stickyTables[i].getElementsByClassName('secondHeaderRow');
     let firstHeight = 0;
     var firstHeight = 0;
     if (firstRow.length > 0) {
     if (firstRow.length > 0) {
       firstHeight = firstRow[0].offsetHeight;
       firstHeight = firstRow[0].offsetHeight;
Line 24: Line 24:
     }
     }
   }
   }
});
});
});