MediaWiki:Common.js: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 402: | Строка 402: | ||
cells.forEach(function(cell, index) { | cells.forEach(function(cell, index) { | ||
if (cell.hasAttribute('rowspan') | if (!cell.hasAttribute('rowspan') || cell.getAttribute('rowspan') === '1') { | ||
cell.addEventListener('mouseover', function() { | |||
cells.forEach(function(innerCell, innerIndex) { | |||
if (!innerCell.hasAttribute('rowspan') || innerCell.getAttribute('rowspan') === '1') { | |||
innerCell.style.setProperty('background-color', brightenColor(originalStyles[innerIndex].backgroundColor), 'important'); | |||
innerCell.style.setProperty('color', brightenColor(originalStyles[innerIndex].color), 'important'); | |||
} | } | ||
}); | |||
}); | }); | ||
cell.addEventListener('mouseout', function() { | |||
cells.forEach(function(innerCell, innerIndex) { | |||
if (!innerCell.hasAttribute('rowspan') || innerCell.getAttribute('rowspan') === '1') { | |||
innerCell.style.setProperty('background-color', originalStyles[innerIndex].backgroundColor, 'important'); | |||
innerCell.style.setProperty('color', originalStyles[innerIndex].color, 'important'); | |||
} | |||
} | }); | ||
}); | }); | ||
} | } | ||
}); | }); | ||
}); | }); | ||