User:GeorgeMoney/UserScripts/notfound

// //PAGE NOT FOUND

addOnloadHook(function{ if(document.getElementById('noarticletext')) { var pgs = wgPageName.replace(/_/g, " "); document.title = pgs+" - Page Not Found - Wikipedia"; document.getElementById('searchInput').value = pgs; var ul = 'http://en.wikipedia.org/wiki/'; var pg = ul+wgPageName; stuff = 'Page " '+pgs+' " Not Found \n'; stuff += ' Links: \n\n'; //stuff += 'edit\n'; stuff += 'edit\n'; stuff += 'deletion log'; stuff += 'google wikipedia</a></li>'; stuff += '<li><a href="http://www.google.com/search?q='+wgPageName+'">google</a></li>'; stuff += '<li><a href="http://wikipedia.georgemoney.com/search2.php?title='+wgPageName+'">maybe you miss-typed it. try a special search</a></li>'; stuff += '</ul>\n'; stuff += ' Useless Links (from tabs and sidebar) \n<ul>'; stuff += document.getElementById('p-cactions').getElementsByTagName('ul')[0].innerHTML.replace(/<li(.*)id=\"(.*)\"(.*)>\s*<a/g, "<li$1 $3><a").replace(/<\/ul>/g,).replace(/<ul>/g,) +'\n'; stuff+= document.getElementById('p-navigation').getElementsByTagName('div')[0].getElementsByTagName('ul')[0].innerHTML.replace(/<li(.*)id=\"(.*)\"(.*)>\s*<a/g, "<li$1 $3><a").replace(/<\/ul>/g,).replace(/<ul>/g,) +'\n'; stuff+= document.getElementById('p-tb').getElementsByTagName('div')[0].getElementsByTagName('ul')[0].innerHTML.replace(/<li(.*)id=\"(.*)\"(.*)>\s*<a/g, "<li$1 $3><a").replace(/<\/ul>/g,).replace(/<ul>/g,) +'\n'; stuff+= '</ul>\n \n';

document.getElementById('bodyContent').innerHTML = stuff; document.write('<style type="text/css">.firstHeading, .editsection, #p-cactions {display:none;} '); }

if(document.getElementById('newarticletext')) { var pgs = wgPageName.replace(/_/g, " "); document.getElementById('newarticletext').innerHTML = " Editing <font color=\"green\">"+wgPageName.replace(/\_/g, " ")+"   "; }

}); //END NOT FOUND //