mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 11:16:51 +00:00
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:
parent
832674fa85
commit
cb875a6ccc
|
@ -79,9 +79,15 @@ ve.init.mw.LinkCache.prototype.styleElement = function ( title, $element ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
promise.done( function ( data ) {
|
promise.done( function ( data ) {
|
||||||
|
var thisPage = ve.init.mw.ApiResponseCache.static.normalizeTitle( mw.config.get( 'wgRelevantPageName' ) );
|
||||||
|
|
||||||
if ( data.missing && !data.known ) {
|
if ( data.missing && !data.known ) {
|
||||||
$element.addClass( 'new' );
|
$element.addClass( 'new' );
|
||||||
} else {
|
} 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.
|
// Provided by core MediaWiki, no styles by default.
|
||||||
if ( data.redirect ) {
|
if ( data.redirect ) {
|
||||||
$element.addClass( 'mw-redirect' );
|
$element.addClass( 'mw-redirect' );
|
||||||
|
|
Loading…
Reference in a new issue