dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "i18n: Drop img-auth-nologinnWL, unused AFAICT"
[lhc/web/wiklou.git]
/
resources
/
src
/
mediawiki.api
/
parse.js
diff --git
a/resources/src/mediawiki.api/parse.js
b/resources/src/mediawiki.api/parse.js
index
f38e88b
..
447b936
100644
(file)
--- a/
resources/src/mediawiki.api/parse.js
+++ b/
resources/src/mediawiki.api/parse.js
@@
-1,7
+1,7
@@
/**
* @class mw.Api.plugin.parse
*/
/**
* @class mw.Api.plugin.parse
*/
-( function (
mw, $
) {
+( function () {
$.extend( mw.Api.prototype, {
/**
$.extend( mw.Api.prototype, {
/**
@@
-26,13
+26,13
@@
if ( mw.Title && content instanceof mw.Title ) {
// Parse existing page
config.page = content.getPrefixedDb();
if ( mw.Title && content instanceof mw.Title ) {
// Parse existing page
config.page = content.getPrefixedDb();
+ apiPromise = this.get( config );
} else {
// Parse wikitext from input
config.text = String( content );
} else {
// Parse wikitext from input
config.text = String( content );
+ apiPromise = this.post( config );
}
}
- apiPromise = this.get( config );
-
return apiPromise
.then( function ( data ) {
return data.parse.text;
return apiPromise
.then( function ( data ) {
return data.parse.text;
@@
-46,4
+46,4
@@
* @mixins mw.Api.plugin.parse
*/
* @mixins mw.Api.plugin.parse
*/
-}(
mediaWiki, jQuery
) );
+}() );