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.
// red links
//////////////////////////////////////////////////

function stopRedlinksEditing(){ 
    var len=document.links.length;
    for(var i=0; i<len; ++i) {
        var l=document.links[i];
        if (l.className=='new') {
            l.href=l.href.replace('&action=edit','')
                         .replace('Special:Upload&wpDestFile=', 'Image:');
        }
    }
}
addOnloadHook(stopRedlinksEditing);

function listRedLinks() {
        var len=document.links.length;
        var output=document.createElement('div');
        output.innerHTML='<h2>Red links</h2>';
        var gotSome=false;
	var j=0;
        for (var i=0; i<len; ++i) {
		var lk=document.links[i];
                if (lk.className=='new') {
			j++;
                        gotSome=true;
                        var l=lk.cloneNode(true);
			lk.name=lk.name || 'redlink'+j;
			l.href='#' + lk.name;
                        output.appendChild(l);
                        output.appendChild(document.createElement('br'));
                }
        }
        if (gotSome){
                output.appendChild(document.createElement('hr'));
                var h1=document.getElementsByTagName('h1')[0];
                h1.parentNode.insertBefore(output, h1.nextSibling);
        }
}
addOnloadHook(function(){addToolboxLink('javascript:listRedLinks()', 'List red links');});