From cc1dd9fe8cf8046908a7bd4dd6a11c80275e1632 Mon Sep 17 00:00:00 2001 From: Amire80 Date: Wed, 11 Oct 2017 00:49:22 +0300 Subject: [PATCH] Show the same tooltips on compact language links The tooltips include the title of the target article and the name of the language in the user's language. Bug: T160976 Change-Id: If3dd416e4a6f13b7b1366d30a1a3807a505346cb --- resources/js/ext.uls.compactlinks.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/js/ext.uls.compactlinks.js b/resources/js/ext.uls.compactlinks.js index 13ad20d5..5391ed09 100644 --- a/resources/js/ext.uls.compactlinks.js +++ b/resources/js/ext.uls.compactlinks.js @@ -172,12 +172,15 @@ }, languageDecorator: function ( $languageLink, language ) { var data = self.interlanguageList[ language ]; - // set href and text exactly same as what was in + // Set href, text, and tooltip exactly same as what was in // interlanguage link. The ULS autonym might be different in some // cases like sr. In ULS it is "српски", while in interlanguage links // it is "српски / srpski" $languageLink - .prop( 'href', data.href ) + .prop( { + href: data.href, + title: data.element.title + } ) .text( data.autonym ); // This code is to support badges used in Wikimedia