For site-wide use, an administrator can add the line below to the wiki's MediaWiki:ImportJS page.
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.
Note: In this example, pay close attention to the placement of commas and other punctuation. For people who aren't familiar with programming (and even those who are!), a common mistake when writing code is to accidentally delete, forget, or misplace critical symbols like commas or quotation marks. This can cause a syntax error that breaks the code. Carefully follow the convention shown here when using importArticles.
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.