MediaWiki:Common.js: Unterschied zwischen den Versionen

Aus WikiSpeicher
K
K
 
Zeile 5: Zeile 5:
text = text.replace('Kategorie:', '');
text = text.replace('Kategorie:', '');
if (hasCat) {
if (hasCat) {
text += "(Kategorie)";
text += " (Kategorie)";
}
}


$heading.text(text);
$heading.text(text);
});
});

Aktuelle Version vom 4. März 2022, 23:08 Uhr

jQuery('#firstHeading').each(function () {
	var $heading = jQuery(this);
	var text = $heading.text();
	var hasCat = text.indexOf('Kategorie:') > -1;
	text = text.replace('Kategorie:', '');
	if (hasCat) {
		text += " (Kategorie)";
	}

	$heading.text(text);
});