jenkins-bot has submitted this change and it was merged.

Change subject: Remove redundant code and improve accuracy
......................................................................


Remove redundant code and improve accuracy

Change-Id: I00c6953a041b38c68b658377516a82e8aa9cdb6c
---
M resources/js/ext.uls.compactlinks.js
1 file changed, 2 insertions(+), 7 deletions(-)

Approvals:
  Nikerabbit: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/js/ext.uls.compactlinks.js 
b/resources/js/ext.uls.compactlinks.js
index c3fdcfc..27b0695 100644
--- a/resources/js/ext.uls.compactlinks.js
+++ b/resources/js/ext.uls.compactlinks.js
@@ -198,7 +198,7 @@
                        currentLangs = getInterlanguageList(),
                        numLanguages = 9,
                        minLanguages = 7,
-                       flagForNumberOfLangs = 0, i,
+                       i,
                        finalList; //Final list of languages to be displayed on 
page
 
                if ( $numOfLangCurrently > 9) {
@@ -206,7 +206,6 @@
                        if ( $numOfLangCurrently > 9 && $numOfLangCurrently <= 
12 ) {
                                finalList = displayLanguages( minLanguages );
                        } else {
-                               flagForNumberOfLangs = 1;
                                finalList = displayLanguages( numLanguages );
                        }
 
@@ -215,11 +214,7 @@
                        }
 
                        addULSlink();
-                       if ( !flagForNumberOfLangs ) {
-                               addLabel( $numOfLangCurrently, minLanguages );
-                       } else {
-                               addLabel( $numOfLangCurrently, numLanguages );
-                       }
+                       addLabel( $numOfLangCurrently, finalList.length );
                }
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/119480
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I00c6953a041b38c68b658377516a82e8aa9cdb6c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Niharika29 <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to