MediaWiki:Gadget-StatusOutdent.js

//<nowiki> /**	Gadget-StatusOutdent.js, v1.0, 2026-04-07  	adds an additional class to outdent status icon 	original authors: Roland Unger  	Support of desktop and mobile views 	License: GPL-2.0+, CC-by-sa 3.0 */   ( function ( $ ) { 	'use strict';  	const addStatusOutdentClass = () => { 		const withStatus = $( '.voy-listing-with-status, .voy-listing-outdent' ); 		if ( withStatus.length ) { 			withStatus.each( function() { 				const _this = $( this ), 					parent = _this.parent(), 					withBefore = _this.find( '.voy-listing-before' ), 					firstNode = parent.contents()[ 0 ]; 				let inList = parent[ 0 ].nodeName.toLowerCase() == 'li' && 					( _this.is( ':nth-child(2)' ) || _this.is( ':nth-child(3)' ) ) && // first is style/link tag 					withBefore.length == 0 && 					firstNode.nodeType !== 3; // text node 				if ( inList ) { 					parent.addClass( 'voy-listing-status-item' ); 				} 			} ); 		} 	};  	addStatusOutdentClass();  } ( jQuery ) ); //</nowiki>