mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-27 00:50:08 +00:00
c8dd4e9ed1
Now that we bind the ULS dialog to the checkbox element,
(see c08ae11
) the default behaviour of the checkbos is prevented,
so it is impossible for the dropdown to ever
be shown when ULS is enabled and clicked so this code no longer
serves any purpose.
Depends-On: I97a69c30b27cb1ded06451389e086229561c3589
Change-Id: Ic9d03dea12ee8bb2d7430eccd70e4343e3805d36
28 lines
918 B
JavaScript
28 lines
918 B
JavaScript
/**
|
|
* Copies interwiki links to sidebar
|
|
*
|
|
* Temporary solution to T287206, can be removed when the new ULS built in Vue.js
|
|
* has been released and contains this
|
|
*/
|
|
function addInterwikiLinkToSidebar() {
|
|
// eslint-disable-next-line no-jquery/no-global-selector
|
|
var $editLink = $( '#p-lang-btn .wbc-editpage' );
|
|
if ( $editLink.length ) {
|
|
// Use title attribute for link text
|
|
$editLink.text( $editLink.attr( 'title' ) || '' );
|
|
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' );
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Initialize the language button.
|
|
*/
|
|
module.exports = function () {
|
|
addInterwikiLinkToSidebar();
|
|
};
|