Page MenuHomePhabricator

Move Wikidata link from "Toolbox" to "Other projects" section
Closed, ResolvedPublic

Description

Wikidata link is at Toolbox, but it would make more sense on "Other projects" section. Trying to figure out how this is mooved would be the first thing.

Event Timeline

Lydia_Pintscher added a subscriber: Lea_Lacroix_WMDE.

The related ticket is T66315. In the past there were reasons not to do it but now that the In Other Projects Sidebar is used everywhere we can go ahead with it. If you find someone from the team at the hackathon to do it that's fine from my side. It'll need some coordination/announcement with @Lea_Lacroix_WMDE.

Maybe we can do it only for Basque wikipedia using js?

Maybe we can do it only for Basque wikipedia using js?

The JS for this is pretty simple:

$( '#p-wikibase-otherprojects ul' ).append( $( '#t-wikibase' ) );

It works (partially). It moves the link only if the "In other projects" section exists.

It works (partially). It moves the link only if the "In other projects" section exists.

Try this:

if ( !$( '#p-wikibase-otherprojects' ).length ) {
    $( '#p-tb' ).before( $( '<div class="portal" role="navigation" id="p-wikibase-otherprojects" aria-labelledby="p-wikibase-otherprojects-label"><h3 lang="en" dir="ltr" id="p-wikibase-otherprojects-label">In other projects</h3><div class="body"><ul></ul></div></div>' ) );
}
$( '#p-wikibase-otherprojects ul' ).append( $( '#t-wikibase' ) );

(with "In other projects" changed to the Basque translation of that phrase)

The code used was added to common.js

// Add Wikidata to "in Other Projects" section
if ( !$( '#p-wikibase-otherprojects' ).length ) {
    $( '#p-tb' ).before( $( '<div class="portal" role="navigation" id="p-wikibase-otherprojects" aria-labelledby="p-wikibase-otherprojects-label"><h3 lang="en" dir="ltr" id="p-wikibase-otherprojects-label">Beste proiektuetan</h3><div class="body"><ul></ul></div></div>' ) );
}
$( '#p-wikibase-otherprojects ul' ).append( $( '#t-wikibase' ) );