Santhosh has uploaded a new change for review.

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

Change subject: Remove jsonp usage and use mediawiki.ForeignApi
......................................................................

Remove jsonp usage and use mediawiki.ForeignApi

Change-Id: I264e7e2e5ecf8abe14dae5eba4196e62c16bf51d
---
M modules/dashboard/ext.cx.suggestionlist.js
M modules/dashboard/ext.cx.translationlist.js
M modules/publish/ext.cx.wikibase.link.js
M modules/source/ext.cx.source.selector.js
M modules/tools/ext.cx.tools.categories.js
M modules/tools/ext.cx.tools.images.js
M modules/tools/ext.cx.tools.link.js
M modules/tools/ext.cx.tools.validator.js
M modules/widgets/pageselector/ext.cx.pageselector.js
9 files changed, 0 insertions(+), 45 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/76/317376/1

diff --git a/modules/dashboard/ext.cx.suggestionlist.js 
b/modules/dashboard/ext.cx.suggestionlist.js
index 067f0c0..829ef5b 100644
--- a/modules/dashboard/ext.cx.suggestionlist.js
+++ b/modules/dashboard/ext.cx.suggestionlist.js
@@ -297,10 +297,6 @@
                        pilimit: 50, // maximum
                        pithumbsize: 100,
                        redirects: true
-               }, {
-                       dataType: 'jsonp',
-                       // This prevents warnings about the unrecognized 
parameter "_"
-                       cache: true
                } );
        };
 
diff --git a/modules/dashboard/ext.cx.translationlist.js 
b/modules/dashboard/ext.cx.translationlist.js
index ef50c7d..95881f6 100644
--- a/modules/dashboard/ext.cx.translationlist.js
+++ b/modules/dashboard/ext.cx.translationlist.js
@@ -126,10 +126,6 @@
                        pilimit: 50, // maximum
                        pithumbsize: 100,
                        redirects: true
-               }, {
-                       dataType: 'jsonp',
-                       // This prevents warnings about the unrecognized 
parameter "_"
-                       cache: true
                } );
 
                // TODO: Handle continue
diff --git a/modules/publish/ext.cx.wikibase.link.js 
b/modules/publish/ext.cx.wikibase.link.js
index e899d8a..02af16c 100644
--- a/modules/publish/ext.cx.wikibase.link.js
+++ b/modules/publish/ext.cx.wikibase.link.js
@@ -30,10 +30,6 @@
                        action: 'query',
                        meta: 'siteinfo',
                        siprop: 'general'
-               }, {
-                       dataType: 'jsonp',
-                       // This prevents warnings about the unrecognized 
parameter "_"
-                       cache: true
                } ).done( function ( result ) {
                        var repoApi, targetWikiId, sourceWikiId, pageConnector;
 
diff --git a/modules/source/ext.cx.source.selector.js 
b/modules/source/ext.cx.source.selector.js
index b240cdd..883a3e4 100644
--- a/modules/source/ext.cx.source.selector.js
+++ b/modules/source/ext.cx.source.selector.js
@@ -641,10 +641,6 @@
                        search: input,
                        namespace: 0,
                        suggest: true
-               }, {
-                       dataType: 'jsonp',
-                       // This prevents warnings about the unrecognized 
parameter "_"
-                       cache: true
                } );
        };
 
diff --git a/modules/tools/ext.cx.tools.categories.js 
b/modules/tools/ext.cx.tools.categories.js
index a2f50d3..d401e0b 100644
--- a/modules/tools/ext.cx.tools.categories.js
+++ b/modules/tools/ext.cx.tools.categories.js
@@ -510,9 +510,6 @@
                        cllimit: 100,
                        indexpageids: true,
                        titles: title
-               }, {
-                       dataType: 'jsonp',
-                       cache: true
                } ).done( function ( response ) {
                        var pageId,
                                categoriesArray = [];
@@ -576,9 +573,6 @@
                        lllang: this.siteMapper.getWikiDomainCode( language ),
                        lllimit: 100,
                        redirects: true
-               }, {
-                       dataType: 'jsonp',
-                       cache: true
                } ).done( function ( response ) {
                        var redirects,
                                adaptedCategories = {};
diff --git a/modules/tools/ext.cx.tools.images.js 
b/modules/tools/ext.cx.tools.images.js
index d7cfed9..aa6379e 100644
--- a/modules/tools/ext.cx.tools.images.js
+++ b/modules/tools/ext.cx.tools.images.js
@@ -35,10 +35,6 @@
                        action: 'query',
                        meta: 'siteinfo',
                        siprop: 'namespaces'
-               }, {
-                       dataType: 'jsonp',
-                       // This prevents warnings about the unrecognized 
parameter "_"
-                       cache: true
                } ).then( function ( response ) {
                        var namespaceId, namespaceObj;
 
diff --git a/modules/tools/ext.cx.tools.link.js 
b/modules/tools/ext.cx.tools.link.js
index 5ea1427..1614abb 100644
--- a/modules/tools/ext.cx.tools.link.js
+++ b/modules/tools/ext.cx.tools.link.js
@@ -38,10 +38,6 @@
                        piprop: 'thumbnail',
                        pithumbsize: 150,
                        redirects: true
-               }, {
-                       dataType: 'jsonp',
-                       // This prevents warnings about the unrecognized 
parameter "_"
-                       cache: true
                } );
 
                // Keep the request in cache
@@ -83,10 +79,6 @@
                        lllimit: titles.length, // TODO: Default is 10 and max 
is 500. Do we need more than 500?
                        lllang: mw.cx.siteMapper.getWikiDomainCode( language ),
                        redirects: true
-               }, {
-                       dataType: 'jsonp',
-                       // This prevents warnings about the unrecognized 
parameter "_"
-                       cache: true
                } ).done( function ( response ) {
                        var redirects,
                                linkPairs = {};
diff --git a/modules/tools/ext.cx.tools.validator.js 
b/modules/tools/ext.cx.tools.validator.js
index b20b9da..e59f627 100644
--- a/modules/tools/ext.cx.tools.validator.js
+++ b/modules/tools/ext.cx.tools.validator.js
@@ -33,10 +33,6 @@
                        titles: title,
                        redirects: 1,
                        indexpageids: 1
-               }, {
-                       dataType: 'jsonp',
-                       // This prevents warnings about the unrecognized 
parameter "_"
-                       cache: true
                } ).then( function ( response ) {
                        var pageid = response.query.pageids[ 0 ];
 
@@ -74,9 +70,6 @@
                        lllang: mw.cx.siteMapper.getWikiDomainCode( 
targetLanguage ),
                        lllimit: 1,
                        redirects: true
-               }, {
-                       dataType: 'jsonp',
-                       cache: true
                } ).then( function ( response ) {
                        var equivalentTargetPage = false;
 
diff --git a/modules/widgets/pageselector/ext.cx.pageselector.js 
b/modules/widgets/pageselector/ext.cx.pageselector.js
index 9b11f83..7d4d06d 100644
--- a/modules/widgets/pageselector/ext.cx.pageselector.js
+++ b/modules/widgets/pageselector/ext.cx.pageselector.js
@@ -67,10 +67,6 @@
                        list: 'prefixsearch',
                        pssearch: input,
                        pslimit: 10
-               }, {
-                       dataType: 'jsonp',
-                       // This prevents warnings about the unrecognized 
parameter "_"
-                       cache: true
                } );
        };
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I264e7e2e5ecf8abe14dae5eba4196e62c16bf51d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to