Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/309733
Change subject: Query only for <a> elements that are interlanguage links targets ...................................................................... Query only for <a> elements that are interlanguage links targets Bug: T135378 Change-Id: I2909ce31e19087358d194e0e108e1ba038e7273e Depends-On: I06c80945af785477be52096022c8493e7f82c298 --- M resources/js/ext.uls.compactlinks.js 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/33/309733/1 diff --git a/resources/js/ext.uls.compactlinks.js b/resources/js/ext.uls.compactlinks.js index 3174cbe..1426561 100644 --- a/resources/js/ext.uls.compactlinks.js +++ b/resources/js/ext.uls.compactlinks.js @@ -392,7 +392,9 @@ */ CompactInterlanguageList.prototype.filterByBadges = function () { return $( '#p-lang' ).find( '[class*="badge"]' ).map( function ( i, el ) { - return convertMediaWikiLanguageCodeToULS( $( el ).find( 'a' ).attr( 'lang' ) ); + return convertMediaWikiLanguageCodeToULS( + $( el ).find( 'a.interlanguage-link-target' ).attr( 'lang' ) + ); } ).toArray(); }; @@ -405,7 +407,7 @@ CompactInterlanguageList.prototype.getInterlanguageList = function () { var interlanguageList = {}; - this.$interlanguageList.find( 'li.interlanguage-link > a' ).each( function () { + this.$interlanguageList.find( 'a.interlanguage-link-target' ).each( function () { var langCode = convertMediaWikiLanguageCodeToULS( this.getAttribute( 'lang' ) ); interlanguageList[ langCode ] = { -- To view, visit https://gerrit.wikimedia.org/r/309733 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2909ce31e19087358d194e0e108e1ba038e7273e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Amire80 <amir.ahar...@mail.huji.ac.il> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits