User:Anomie/file-toggle-transparency

This script adds buttons to File description pages for PNG, GIF, and SVG files to change the fill behind the transparent areas of the image.

Usage

edit

To use the script, add the following to your skin-specific Javascript file.

importScript('User:Anomie/file-toggle-transparency.js'); // Linkback: [[User:Anomie/file-toggle-transparency.js]]

Note that this script has only been extensively tested on Monobook.

If you want to change the list of background options, assign an array of strings appropriate for the CSS background property to window.FileToggleTransparencyBackgrounds.