User:Anomie/unattributed-image-finder

This script adds the class  to images that appear to be using the   parameter but do not have categories indicating that they may be used without attribution.

You can then add CSS rules to apply various visible changes to the image. The default rule is available in User:Anomie/unattributed-image-finder.css.

Usage
To use the script, add the following to your skin-specific Javascript file. Note that this script has only been extensively tested on Monobook.

If you want it to be run on demand (i.e. by clicking a button next to "unwatch"), include it something like this:

In either case, the line for unattributed-image-finder.css may be omitted, if you would rather add custom CSS rules to your skin-specific CSS file.

Please note that the line for unattributed-image-finder.css does not go in your skin.css, it goes in your skin.js along with the other lines. Alternatively, you can copy the contents of User:Anomie/unattributed-image-finder.css into your skin.css and customize the rules however you would like.

Caveats
To determine if an image is allowed to be used unattributed, the script checks the categories on the image page (here or at Commons, depending on the source of the image). This list of categories is not complete, so there may be false positives.

Testing
With the default rules, [//en.wikipedia.org/w/index.php?title=Template:Unreferenced&oldid=452031726 this old revision] of Template:Unreferenced should show the main image in the template is problematic.