FANDOM


FixWantedFiles is a JavaScript script that fixes something that is most likely a bug: Clicking the redlink on Special:Wantedfiles goes to the page that edits the text of the page, instead of going to the upload file page.

This script fixes that issue.

It changes
/index.php?title=<image name>&action=edit&redlink=1
to
/wiki/Special:Upload?wpDestFile=<image name>

Installation

Importing multiple scripts? This quick guide shows how to combine the imports.
  • For site-wide use, an administrator can add the line below to the wiki's MediaWiki:ImportJS page.
dev:FixWantedFiles/code.js
  • For personal use, add the code snippet below to your global.js page (for use on all wikis) or your common.js page on your wiki (for use on a single wiki). Note that personal JS must be enabled for your account.
importArticles({
    type: 'script',
    articles: [
        'u:dev:MediaWiki:FixWantedFiles/code.js',
    ]
});

History

This fix is the result of this forum thread. Short as this snippet may be, it went through several iterations very quickly. The original request for the functionality came from MTracey1. Fandyllic wrote an initial version that was not carefully tailored specifically to Special:WantedFiles, so Rappy wrote a second, better version and Pecoes the current version.