JS cleanup
Change-Id: I804d9f5e13f0c186da19cd31eae5156277f0f0d4
This commit is contained in:
@@ -1,13 +1,14 @@
|
|||||||
( function( mw, $ ) {
|
( function( mw, $ ) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
window.setGeo = function ( data ) {
|
mw.uls.setGeo = function ( data ) {
|
||||||
window.GEO = data;
|
window.GEO = data;
|
||||||
}
|
};
|
||||||
|
|
||||||
var settings = {
|
var settings = {
|
||||||
cache: true,
|
cache: true,
|
||||||
dataType: "jsonp",
|
dataType: "jsonp",
|
||||||
jsonpCallback: "setGeo"
|
jsonpCallback: "mw.uls.setGeo"
|
||||||
};
|
};
|
||||||
$.ajax( mw.config.get( 'wgULSGeoService' ), settings );
|
$.ajax( mw.config.get( 'wgULSGeoService' ), settings );
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,6 @@
|
|||||||
.concat( mw.uls.getPreviousLanguages() )
|
.concat( mw.uls.getPreviousLanguages() )
|
||||||
.concat( mw.uls.getAcceptLanguageList() );
|
.concat( mw.uls.getAcceptLanguageList() );
|
||||||
if ( window.GEO ) {
|
if ( window.GEO ) {
|
||||||
console.log( $.uls.data.languagesInTerritory( window.GEO.country_code ) );
|
|
||||||
list = list.concat( $.uls.data.languagesInTerritory( window.GEO.country_code ) );
|
list = list.concat( $.uls.data.languagesInTerritory( window.GEO.country_code ) );
|
||||||
}
|
}
|
||||||
$.each( list, function ( i, v ) {
|
$.each( list, function ( i, v ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user