User:PetraMagna/HotCat.js: Difference between revisions
Content deleted Content added
PetraMagna (talk | contribs) m auto "click" add button after enter is pressed in edit box |
PetraMagna (talk | contribs) previous one doesn't work; insanely ugly solution that fixes it; whatever |
||
Line 1,566:
const result = self.accept( evt );
// if save_button exists, we are in multiinput mode
setTimeout(function() {
const save_button = document.querySelector("#mw-normal-catlinks input[value='Save']");
if (save_button) {▼
// automatically click the add button
const
if (add_buttons.length == 0) {
add_button.click();▼
return;
}
const add_button = add_buttons[add_buttons.length - 1]
▲ add_button.click();
}
}
}, 100);
return result;
}
|