User:AzBot/HideBotUploads.js

// ============================================================ // Hide AzBot Uploads // // Function: Hides new version uploads by AzBot in Special:Log // ============================================================

function hideBotUploads { if (wgCanonicalSpecialPageName && wgCanonicalSpecialPageName == 'Log') { var Lists = document.getElementsByTagName('li'); for (var i=0; i < Lists.length; i++) { if (hasClass(Lists[i], 'mw-logline-upload')) { var listLink = Lists[i].childNodes[1].href; if(listLink == null || listLink == undefined) return;

/* Only hide if it is an upload by AzBot */ if (listLink.indexOf('User:AzBot') != -1) { /* And only if the upload is a newer version */ if (Lists[i].childNodes[4].nodeValue.indexOf('uploaded a new version') != -1) { Lists[i].style.display = "none"; }              }            }        }    } } addOnloadHook(hideBotUploads);