Copy class across to new language link item
If the Vector code runs before the Wikibase code, the Wikibase code will not work as the CSS selector will no longer match. Bug: T287206 Change-Id: I8555b60f2463ad19efadd57bccbb91ae4e2cc528
This commit is contained in:
parent
000f20213e
commit
5a0214afc9
|
@ -10,7 +10,11 @@ function addInterwikiLinkToSidebar() {
|
|||
if ( $editLink.length ) {
|
||||
// Use title attribute for link text
|
||||
$editLink.text( $editLink.attr( 'title' ) || '' );
|
||||
var $li = $( '<li>' ).append( $editLink );
|
||||
var $li = $( '<li>' )
|
||||
// If the Wikibase code runs last, this class is required so it matches the selector @:
|
||||
// https://gerrit.wikimedia.org/g/mediawiki/extensions/Wikibase/+/f2e96e1b08fc5ae2e2e92f05d5eda137dc6b1bc8/client/resources/wikibase.client.linkitem.init.js#82
|
||||
.addClass( 'wb-langlinks-link' )
|
||||
.append( $editLink );
|
||||
$li.appendTo( '#p-tb ul' );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue