User:Charibot/monaco.js

function addDelLink { if(queryString('doclose') != null && document.title.indexOf('Action complete') != -1) { window.open(, '_self', ); window.close; }

if(wgPageName != 'Special:UnusedFiles') return; rows = document.getElementsByTagName('tr'); for(i = 0; i < rows.length; i++) { images = rows[i].getElementsByTagName('td'); for(j = 0; j < images.length; j++) { name = images[j].getElementsByTagName('a')[1].getAttribute('title'); images[j].innerHTML = '(del) ' + images[j].innerHTML; }   } } function unusedDelLoader { addDelLink; } addOnloadHook(unusedDelLoader); function goDoDelete(name) { location.href = '/index.php?title=' + name + '&action=delete&submitdelete=true'; }