Skip to content

Commit

Permalink
submission: add reviewer to WP:AFC/recent (#370)
Browse files Browse the repository at this point in the history
* submission: add reviewer to WP:AFC/recent

Fixes #367

This corresponding edit to Template:AfC contribution makes this patch work: https://en.wikipedia.org/w/index.php?title=Template%3AAfC_contribution&diff=1241908041&oldid=619305950

* var to const
  • Loading branch information
NovemLinguae committed Aug 26, 2024
1 parent 2523eb9 commit e8fdae6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/submissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2411,11 +2411,12 @@
// AFC/RECENT
// ----------

const reviewer = AFCH.consts.user;
$.when( recentPage.getText(), afchSubmission.getSubmitter() )
.then( ( text, submitter ) => {
let newRecentText = text,
matches = text.match( /{{afc contrib.*?}}\s*/gi ),
newTemplate = '{{afc contrib|' + data.newAssessment + '|' + newPage + '|' + submitter + '}}\n';
newTemplate = '{{afc contrib|' + data.newAssessment + '|' + newPage + '|' + submitter + '|' + reviewer + '}}\n';

// Remove the older entries (at bottom of the page) if necessary
// to ensure we keep only 10 entries at any given point in time
Expand Down

0 comments on commit e8fdae6

Please sign in to comment.