User:Erutuon/scripts/familyTree.js

// Change the text in the custom toggles generated by Module:family tree. $(function {	$('.mw-collapsible').on('beforeExpand.mw-collapsible beforeCollapse.mw-collapsible', function (event) { if (this.id.indexOf("mw-customcollapsible-familytree") === 0) { const toggle = $("." + this.id.replace("mw-customcollapsible", "mw-customtoggle")); if (event.type === "beforeExpand") { toggle.html(this.dataset.collapsetext); } else { // beforeCollapse toggle.html(this.dataset.expandtext); }           event.stopPropagation; }   }); });