Jdrewniak has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/258123

Change subject: EL 'country' data
......................................................................

EL 'country' data

- removing request to geoIP API because a GeoIP cookie is automatically set 
with HTTP headers

Change-Id: I40cbfec3fa03513f363e459ffe37d62c810795e2
---
M dev/wikipedia.org/assets/js/wikipedia-org-event-logging.js
M prod/wikipedia.org/index.html
2 files changed, 34 insertions(+), 61 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/portals 
refs/changes/23/258123/1

diff --git a/dev/wikipedia.org/assets/js/wikipedia-org-event-logging.js 
b/dev/wikipedia.org/assets/js/wikipedia-org-event-logging.js
index d3aa4bf..d623f7c 100644
--- a/dev/wikipedia.org/assets/js/wikipedia-org-event-logging.js
+++ b/dev/wikipedia.org/assets/js/wikipedia-org-event-logging.js
@@ -1,13 +1,12 @@
 // jscs:disable requireCamelCaseOrUpperCaseIdentifiers
 /* global eventLoggingLite */
 /* global wmTest */
-/* global Geo */
 
 ( function ( eventLoggingLite, wmTest ) {
 
        'use strict';
 
-       var portalSchema, eventSections, docForms, geoIpScript, 
geoIpScriptCallback,
+       var portalSchema, eventSections, docForms,
        geoCookie = document.cookie.match( /GeoIP=.[^:]/ );
 
        if ( wmTest.group === 'rejected' || wmTest.loggingDisabled ) {
@@ -206,36 +205,10 @@
                var cachedCC = geoCookie.toString().split( '=' )[ 1 ];
 
                portalSchema.defaults.country = cachedCC;
-
-               window.addEventListener( 'load', interceptLandingEvent );
-
-       } else {
-
-               geoIpScriptCallback = function () {
-
-                       if ( typeof Geo !== 'undefined' && Geo.country ) {
-                               portalSchema.defaults.country = Geo.country;
-                       }
-
-                       window.addEventListener( 'load', interceptLandingEvent 
);
-               };
-
-               geoIpScript = document.createElement( 'script' );
-
-               geoIpScript.onreadystatechange = function () {
-                       if ( this.readyState === 'complete' || this.readyState 
=== 'loaded' ) {
-                               geoIpScriptCallback();
-                       }
-               };
-
-               geoIpScript.onload = geoIpScriptCallback;
-
-               geoIpScript.src = 'https://geoiplookup.wikimedia.org/';
-
-               document.getElementsByTagName( 'head' )[ 0 ].appendChild( 
geoIpScript );
-
        }
 
+       window.addEventListener( 'load', interceptLandingEvent );
+
        /**
         * setting portal session cookie
         */
diff --git a/prod/wikipedia.org/index.html b/prod/wikipedia.org/index.html
index a45509b..67ac8f8 100644
--- a/prod/wikipedia.org/index.html
+++ b/prod/wikipedia.org/index.html
@@ -25,84 +25,84 @@
 <div class="central-featured-logo"></div>
 <!-- Rankings from http://stats.wikimedia.org/EN/Sitemap.htm -->
 <!-- Article counts from 
http://meta.wikimedia.org/wiki/List_of_Wikipedias/Table -->
-<!-- #1. en.wikipedia.org - 264 805 000 views/day -->
+<!-- #1. en.wikipedia.org - 1 764 370 000 views/day -->
 <div class="central-featured-lang lang1" lang="en">
 <a href="//en.wikipedia.org/" title="English — Wikipedia — The Free 
Encyclopedia" class="link-box">
 <strong>English</strong><br>
 <em>The Free Encyclopedia</em><br>
-<small>5&nbsp;011&nbsp;000+ articles</small>
+<small>5&nbsp;027&nbsp;000+ articles</small>
 </a>
 </div>
-<!-- #2. es.wikipedia.org - 41 565 000 views/day -->
-<div class="central-featured-lang lang2" lang="es">
-<a href="//es.wikipedia.org/" title="Español — Wikipedia — La enciclopedia 
libre" class="link-box">
-<strong>Español</strong><br>
-<em>La enciclopedia libre</em><br>
-<small>1&nbsp;213&nbsp;000+ artículos</small>
-</a>
-</div>
-<!-- #3. de.wikipedia.org - 39 002 000 views/day -->
-<div class="central-featured-lang lang3" lang="de">
+<!-- #2. de.wikipedia.org - 254 087 000 views/day -->
+<div class="central-featured-lang lang2" lang="de">
 <a href="//de.wikipedia.org/" title="Deutsch — Wikipedia — Die freie 
Enzyklopädie" class="link-box">
 <strong>Deutsch</strong><br>
 <em>Die freie Enzyklopädie</em><br>
-<small>1&nbsp;876&nbsp;000+ Artikel</small>
+<small>1&nbsp;883&nbsp;000+ Artikel</small>
 </a>
 </div>
-<!-- #4. ja.wikipedia.org - 38 584 000 views/day -->
-<div class="central-featured-lang lang4" lang="ja">
+<!-- #3. ja.wikipedia.org - 253 302 000 views/day -->
+<div class="central-featured-lang lang3" lang="ja">
 <a href="//ja.wikipedia.org/" title="Nihongo — ウィキペディア — フリー百科事典" 
class="link-box">
 <strong>日本語</strong><br>
 <em class="emNonItalicLang">フリー百科事典</em><br>
-<small>991&nbsp;000+ 記事</small>
+<small>994&nbsp;000+ 記事</small>
 </a>
 </div>
-<!-- #5. ru.wikipedia.org - 34 233 000 views/day -->
-<div class="central-featured-lang lang5" lang="ru">
+<!-- #4. ru.wikipedia.org - 233 356 000 views/day -->
+<div class="central-featured-lang lang4" lang="ru">
 <a href="//ru.wikipedia.org/" title="Russkiy — Википедия — Свободная 
энциклопедия" class="link-box">
 <strong>Русский</strong><br>
 <em>Свободная энциклопедия</em><br>
-<small>1&nbsp;268&nbsp;000+ статей</small>
+<small>1&nbsp;273&nbsp;000+ статей</small>
 </a>
 </div>
-<!-- #6. fr.wikipedia.org - 26 383 000 views/day -->
+<!-- #5. es.wikipedia.org - 232 300 000 views/day -->
+<div class="central-featured-lang lang5" lang="es">
+<a href="//es.wikipedia.org/" title="Español — Wikipedia — La enciclopedia 
libre" class="link-box">
+<strong>Español</strong><br>
+<em>La enciclopedia libre</em><br>
+<small>1&nbsp;218&nbsp;000+ artículos</small>
+</a>
+</div>
+<!-- #6. fr.wikipedia.org - 170 522 000 views/day -->
 <div class="central-featured-lang lang6" lang="fr">
 <a href="//fr.wikipedia.org/" title="Français — Wikipédia — L’encyclopédie 
libre" class="link-box">
 <strong>Français</strong><br>
 <em>L’encyclopédie libre</em><br>
-<small>1&nbsp;696&nbsp;000+ articles</small>
+<small>1&nbsp;703&nbsp;000+ articles</small>
 </a>
 </div>
-<!-- #7. it.wikipedia.org - 18 207 000 views/day -->
+<!-- #7. it.wikipedia.org - 115 335 000 views/day -->
 <div class="central-featured-lang lang7" lang="it">
 <a href="//it.wikipedia.org/" title="Italiano — Wikipedia — L’enciclopedia 
libera" class="link-box">
 <strong>Italiano</strong><br>
 <em>L’enciclopedia libera</em><br>
-<small>1&nbsp;235&nbsp;000+ voci</small>
+<small>1&nbsp;240&nbsp;000+ voci</small>
 </a>
 </div>
-<!-- #8. pt.wikipedia.org - 13 187 000 views/day -->
+<!-- #8. pt.wikipedia.org - 74 753 000 views/day -->
 <div class="central-featured-lang lang8" lang="pt">
 <a href="//pt.wikipedia.org/" title="Português — Wikipédia — A enciclopédia 
livre" class="link-box">
 <strong>Português</strong><br>
 <em>A enciclopédia livre</em><br>
-<small>894&nbsp;000+ artigos</small>
+<small>896&nbsp;000+ artigos</small>
 </a>
 </div>
-<!-- #9. zh.wikipedia.org - 11 096 000 views/day -->
+<!-- #9. zh.wikipedia.org - 71 523 000 views/day -->
 <div class="central-featured-lang lang9" lang="zh">
 <a href="//zh.wikipedia.org/" title="Zhōngwén — 維基百科 — 自由的百科全書" 
class="link-box" data-converttitle-hans="Zhōngwén — 维基百科 — 自由的百科全书" 
id="zh_top10">
 <strong>中文</strong><br>
 <em data-convert-hans="自由的百科全书" id="zh_tag" 
class="emNonItalicLang">自由的百科全書</em><br>
-<small>848&nbsp;000+ <span data-convert-hans="条目" id="zh_art">條目</span></small>
+<small>850&nbsp;000+ <span data-convert-hans="条目" id="zh_art">條目</span></small>
 </a>
 </div>
-<!-- #10. pl.wikipedia.org - 9 539 000 views/day -->
+<!-- #10. pl.wikipedia.org - 59 075 000 views/day -->
 <div class="central-featured-lang lang10" lang="pl">
 <a href="//pl.wikipedia.org/" title="Polski — Wikipedia — Wolna encyklopedia" 
class="link-box">
 <strong>Polski</strong><br>
 <em>Wolna encyklopedia</em><br>
-<small>1&nbsp;143&nbsp;000+ haseł</small>
+<small>1&nbsp;147&nbsp;000+ haseł</small>
 </a>
 </div>
 </div>
@@ -480,6 +480,7 @@
 <li><a href="//km.wikipedia.org/" lang="km" title="Phéasa 
Khmér">ភាសាខ្មែរ</a></li>
 <li><a href="//rw.wikipedia.org/" lang="rw">Kinyarwanda</a></li>
 <li><a href="//kv.wikipedia.org/" lang="kv" title="Komi">Коми</a></li>
+<li><a href="//kg.wikipedia.org/" lang="kg">Kongo</a></li>
 <li><a href="//gom.wikipedia.org/" lang="gom"><span 
lang="gom-Deva">कोंकणी</span> / <span lang="gom-Latn">Konknni</span></a></li>
 <li><a href="//lo.wikipedia.org/" lang="lo" title="Phaasaa 
Laao">ພາສາລາວ</a></li>
 <li><a href="//lad.wikipedia.org/" lang="lad" title="Ladino"><span 
lang="lad-Latn">Dzhudezmo</span> / <bdi lang="lad-Hebr" 
dir="rtl">לאדינו</bdi></a></li>
@@ -566,7 +567,6 @@
 <li><a href="//iu.wikipedia.org/" lang="iu"><span lang="iu-Cans">ᐃᓄᒃᑎᑐᑦ</span> 
/ <span lang="iu-Latn">Inuktitut</span></a></li>
 <li><a href="//ik.wikipedia.org/" lang="ik">Iñupiak</a></li>
 <li><a href="//ks.wikipedia.org/" lang="ks" title="Kashmiri"><bdi 
dir="rtl">كشميري</bdi></a></li>
-<li><a href="//kg.wikipedia.org/" lang="kg">Kongo</a></li>
 <li><a href="//ltg.wikipedia.org/" lang="ltg">Latgaļu</a></li>
 <li><a href="//lg.wikipedia.org/" lang="lg">Luganda</a></li>
 <li><a href="//mo.wikipedia.org/" lang="ro-Cyrl" 
title="Moldovenească">Молдовеняскэ</a></li>
@@ -656,7 +656,7 @@
 </div>
 <div style="text-align:center"><a 
href="//wikimediafoundation.org/wiki/Terms_of_Use">Terms of Use</a> | <a 
href="//wikimediafoundation.org/wiki/Privacy_policy">Privacy Policy</a></div>
 <script>var _=_||{};_.now=Date.now||function(){return(new 
Date).getTime()},_.throttle=function(n,t,u){var e,l,r,a=null,o=0;u||(u={});var 
i=function(){o=u.leading===!1?0:_.now(),a=null,r=n.apply(e,l),a||(e=l=null)};return
 function(){var c=_.now();o||u.leading!==!1||(o=c);var p=t-(c-o);return 
e=this,l=arguments,0>=p||p>t?(a&&(clearTimeout(a),a=null),o=c,r=n.apply(e,l),a||(e=l=null)):a||u.trailing===!1||(a=setTimeout(i,p)),r}},_.debounce=function(n,t,u){var
 e,l,r,a,o,i=function(){var 
c=_.now()-a;t>c&&c>=0?e=setTimeout(i,t-c):(e=null,u||(o=n.apply(r,l),e||(r=l=null)))};return
 function(){r=this,l=arguments,a=_.now();var c=u&&!e;return 
e||(e=setTimeout(i,t)),c&&(o=n.apply(r,l),r=l=null),o}};</script>
-<script>!function(e,t){"use strict";function n(e,t){var 
n,r,o={};for(n=0;n<t.length;n++){var 
a=t[n].nodes;for(r=0;r<a.length;r++)a[r].contains(e)&&(o=t[n])}return 
o.name}function 
r(e){return"A"!==e.tagName&&e.parentElement?r(e.parentElement):e}function 
o(){var t={event_type:"landing"};e.logEvent(s,t)}function a(){var 
t,o=window.event,a=o.target||o.srcElement;if(a.matches("a, a *")){t=r(a);var 
i={event_type:"clickthrough",destination:t.href,section_used:n(t,d)};i.section_used&&e.logEvent(s,i)}}function
 i(){var 
t=window.event,r=t.target||t.srcElement,o={event_type:"clickthrough",section_used:n(r,d),destination:r.action};o.section_used&&e.logEvent(s,o)}var
 
s,d,c,l,u,g=document.cookie.match(/GeoIP=.[^:]/);if("rejected"!==t.group&&!t.loggingDisabled){s={name:"WikipediaPortal",revision:14377354,defaults:{session_id:t.sessionId,event_type:"landing",referer:document.referrer||null,accept_language:navigator&&navigator.language?navigator.language:navigator.browserLanguage,cohort:t.group},properties:{session_id:{type:"string",required:!0},event_type:{type:"string",required:!0,"enum":["landing","clickthrough"]},section_used:{type:"string",required:!1,"enum":["primary
 links","search","language search","secondary links","other languages","other 
projects"]},destination:{type:"string",required:!1},referer:{type:"string",required:!1},country:{type:"string",required:!1},accept_language:{type:"string",required:!0},cohort:{type:"string",required:!1}}},d=[{name:"primary
 
links",nodes:document.querySelectorAll(".central-featured")},{name:"search",nodes:document.querySelectorAll(".search-form")},{name:"language
 search",nodes:document.querySelectorAll(".language-search")},{name:"secondary 
links",nodes:document.querySelectorAll(".langlist")},{name:"other 
languages",nodes:document.querySelectorAll("#langlist-other")},{name:"other 
projects",nodes:document.querySelectorAll(".otherprojects")}],document.addEventListener("click",a),c=document.getElementsByTagName("form");for(var
 m=0;m<c.length;m++)c[m].addEventListener("submit",i);if(g){var 
p=g.toString().split("=")[1];s.defaults.country=p,window.addEventListener("load",o)}else
 u=function(){"undefined"!=typeof 
Geo&&Geo.country&&(s.defaults.country=Geo.country),window.addEventListener("load",o)},l=document.createElement("script"),l.onreadystatechange=function(){("complete"===this.readyState||"loaded"===this.readyState)&&u()},l.onload=u,l.src="https://geoiplookup.wikimedia.org/",document.getElementsByTagName("head")[0].appendChild(l);/1|yes/.test(navigator.doNotTrack)||(document.cookie="portal_user_id="+s.defaults.session_id)}}(eventLoggingLite,wmTest);</script>
+<script>!function(e,t){"use strict";function n(e,t){var 
n,r,o={};for(n=0;n<t.length;n++){var 
a=t[n].nodes;for(r=0;r<a.length;r++)a[r].contains(e)&&(o=t[n])}return 
o.name}function 
r(e){return"A"!==e.tagName&&e.parentElement?r(e.parentElement):e}function 
o(){var t={event_type:"landing"};e.logEvent(s,t)}function a(){var 
t,o=window.event,a=o.target||o.srcElement;if(a.matches("a, a *")){t=r(a);var 
i={event_type:"clickthrough",destination:t.href,section_used:n(t,c)};i.section_used&&e.logEvent(s,i)}}function
 i(){var 
t=window.event,r=t.target||t.srcElement,o={event_type:"clickthrough",section_used:n(r,c),destination:r.action};o.section_used&&e.logEvent(s,o)}var
 
s,c,l,u=document.cookie.match(/GeoIP=.[^:]/);if("rejected"!==t.group&&!t.loggingDisabled){s={name:"WikipediaPortal",revision:14377354,defaults:{session_id:t.sessionId,event_type:"landing",referer:document.referrer||null,accept_language:navigator&&navigator.language?navigator.language:navigator.browserLanguage,cohort:t.group},properties:{session_id:{type:"string",required:!0},event_type:{type:"string",required:!0,"enum":["landing","clickthrough"]},section_used:{type:"string",required:!1,"enum":["primary
 links","search","language search","secondary links","other languages","other 
projects"]},destination:{type:"string",required:!1},referer:{type:"string",required:!1},country:{type:"string",required:!1},accept_language:{type:"string",required:!0},cohort:{type:"string",required:!1}}},c=[{name:"primary
 
links",nodes:document.querySelectorAll(".central-featured")},{name:"search",nodes:document.querySelectorAll(".search-form")},{name:"language
 search",nodes:document.querySelectorAll(".language-search")},{name:"secondary 
links",nodes:document.querySelectorAll(".langlist")},{name:"other 
languages",nodes:document.querySelectorAll("#langlist-other")},{name:"other 
projects",nodes:document.querySelectorAll(".otherprojects")}],document.addEventListener("click",a),l=document.getElementsByTagName("form");for(var
 d=0;d<l.length;d++)l[d].addEventListener("submit",i);if(u){var 
g=u.toString().split("=")[1];s.defaults.country=g}window.addEventListener("load",o),/1|yes/.test(navigator.doNotTrack)||(document.cookie="portal_user_id="+s.defaults.session_id)}}(eventLoggingLite,wmTest);</script>
 <script>!function(e){"use strict";function t(e){return 
document.getElementById(e)}function 
n(e,t,n){e&&(e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&(p.push([e,t,n]),e.attachEvent("on"+t,n)))}function
 
a(e,t,n){e&&(e.removeEventListener?e.removeEventListener(t,n):e.detachEvent&&e.detachEvent("on"+t,n))}function
 o(e){var 
t=function(){a(document,"DOMContentLoaded",t),a(window,"load",t),e()};"complete"===document.readyState?e():(n(document,"DOMContentLoaded",t),n(window,"load",t))}function
 i(e){var 
t,n;document.querySelector&&"www-wiktionary-org"===document.body.id&&!e.match(/\W/)&&(t=document.querySelector('option[lang|="'+e+'"]'),n=t&&t.getAttribute("data-logo"),n&&document.body.setAttribute("data-logo",n))}function
 r(){var 
e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage||"";return
 e.toLowerCase().split("-")[0]}function c(){var 
e=document.cookie.match(/(?:^|\W)searchLang=([^;]+)/);return(e?e[1]:r()).toLowerCase()}function
 
u(e,t){for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}function
 l(e){var 
n,a,o="data-convert-hans",i="data-converttitle-hans";if(-1!=="zh-hans,zh-cn,zh-sg,zh-my,".indexOf(e+",")){var
 
r=["zh_art","zh_others","zh_search","zh_tag","zh_top10","zh-yue_wiki","gan_wiki","hak_wiki","wuu_wiki"];for(n=0;n<r.length;n+=1)a=t(r[n]),a&&(a.hasAttribute(o)&&u(a,a.getAttribute(o)),a.hasAttribute(i)&&(a.title=a.getAttribute(i)))}}function
 d(e){var 
n;0===e.indexOf("zh")&&(n=e.substring(3),"mo"===n?n="hk":"my"===n&&(n="sg"),n&&"cn,tw,hk,sg,".indexOf(n+",")>=0&&(t("zh_wiki").href+="zh-"+n+"/",t("zh_others").href=t("zh_others").href.replace("wiki/","zh-"+n+"/")),l(e))}function
 s(){if(void 0!==window.HTMLDataListElement){var 
a=document.createElement("datalist"),o=t("searchInput");a.id="suggestions",document.body.appendChild(a),o.autocomplete="off",o.setAttribute("list","suggestions"),n(o,"input",_.debounce(function(){var
 
n,a,i=document.getElementsByTagName("head")[0],r=t("api_opensearch"),c=encodeURIComponent(o.value);n=e.abtest1?t("searchLanguage").getAttribute("data-lang-value"):t("searchLanguage").value,a=window.location.hostname.replace("www.",n+"."),r&&i.removeChild(r),r=document.createElement("script"),r.id="api_opensearch",r.src="//"+encodeURIComponent(a)+"/w/api.php?action=opensearch&limit=10&format=json&callback=portalOpensearchCallback&search="+c,i.appendChild(r)},200))}}function
 g(e){if(e){var t=r(),n=t.match(/^\w+/),a=new 
Date;i(e),n&&n[0]===e?a.setTime(a.getTime()-1):a.setFullYear(a.getFullYear()+1),document.cookie="searchLang="+e+";expires="+a.toUTCString()+";domain="+location.host+";"}}function
 h(){return void 0!==window.devicePixelRatio?window.devicePixelRatio:void 
0!==window.msMatchMedia?window.msMatchMedia("(min-resolution: 
192dpi)").matches?2:window.msMatchMedia("(min-resolution: 
144dpi)").matches?1.5:1:1}function m(e,t){var 
n,a,o,i,r={ratio:1};for(n=t.split(/ *, 
*/),o=0;o<n.length;o++)a=n[o].match(/\s*(\S+)(?:\s*([\d.]+)w)?(?:\s*([\d.]+)h)?(?:\s*([\d.]+)x)?\s*/),i=a[4]&&parseFloat(a[4]),e>=i&&i>r.ratio&&(r.ratio=i,r.src=a[1],r.width=a[2]&&parseFloat(a[2]),r.height=a[3]&&parseFloat(a[3]));return
 r}function f(){var e,t,n=h(),a=new Image;if(n>1&&void 
0===a.srcset)for(e=document.getElementsByTagName("img"),t=0;t<e.length;t++){var 
o,i=e[t],r=i.getAttribute("srcset");"string"==typeof r&&""!==r&&(o=m(n,r),void 
0!==o.src&&(i.setAttribute("src",o.src),void 
0!==o.width&&i.setAttribute("width",o.width),void 
0!==o.height&&i.setAttribute("height",o.height)))}}var 
p=[];window.onunload=function(){var 
e,t;for(e=0;e<p.length;e++)t=p[e],t[0]&&t[0].detachEvent("on"+t[1],t[2]);p=[]},o(function(){var
 
n,a,o,r,l,s,g,h,m,f=c();if(f&&(d(f),n=f.match(/^\w+/)))if(n="nb"===n[0]?"no":n[0],a=t("searchLanguage"),a&&"SELECT"===a.tagName){for(o=a.getElementsByTagName("option"),r=0,l=o.length;!s&&l>r;r+=1)o[r].value===n&&(s=n);!s&&document.querySelector&&(g=document.querySelector('.langlist
 
a[lang|="'+n+'"]'),g&&(s=n,h=document.createElement("option"),h.setAttribute("lang",n),h.setAttribute("value",n),m=g.textContent||g.innerText||n,u(h,m),a.appendChild(h))),s&&(a.value=s,i(s))}else
 if(e.abtest1&&a&&"UL"===a.tagName){var 
p=a.getElementsByTagName("li");for(r=0,l=p.length;!s&&l>r;r+=1)p[r].firstChild.getAttribute("data-lang-value")===n&&(s=n);if(!s&&document.querySelector&&(g=document.querySelector('.langlist
 a[lang|="'+n+'"]'))){s=n;var 
v=document.createElement("li"),w=document.createElement("a");w.setAttribute("lang",n),w.setAttribute("data-lang-value",n),u(w,g.textContent||g.innerText||n),v.appendChild(w),a.appendChild(v)}if(s){a.setAttribute("data-lang-value",s),u(document.getElementById("selectedLanguageCode"),n.toUpperCase()),document.getElementById("hiddenLanguageInput").value=s;var
 b=document.querySelector("#searchLanguage 
.selected"),L=document.querySelector('#searchLanguage 
[lang="'+s+'"]');b&&(b.className=""),L&&(L.parentNode.className="selected"),i(s)}}}),window.wmSuggestionsEL=null,window.portalOpensearchCallback=_.debounce(function(e){var
 
n,a=window.wmSuggestionsEL||t("suggestions"),o=a.children,i=document.createDocumentFragment();for(n=0;n<e[1].length;n+=1){var
 
r=o[n]||document.createElement("option");r.value=e[1][n],o[n]||i.appendChild(r)}a.appendChild(i.cloneNode(!0))},100),o(function(){var
 
a,o,i,r=t("searchInput"),c=t("searchLanguage");if(r)for(r.setAttribute("results","10"),s(),void
 
0===r.autofocus?r.focus():window.scroll(0,0),a=location.search&&location.search.substr(1).split("&"),o=0;o<a.length;o+=1)if(i=a[o].split("="),"search"===i[0]&&i[1]){r.value=decodeURIComponent(i[1].replace(/\+/g,"
 "));break}e.abtest1||n(c,"change",function(){g(c.value)})}),o(function(){var 
e=document.searchwiki&&document.searchwiki.elements.uselang;e&&(e.value=r())}),o(f),o(function(){function
 t(){n(document,"keydown",r),n(document,"mouseover",r)}function 
o(){a(document,"keydown",r),a(document,"mouseover",r)}function 
i(e){e=e||document.querySelector("#searchLanguage .selected");var 
t,n=s.scrollTop,a=e.offsetTop,o=s.clientHeight,i=e.clientHeight;n>a?t=a:(t=a,t-=o/2,t+=i),s.scrollTop=t}function
 r(e){e=e||window.event;var 
t=40,n=38,a=13,o=9,r=27,c=document.querySelector("#searchLanguage 
li.selected")||document.querySelector("#searchLanguage 
li"),u=!0,d=c,g=e.which||e.keyCode,h=e.target||e.srcElement;if(g===t)c=c.nextElementSibling||c;else
 if(g===n)c=c.previousElementSibling||c;else 
if("A"===h.tagName&&"searchLanguage"===h.parentNode.parentNode.id)c=h.parentNode,u=!1;else{if(g===o)return
 void w.close();if(g===r)return void w.close();if(g===a)return 
l(w.getLanguage()),void 
w.close();if(!p[g]||!v[p[g]])return;c=s.childNodes[v[p[g]].nodeId]}e.preventDefault?e.preventDefault():e.returnValue=!1,d.className="",c.className="selected",u&&i(c)}function
 
c(){s.onclick=function(){l(w.getLanguage())},n(document,"click",w.close)}function
 u(){s.onclick=null,a(document,"click",w.close)}function 
l(e){m.innerHTML=e.toUpperCase(),h.className="language-picker 
flash-text",document.getElementById("hiddenLanguageInput").value=e,g(e),setTimeout(function(){f.focus()})}function
 
d(){h.onclick=function(e){e=e||window.event,e.stopPropagation?e.stopPropagation():e.cancelBubble=!1},h.onfocus=function(){w.open()};for(var
 
e,t,n=0;n<s.childNodes.length;n++)e=s.childNodes[n],"LI"===e.tagName&&(t=e.firstChild.innerHTML.toLowerCase().substr(0,1),e.firstChild.getAttribute("data-lang-value")&&!v[t]&&(v[t]={nodeId:n,lang:e.firstChild.getAttribute("lang"),code:e.firstChild.getAttribute("data-lang-value"),label:e.firstChild.innerHTML}))}if(e.abtest1){var
 
s=document.getElementById("searchLanguage"),h=document.querySelector(".language-picker"),m=document.getElementById("selectedLanguageCode"),f=document.getElementById("searchInput"),p={48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},v={},w={};return
 w.getLanguage=function(){return document.querySelector(".selected > 
a").getAttribute("lang")||document.querySelector(".selected > 
a").getAttribute("data-lang-value")},w.open=function(){t(),c();var 
e=window.pageYOffset,n=window.innerHeight,a=f.offsetParent.offsetTop,o=192;a+o-e>n?s.className="open
 dropup":s.className="open",h.className="language-picker 
active",i()},w.close=function(){o(),u(),s.className="","language-picker 
active"===h.className&&(h.className="language-picker"),h.blur()},d(),w}})}(wmTest),window.mw||(window.mw=window.mediaWiki={loader:{state:function(){}}});</script>
 </body>
 </html>
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I40cbfec3fa03513f363e459ffe37d62c810795e2
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/portals
Gerrit-Branch: master
Gerrit-Owner: Jdrewniak <[email protected]>

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

Reply via email to