diff --git a/javascript/commons/FilterButtons.js b/javascript/commons/FilterButtons.js index 9fbc3b21850..884a1b46ae8 100644 --- a/javascript/commons/FilterButtons.js +++ b/javascript/commons/FilterButtons.js @@ -215,7 +215,6 @@ liquipedia.filterButtons = { this.updateFromFilterStates(); this.setLocalStorage(); this.updateDOM(); - this.refreshScriptsAfterContentUpdate(); }, updateFromFilterStates: function() { @@ -298,6 +297,7 @@ liquipedia.filterButtons = { } ); if ( isDefault ) { templateExpansion.element.innerHTML = templateExpansion.cache.default; + this.refreshScriptsAfterContentUpdate(); return; } const parameters = templateExpansion.groups.map( ( group ) => { @@ -314,6 +314,7 @@ liquipedia.filterButtons = { if ( wikitext in templateExpansion.cache ) { templateExpansion.element.innerHTML = templateExpansion.cache[ wikitext ]; + this.refreshScriptsAfterContentUpdate(); return; } @@ -333,6 +334,7 @@ liquipedia.filterButtons = { if ( data.parse?.text?.[ '*' ] ) { templateExpansion.element.innerHTML = data.parse.text[ '*' ]; templateExpansion.cache[ wikitext ] = data.parse.text[ '*' ]; + this.refreshScriptsAfterContentUpdate(); } } ); } );