From d24ba2d7c88fe214455bf98187b7bf7e9e5fc406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20Tisza?= Date: Mon, 13 Jan 2014 10:29:59 +0000 Subject: [PATCH] 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 --- resources/ext.multimediaViewer/ext.multimediaViewer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/ext.multimediaViewer/ext.multimediaViewer.js b/resources/ext.multimediaViewer/ext.multimediaViewer.js index d1c4ece72..7a49368c3 100755 --- a/resources/ext.multimediaViewer/ext.multimediaViewer.js +++ b/resources/ext.multimediaViewer/ext.multimediaViewer.js @@ -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',