Jump to content

User:Amalthea/File Redlinks.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//convert Wikipedia:Upload redlinks to proper File links, showing the deletion log and all, just like any other redlink does.
for (var i=0; i<document.links.length; i++)
{
  document.links[i].href = document.links[i].href.replace("/wiki/Wikipedia:Upload?wpDestFile=", "/w/index.php?action=edit&title=File:");
}