Use JSONP for gender query to avoid cross-domain issues

Querying the uploader's gender defaults to CORS, which is disallowed
for non-WMF sites and spams the javascript console with XHR errors.
JSONP works in such cases, and has no disadvantages I can think of.

Change-Id: I9b13210e03059a46407f119045540665c48585ad
This commit is contained in:
Gergő Tisza 2014-01-13 10:29:59 +00:00
parent 03ef24563b
commit d24ba2d7c8

View file

@ -541,7 +541,8 @@
// TODO this is ugly as hell, let's fix this in core.
new mw.Api( {
ajax: {
url: repoData.apiUrl || mw.util.wikiScript( 'api' )
url: repoData.apiUrl || mw.util.wikiScript( 'api' ),
dataType: 'jsonp'
}
} ).get( {
action: 'query',