Jump to content

User:Anomie/file-toggle-transparency

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Qwerfjkl (bot) (talk | contribs) at 14:39, 8 May 2022 (Usage: Replaced deprecated <source> tags with <syntaxhighlight>). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

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.