User:BlankEclair/SpecialUploadPrefillFromComic.js: Difference between revisions
User:BlankEclair/SpecialUploadPrefillFromComic.js (view source)
Revision as of 09:44, 14 June 2024
, 21 days agoHook up categories to add with actual adding
BlankEclair (talk | contribs) m (Fix typo) |
BlankEclair (talk | contribs) (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");
setCurrentDescription(newDescription);
if (licenseToSet) {
|