diff --git a/modules/NewTopicController.js b/modules/NewTopicController.js index 4573d6509..70b03754f 100644 --- a/modules/NewTopicController.js +++ b/modules/NewTopicController.js @@ -238,7 +238,7 @@ NewTopicController.prototype.teardown = function ( abandoned ) { url.searchParams.delete( 'action' ); url.searchParams.delete( 'veaction' ); url.searchParams.delete( 'section' ); - history.replaceState( null, document.title, url ); + history.replaceState( null, '', url ); mw.config.set( 'wgDiscussionToolsStartNewTopicTool', false ); } }; diff --git a/modules/highlighter.js b/modules/highlighter.js index 1fb3ad8f6..da2ad9037 100644 --- a/modules/highlighter.js +++ b/modules/highlighter.js @@ -225,7 +225,7 @@ function highlightPublishedComment( threadItemSet, threadItemId ) { var urlFragment = mw.util.escapeIdForLink( sectionTitle ); // Navigate to fragment without scrolling location.hash = '#' + urlFragment + '-DoesNotExist-DiscussionToolsHack'; - history.replaceState( null, document.title, '#' + urlFragment ); + history.replaceState( null, '', '#' + urlFragment ); } } else { // Find the comment we replied to, then highlight the last reply @@ -371,7 +371,7 @@ function clearHighlightTargetComment( threadItemSet ) { // doesn't exist on the page, hopefully), and then use history.pushState() to clear it. location.hash += '-DoesNotExist-DiscussionToolsHack'; url.hash = ''; - history.replaceState( null, document.title, url ); + history.replaceState( null, '', url ); } else if ( url.searchParams.has( 'dtnewcomments' ) || url.searchParams.has( 'dtnewcommentssince' ) @@ -379,7 +379,7 @@ function clearHighlightTargetComment( threadItemSet ) { url.searchParams.delete( 'dtnewcomments' ); url.searchParams.delete( 'dtnewcommentssince' ); url.searchParams.delete( 'dtinthread' ); - history.pushState( null, document.title, url ); + history.pushState( null, '', url ); highlightTargetComment( threadItemSet ); } else if ( highlightedTarget ) { // Highlights were applied without changing the URL, e.g. when showing