User:Wolfhunter987/monobook.js

importScript('Wikipedia:WikiProject User scripts/Scripts/Time'); importScript('User:Alex Smotrov/histcomb.js') importScript('Wikipedia:WikiProject User scripts/Scripts/Changes since I last edited'); if (wgPageName == "Main_Page") { addOnloadHook(function {       document.getElementById("searchInput").focus;    }); }
 * 1) // User:Lupin/popups.js
 * 2) importScript('User:Lupin/popups.js');
 * 1) importScript('User:Lupin/popups.js');

// ================================================== // Image Redlink Toolkit // ================================================== addOnloadHook(redImageTools); function redImageTools { var img = getElementsByClassName(document.getElementById('bodyContent'),'a','new'); for(var i=0;i<img.length;i++) { var iu = img[i].href; if(iu.search(/Special\:Upload/i)!=-1) { var it = 'Image:' + iu.substring(iu.indexOf('wpDestFile=')+11,iu.length); insertWrappedLinkAfter(img[i], wgScriptPath + '/index.php?title=Special:Log&page=' + it,'logs'); insertWrappedLinkAfter(img[i], wgScriptPath + '/index.php?title=' + it + '&action=edit','edit'); insertWrappedLinkAfter(img[i], wgScriptPath + '/index.php?title=' + it,'view'); img[i].className = 'new newimage'; } else if(iu.search(/title\=Image\:/i)!=-1) { var it = iu.substring(iu.indexOf('title=')+6,iu.indexOf('&action=edit')); insertWrappedLinkAfter(img[i], wgScriptPath + '/index.php?title=Special:Upload&wpDestFile=' + it,'upload'); insertWrappedLinkAfter(img[i], wgScriptPath + '/index.php?title=Special:Log&page=' + it,'logs'); insertWrappedLinkAfter(img[i], wgScriptPath + '/index.php?title=' + it,'view'); img[i].className = 'new newimage'; } } } function insertWrappedLinkAfter(object,link,text) { var sm = document.createElement('small'); var li = document.createElement('a'); li.href = link; var tx = document.createTextNode(text); var po = document.createTextNode(' ('); var pc = document.createTextNode(')'); li.appendChild(tx); sm.appendChild(po); sm.appendChild(li); sm.appendChild(pc); object.nextSibling && object.parentNode.insertBefore(sm,object.nextSibling) || object.parentNode.appendChild(sm) } // ================================================== // End Image Redlink Toolkit // ==================================================