Index: trunk/extensions/CentralNotice/newCentralNotice.js |
— | — | @@ -20,6 +20,8 @@ |
21 | 21 | 'loadBanner': function( bannerName ) { |
22 | 22 | // get the requested banner from /centralnotice/banners/<bannername>/<wgUserLanguage>.js |
23 | 23 | var bannerPage = 'Special:BannerLoader?banner='+bannerName+'&userlang='+wgContentLanguage+'&sitename='+wgNoticeProject; |
| 24 | + //centralized version: |
| 25 | + //var bannerURL = 'http://meta.wikimedia.org/wiki/'+bannerPage; |
24 | 26 | var bannerURL = wgArticlePath.replace( '$1', bannerPage ); |
25 | 27 | var request = $.ajax( { |
26 | 28 | url: bannerURL, |
— | — | @@ -34,10 +36,14 @@ |
35 | 37 | if ( timestamp ) { |
36 | 38 | listURL = "TBD" |
37 | 39 | } else { |
38 | | - listURL = "/centralnotice/"+wgNoticeProject+"/"+wgContentLanguage+".js" |
| 40 | + var geoLocation = 'US'; // Hard-coding for now |
| 41 | + var bannerListPage = 'Special:BannerListLoader?language='+wgContentLanguage+'&project='+wgNoticeProject+'&location='+geoLocation; |
| 42 | + //centralized version: |
| 43 | + //var bannerListURL = 'http://meta.wikimedia.org/wiki/'+bannerListPage; |
| 44 | + var bannerListURL = wgArticlePath.replace( '$1', bannerListPage ); |
39 | 45 | } |
40 | 46 | var request = $.ajax( { |
41 | | - url: listURL, |
| 47 | + url: bannerListURL, |
42 | 48 | dataType: 'json', |
43 | 49 | success: function( data ) { |
44 | 50 | $.centralNotice.fn.chooseBanner( data ); |