Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
table_01 [2023/09/21 07:54] – demiurge | table_01 [2023/09/22 22:03] (current) – demiurge | ||
---|---|---|---|
Line 21: | Line 21: | ||
" | " | ||
" | " | ||
- | " | + | " |
" | " | ||
" | " | ||
}); | }); | ||
+ | | ||
+ | $(' | ||
+ | var pageID = $(this).data(' | ||
+ | var wikiURL = "/ | ||
+ | $(this).attr(' | ||
+ | }); | ||
}); | }); | ||
</ | </ | ||
< | < | ||
#tableWrap { | #tableWrap { | ||
- | max-width: | + | max-width: |
overflow-x: auto; | overflow-x: auto; | ||
} | } | ||
Line 43: | Line 49: | ||
< | < | ||
< | < | ||
- | < | + | < |
< | < | ||
< | < | ||
Line 165: | Line 171: | ||
< | < | ||
< | < | ||
- | < | + | <td><a href="#" |
< | < | ||
< | < | ||
Line 1603: | Line 1609: | ||
</ | </ | ||
</ | </ | ||
+ | < | ||
+ | function applyHexColorToTableCells() { | ||
+ | // Get all table cells | ||
+ | let tableCells = document.querySelectorAll(' | ||
+ | |||
+ | // Regular expression to match hex color codes | ||
+ | let hexPattern = /# | ||
+ | |||
+ | tableCells.forEach(cell => { | ||
+ | // Find all hex codes in the text of the cell | ||
+ | let matches = cell.textContent.match(hexPattern); | ||
+ | |||
+ | if (matches && matches.length > 0) { | ||
+ | // If there' | ||
+ | // to the hex code found in the cell | ||
+ | cell.style.color = matches[0]; | ||
+ | } | ||
+ | }); | ||
+ | } | ||
+ | |||
+ | // Call the function on page load | ||
+ | applyHexColorToTableCells(); | ||
+ | </ | ||
</ | </ |