mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-15 18:40:05 +00:00
feat(core): ✨ ignore infobox class for table wrapper
This commit is contained in:
parent
8bd678a180
commit
81affb88f1
|
@ -60,10 +60,15 @@ function setupOverflowState( element ) {
|
|||
* @return {void}
|
||||
*/
|
||||
function wrapTable( table ) {
|
||||
// Don't do anything if there is a nowrap class
|
||||
if ( table.classList.contains( 'citizen-table-nowrap' ) ) {
|
||||
return;
|
||||
}
|
||||
const ignoredClasses = [
|
||||
'citizen-table-nowrap',
|
||||
'infobox'
|
||||
];
|
||||
|
||||
const hasIgnoredClass = ( ignoreClass ) => table.classList.contains( ignoreClass );
|
||||
|
||||
// Return if table has one of the ignored classes
|
||||
if ( ignoredClasses.some( hasIgnoredClass ) ) return;
|
||||
|
||||
const wrapper = document.createElement( 'div' );
|
||||
|
||||
|
|
Loading…
Reference in a new issue