Render self-links as if they were <strong>s

This is a little inelegant, but it works in both CE and transclusion
content.

Bug: T52497
Depends-On: If058843924c3b30c116df2520aef93a004d98a5d
Change-Id: I88d45aad2aaa45e71b433350986b19764603a1f2
This commit is contained in:
James D. Forrester 2017-03-09 12:25:22 -08:00 committed by Jforrester
parent 832674fa85
commit cb875a6ccc

View file

@ -79,9 +79,15 @@ ve.init.mw.LinkCache.prototype.styleElement = function ( title, $element ) {
}
promise.done( function ( data ) {
var thisPage = ve.init.mw.ApiResponseCache.static.normalizeTitle( mw.config.get( 'wgRelevantPageName' ) );
if ( data.missing && !data.known ) {
$element.addClass( 'new' );
} else {
// Provided by core MediaWiki, styled like a <strong> element by default.
if ( data.title === thisPage ) {
$element.addClass( 'mw-selflink' );
}
// Provided by core MediaWiki, no styles by default.
if ( data.redirect ) {
$element.addClass( 'mw-redirect' );