From fbd951906af9e5292c4b902bcd6a736ddf3665ee Mon Sep 17 00:00:00 2001 From: Jon Robson Date: Fri, 9 Dec 2022 14:32:54 -0800 Subject: [PATCH] Use new stable API for subtitle modification Bug: T324876 Depends-On: Id8436324e2ae2fd9f488b65b3b7bfc19611870d1 Change-Id: I4b178f67b6718fa9a84827e1804ec4eb1483f735 --- modules/controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/controller.js b/modules/controller.js index 1e38a2953..c9e71a8d5 100644 --- a/modules/controller.js +++ b/modules/controller.js @@ -457,8 +457,8 @@ function init( $container, state ) { function updatePageContents( $container, data ) { $container.find( '.mw-parser-output' ).first().replaceWith( data.parse.text ); - // eslint-disable-next-line no-jquery/no-global-selector - $( '#contentSub, .minerva__subtitle' ).html( data.parse.subtitle ); + mw.util.clearSubtitle(); + mw.util.addSubtitle( data.parse.subtitle ); // eslint-disable-next-line no-jquery/no-global-selector if ( $( '#catlinks' ).length ) {