Content deleted Content added
[efac058] fix rev toolbar not properly moving to next rev |
v0.3.1; https://github.com/ChlodAlejandro/deputy/releases/tag/v0.3.1 |
||
Line 3,469:
}
var version = "0.3.
var gitAbbrevHash = "
var gitBranch = "
var gitDate = "
var gitVersion = "0.3.
/**
Line 13,538:
}
const config = yield window.InfringementAssistant.getWikiConfig();
const preloadText = config.ia.preload.get() ? `{{subst:${
// Only trim last newline, if any.
config.ia.preload.get().replace(/\n$/, '')}}}\n` : '';
const textParameters = appendMode ? {
appendtext: '\n' + content,
nocreate: true
} : {
Line 13,548 ⟶ 13,550:
// The `catch` statement here can theoretically create an infinite loop given
// enough race conditions. Don't worry about it too much, though.
yield MwApi.action.postWithEditToken(Object.assign(Object.assign({ action: 'edit', title: listingPage.getPrefixedText() }, textParameters), { summary })).
// Purge the main listing page.
return MwApi.action.post({
action: 'purge',
titles: CopyrightProblemsPage.rootPage.getPrefixedText()
});
}).catch((code) => {
if (code === 'articleexists') {
// Article exists on non-append mode. Attempt a normal append.
Line 13,806 ⟶ 13,814:
const prefixedDb = anchor.getAttribute('id');
const title = anchorToTitle(el);
if (title === false || prefixedDb == null) {
// Not a valid link.
return false;
Line 14,635 ⟶ 14,643:
}
process.next(() => {
mw.notify(!this.shadow ?
mw.msg('deputy.ia.report.success.report') :
(action === 'hide' ?
|