User:Chlod/Scripts/Deputy.js: Difference between revisions

Content deleted Content added
(bot/CD)
(bot/CD)
Line 351:
 
var version = "0.6.0";
var gitAbbrevHash = "2f9a325b05c7a4";
var gitBranch = "main";
var gitDate = "WedThu, 1422 Feb 2024 1312:2840:1156 +0800";
var gitVersion = "0.6.0+g2f9a325gb05c7a4";
 
/**
Line 14,941:
}
/**
* A much more loose version of {@link CopyrightProblemsListing#getListing}, which only checks if a given
* which only checks if a given page is a link at the start of a paragraph or `<[uo]l>` list. Metadata is
* `<[uo]l>` list. Metadata is unavailable with this method.
*
* @param el
Line 15,054:
}
}
if// (startLineWe've ===reached lines.lengththe -end 1)of {the document.
// `startLine` is only //ever Lastset lineif only.the IDs match, so we can safely assume
// that if `startLine` returnand {`endLine` start:is startLine,set end:or if `startLine` is the last };line
// in the page, then we've found the listing (and it is the last listing on the
// page, where `endLine` would have been set if it had comments).
if ((startLine != null && endLine != null) ||
(startLine != null && startLine === lines.length - 1)) {
return { start: startLine, end: endLine !== null && endLine !== void 0 ? endLine : startLine };
}
// Couldn't find an ending. Malformed listing?
// It should be nearly impossible to hit this condition.
// Gracefully handle this.
throw new Error("Couldn'Listingt isdetect missinglisting from wikitext or(edit malformedconflict/is listing'it missing?)");
});
}
Line 15,075 ⟶ 15,081:
const range = yield this.getListingWikitextLines();
if (indent) {
// This usually isn't needed. {{CPC}} handles the bullet.
message = (this.element.parentElement.tagName === 'LI' ?
'*:' :