Jump to content

User:Wilfredor/commons-nominator

From Wikimedia Commons, the free media repository
commons-nominator
The Quality Image dialog, opened from the file page
DescriptionNominate files for FP, QI and VI, from the file page and from category thumbnails
AuthorWilfredor
StatusMaintained
Updated2026-09-07
SourceUser:Wilfredor/commons-nominator.js

Overview

[edit]

commons-nominator files nominations for the three assessment processes, and it files them one edit per click. Nothing is ever written without a press, there is no queue running in the background, and every precondition is re-read from the live page at the moment of the click rather than trusted from when the page was loaded.

It works in two places: on a file page, where it adds a row of links, and on a category page, where it writes on the thumbnails themselves.

On a file page

[edit]
⭐ FP, Commons:Featured picture candidates
Opens a dialog, creates the nomination subpage, transcludes it at the top of the candidate list, and offers a picker for the target gallery section. It enforces rule 11, the two open nominations per person cap, and refuses rather than guessing when the candidate list cannot be read.
🅀 QIC, Commons:Quality images candidates
Adds one gallery line under today's UTC date heading. It enforces the five per day cap, refuses a file that already has an open nomination on the list, and refuses a file that is not your own work, which is what QIC requires.
Ⓥ VIC, Commons:Valued image candidates
Creates the nomination subpage and appends the file to the {{VICs}} list. There is no daily or open cap; scope uniqueness is a reviewer judgement and is surfaced as a reminder rather than enforced.
🗓 POTD
Schedules a featured picture as Picture of the day on the next free date. Hidden on a file that has already been POTD.
🖼 Wikidata
Sets a featured picture as the image (P18) of the item it depicts, when that item has none.
🔎 Articles
Finds English Wikipedia articles the picture could illustrate, which is what a Commons FP needs before it can become an en.wp featured picture.

Each link greys itself out when it cannot act. The QIC link goes grey on a file that is already a quality image, and on a file that is not your own work, with the reason in the tooltip rather than in an error after the click.

On a category page

[edit]

The answer is written on the category page's own thumbnails, because deciding whether a picture deserves a nomination means looking at the picture.

🅰 QI
On every file on the page that is not already a quality image. Green with a halo when the file is a featured picture and still has no quality assessment, which is the case worth acting on: a featured picture has already cleared a higher bar than QI asks for, so the gap is nearly always an oversight. Measured on Category:Featured pictures by User:Wilfredor on 7 September 2026, 84 of 212 featured pictures had no quality assessment. Grey on any other picture.
🗓 POTD, ⭐ en-FP, 🔎 Articles
On the featured pictures, the same three actions as on the file page.
Static badges
A picture that has already been Picture of the Day, or is already featured on English Wikipedia, gets a quiet badge saying so instead of a link that would do nothing.

When the QI button is not offered

[edit]
  • The file is already a quality image. Nothing to do.
  • The file is not a picture. A category holds video, audio, PDF and DjVu, and quality image is a picture assessment. The first thing this did on a real page was offer to nominate a two hour video.
  • A bitmap below two megapixels. Commons:Image guidelines: "Images should have at least 2 real megapixels of information (with the exception of animations, videos, and SVGs)". Below that the nomination is a near certain oppose, so it is not offered. SVGs are exempt by that same sentence and keep the button.
  • Today's five are already filed. Every button on the page turns grey and says so in its tooltip, and clicking does nothing. Nominating from a thumbnail counts down, so the fifth nomination of the day greys out the rest immediately. This costs one extra read of the candidate list per category page, and only when there is at least one button it could apply to.

Whether the picture is your own work is not checked before the click. It costs one wikitext read per file and a category can hold hundreds, so the check stays at the moment of the click, where it refuses with a reason. A refusal that is about the file rather than about the network removes the button, so the same wrong click is not offered twice.

How it avoids exceeding the caps

[edit]

Every cap lives in exactly one place. The five per day figure is one constant, read both by the guard that refuses a nomination and by the greyed out hint that explains it, so the two cannot drift apart. The count itself reads parameter 1 of each nomination on the candidate list, which is the nominator's signature; parameter 2 is the reviewer, so a day spent reviewing other people's candidates does not consume your own quota.

The date heading is matched tolerantly. MediaWiki keeps whatever spacing was typed, so both ==June 13, 2026== and == June 13, 2026 == live on the real page, and an exact match would find neither, report zero nominations, and hand back a full day of quota that was already spent.

A failed read is never treated as a zero. If the candidate list cannot be fetched, the nomination is refused rather than filed on the assumption that nothing was filed today.

On a nomination page

[edit]

On Commons:Featured picture candidates subpages it adds rename buttons, and when a nomination is opened for editing it checks the two open nominations cap and warns before the edit rather than after.

Installation

[edit]

Add this line to Special:MyPage/common.js and reload with Ctrl+ Shift+R:

importScript('User:Wilfredor/commons-nominator.js');