MediaWiki:Gadget-figureSource.js: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 288:
 
function tagsHtml(el, entry) {
// Address order, outer -> inner (user design): caption (which
// table, incl. its [t. N] index) -> column header -> row label —
// the same drill-down the sidecar's own locator uses.
var parts = [];
if (entry.loc.kind === 'cell') {
var table = el.closest('table');
var grid = expandTable(table);
var labelcap = grid[entrytable.loc.r] && grid[entry.loc.r][0]querySelector('caption');
if (label && label !== elcap) { parts.push(cellText(labelcap)); }
var headers = [];
for (var h = 0; h < grid.length; h++) {
Line 305 ⟶ 308:
}
if (headers.length) { parts.push(headers.join(' · ')); }
var caplabel = tablegrid[entry.querySelector('caption')loc.r] && grid[entry.loc.r][0];
if (caplabel && label !== el) { parts.push(cellText(caplabel)); }
} else {
parts.push('chunk ' + entry.loc.chunk);