Press "Enter" to skip to content

Five New Userscripts Give Wikimedia Commons More Insight

When the author of a new File Impact Snapshot script opened the Commons page for File Einstein Head.jpg, the data displayed was far from what was expected. On 2 November 2026 the snapshot recorded 9,908 usage entries across 141 language editions of Wikimedia projects. Persian Wikipedia alone accounted for 2,643 of those uses, while English Wikipedia contributed 492. The numbers demonstrated that a single image can travel widely across the ecosystem, often in ways that differ from common assumptions.

That surprise sparked a broader question: could the ordinary Commons file page reveal more of its hidden story without requiring contributors to click through multiple menus? The answer came in the form of five independent userscripts, each addressing a distinct piece of the puzzle. Four of the tools focus on enriching the information displayed on Commons file pages, while the fifth helps editors stay aware of changes across any Wikimedia wiki they watch.

Turning Metadata Into Immediate Insight

Lat/Long Finder tackles the first gap—geographical context. Many Commons uploads include GPS coordinates embedded in the file description. The script reads those coordinates, sends them to OpenStreetMap’s Nominatim service, and then presents a concise panel that lists the city, region or state, country and even a small flag icon. A direct link to the exact point on the map is also provided. If a file lacks coordinates, the panel simply does not appear, keeping the interface clean.

File Impact Snapshot builds on the Einstein example to give a visual summary of an image’s global reach. After gathering usage data from all Wikimedia projects, the script shows total usage counts, breaks them down by project type, and lists the most active language editions. A bar chart visualises project‑wise distribution, and the eight wikis with the highest usage are highlighted. The tool makes it instantly clear whether an image is popular on a particular language edition or spread thinly across many.

Category Depth Checker addresses discoverability within Commons’ category system. Files are often placed in broad categories, even when more specific subcategories exist. The script scans the visible categories on a file page, identifies any that have more than ten direct subcategories, and then issues a warning. It also suggests up to five more precise subcategories that editors might consider. During testing on a photograph of the Taj Mahal, the script flagged the generic “Symmetry impressions” category and offered narrower alternatives, though it never changes categories automatically—the final decision remains with the contributor.

Breadcrumb Injector improves navigation through the category hierarchy. It inserts a clickable breadcrumb trail above the page heading on both file and category pages. The trail follows parent categories up to five levels deep, giving contributors a quick sense of where a page sits within the larger taxonomy and a convenient way to move upward or laterally in the structure.

Keeping an Eye on Ongoing Changes

The fifth script, Watchlist Notifier, targets a different workflow need. Contributors who monitor several pages via a watchlist often find the manual process of reloading the list tedious, and important edits can be missed when the list is long. The notifier runs in the background, checking the user’s watchlist every 60 seconds. When a new edit appears, a browser notification pops up, and a session panel is added to the Tools sidebar to record changes made during the current browsing session. The script stores the last‑seen revision ID locally, ensuring that only fresh edits trigger alerts.

Watchlist Notifier can be installed on any Wikimedia wiki, not just Commons. When added to a specific wiki’s common.js, it monitors that wiki’s watchlist exclusively, allowing editors to receive separate notifications for Commons and for, say, Wikipedia, depending on where they install the script.

Development Lessons and Practical Constraints

Creating the five tools required more than just coding; it involved a deep dive into Wikimedia’s technical environment. The platform’s content security policy blocks requests to many external sites, which limited the ways the scripts could fetch data. For example, because OpenStreetMap’s Nominatim service imposes fair‑use limits, Lat/Long Finder is designed for occasional, page‑by‑page lookups rather than bulk processing.

The author also emphasized the importance of checking existing gadgets, templates and built‑in features before adding new scripts. The goal was to fill genuine gaps rather than duplicate functionality already available on the platform. Debugging proved educational as well—behaviour that works in a browser console does not always survive the page‑load lifecycle, making familiarity with MediaWiki APIs and developer tools essential.

All five scripts remain small, focused, and non‑intrusive. None of them edit page content, categories or file metadata. They simply retrieve information and enhance the browsing experience with extra panels, visualisations or notifications. Watchlist Notifier stores its state in browser storage, avoiding duplicate alerts.

Getting Started and Looking Ahead

The scripts are hosted in a public Wikimedia Commons collection and released under the CC0‑1.0 licence, which permits anyone to copy, adapt and share them freely. To try the four Commons‑specific tools, editors add the appropriate import lines to their personal common.js on Commons and perform a hard refresh (Ctrl + Shift + R). Watchlist Notifier is installed in the same way on the target wiki’s common.js. As with any userscript, contributors are advised to review the source code before activation, since the script runs with the permissions of the user’s account.

The author concludes with a call to the community: pick a well‑known photograph, run the five scripts, and see what new facts emerge. Questions such as “Where was this image taken?” “Which unexpected project uses it?” “How deep is its categorisation?” are meant to inspire further refinements. Suggestions for additional information that could appear directly on file pages are welcomed, with the hope that the next useful userscript will arise from everyday contributor needs.

In short, the five lightweight userscripts demonstrate that modest technical additions can surface hidden metadata, clarify an image’s reach, and streamline routine monitoring tasks, all without overhauling the Wikimedia Commons interface.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *