Content deleted Content added
Improve vote-matching |
Update vote detection for semicolons |
||
Line 34:
if (!NominationsViewer.enabledPages) {
NominationsViewer.enabledPages = {
'Wikipedia:Featured article candidates': 'nominations',
Line 734:
*/
function getVoteTextAndPatterns() {
// Look for text that is enclosed within bold text, or level-4
// headings.
const wrapPattern = "('''|====)";
Line 748 ⟶ 749:
let opposeText = 'oppose';
// Use different words for review pages.
if (nomType('reviews')) {
supportText = 'keep';
opposeText = 'delist';
// Pictures has their own specific method of declaring votes.
} else if (nomType('pictures')) {
openPattern = "\\*(\\s)?'''.*?";
closePattern = ".*?'''";
}
const createPattern = (text) =>
return {
supportText,
supportPattern:
▲ `${openPattern}${supportText}${closePattern}`,
▲ 'gi'
▲ ),
opposeText,
opposePattern:
▲ ),
};
}
|