MediaWiki:AFC-submit-wizard.js: Difference between revisions
Content deleted Content added
m fix page name following move |
apply caching in json load |
||
Line 128:
// Load a JSON page from the wiki
function
return $.getJSON(
"&titles=" + encodeURIComponent(page) + "&prop=revisions&rvprop=content" +
"&uselang=content&maxage=86400&smaxage=86400" // parameters to force caching
).then(function(apiResponse) {
return JSON.parse(apiResponse.query.pages[0].revisions[0].content);
});
}
var topicOptionsLoaded = $.Deferred();
var options = [];
$.each(optionsJson, function(code, info) {
Line 167 ⟶ 173:
// populate talk page tags for multi-select widget
var talkTagOptionsLoaded = $.Deferred();
talkTagsInput.addOptions(Object.keys(data).map(function (k) {
return {
Line 179 ⟶ 185:
// Get mapping of infoboxes with relevant WikiProjects
var ibxmapLoaded = $.Deferred();
ibxmapLoaded.resolve(data);
});
|