User:CatherineMunro/global.js

// User:Lupin/popups.js

document.write(' ');

// ***************************************************************** // Duplicate #p-cactions at bottom // *****************************************************************

function morelinks { var tabs = document.getElementById('p-cactions').cloneNode(true); tabs.id = 'mytabs'; var listitems = tabs.getElementsByTagName('LI'); for (i=0;i<listitems.length;i++) { if(listitems[i].id) listitems[i].id = 'mytabs-' + listitems[i].id; } document.getElementById('column-content').appendChild(tabs); } if(skin == "monobook") addOnloadHook(morelinks)

// ================================================================================ // START Automated deletion button script system // ================================================================================ // Adds customizable one-click deletion buttons to any deletable page. if(wgNamespaceNumber != -1) addOnloadHook(addDeleteButtons) function addDeleteButtons { if(!document.getElementById('ca-delete')) return var url=document.getElementById('ca-delete').firstChild.href if(document.getElementById('content').innerHTML.indexOf('submitdelete')!=-1) { alert('Warning: &submitdelete link detected. Be careful clicking anything'); } addPortletLink('p-cactions', url + '&submitdelete=true&wpReason=' + encodeURIComponent('spam') ,'fastdelete spam','ca-delete1'); }

addOnloadHook(checkdelete); function checkdelete { if(queryString("submitdelete")=="true") document.getElementById('deleteconfirm').wpConfirmB.click }

function queryString(p) { var re = RegExp('[&?]' + p + '=([^&]*)'); var matches; if (matches = re.exec(document.location)) { try { return decodeURI(matches[1]); } catch (e) { } }  return null; } // ================================================================================ // END Automated deletion button script system // ================================================================================ //