Jump to content

User:BlankEclair/SpecialUploadPrefillFromComic.js: Difference between revisions

Hook up categories to add with actual adding
m (Fix typo)
(Hook up categories to add with actual adding)
Line 190:
var dialog = this;
if (action === "continue") {
debugger;
if (!this.requiredFieldsFilled()) {
mw.notify(getMessage("required-fields-unfilled"), {type: "error"});
Line 202 ⟶ 201:
var licenseToSet = this.typeSelect.findSelectedItem();
licenseToSet = licenseToSet ? licenseToSet.getData() : null;
var categoriesToAdd = this.categoriesField.getValue();
 
// Why isn't this using mw.Api? Because I keep breaking abstractions (seriously, is there no way I could get an AJAX response from JQuery without it parsing and potentially throwing an error?)
Line 248:
return match + date;
});
if (categoriesToAdd) {
newDescription += "\n\n" + categoriesToAdd.map(function(category) { return "[[Category:" + category + "]]"; }).join("\n");
debugger; }
setCurrentDescription(newDescription);
if (licenseToSet) {
Cookies help us deliver our services. By using our services, you agree to our use of cookies.