mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-15 02:24:04 +00:00
feat(core): ✨ wrap any elements tagged with the class citizen-overflow
This commit is contained in:
parent
7b32aeec7d
commit
4ed68a924d
|
@ -247,13 +247,10 @@ class OverflowElement {
|
|||
* @return {void}
|
||||
*/
|
||||
function init( bodyContent ) {
|
||||
// Do not wrap nested tables
|
||||
const tables = bodyContent.querySelectorAll( 'table:not( table table )' );
|
||||
|
||||
// Wrap tables
|
||||
if ( tables.length > 0 ) {
|
||||
tables.forEach( ( table ) => {
|
||||
const overflowElement = new OverflowElement( table );
|
||||
const overflowElements = bodyContent.querySelectorAll( '.citizen-overflow, table:not( table table )' );
|
||||
if ( overflowElements.length > 0 ) {
|
||||
overflowElements.forEach( ( el ) => {
|
||||
const overflowElement = new OverflowElement( el );
|
||||
overflowElement.init();
|
||||
} );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue