User:Gahoo/monaco.js

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

if(wgNamespaceNumber != -1) addOnloadHook(addDeleteButtons) function addDeleteButtons { if(!document.getElementById('ca-delete')) return var url=document.getElementById('ca-delete').firstChild.href //examples: addPortletLink('p-cactions', url + '&submitdelete=true&wpReason=' + encodeURIComponent('') ,'sdelete','ca-delete1'); }

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

if (mwCustomEditButtons) {

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/2/2d/Button_removed.png", "speedTip": "Picture Replace", "tagOpen": "", "sampleText": "Low quality"};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/c/c8/Button_redirect.png", "speedTip": "Redirect", "tagOpen": "#REDIRECT ",    "tagClose": "", "sampleText": "Insert text"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/c/c9/Button_strike.png", "speedTip": "Strike", "tagOpen": " ", "tagClose": " ", "sampleText": "Strike-through text"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/7/74/Button_comment.png", "speedTip": "HTML comment", "tagOpen": "", "sampleText": "Insert comment here"}

}

// Bot Revert Tab function addbotcontrib { if(!document.getElementById) return; if(document.title.indexOf("User contributions - ") != 0) return; var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; if(document.location.href.indexOf('?') == -1) { var linky = document.location.href + '?bot=1'; } else { var linky = document.location.href + '&bot=1'; }   addlilink(tabs, linky, 'Botify', 'ca-botcontribs'); } // function to add buttons/tabs/links

function addlilink(tabs, url, name, id) { var na = document.createElement('a'); na.href = url; na.id = id; na.appendChild(document.createTextNode(name)); var li = document.createElement('li'); li.appendChild(na); tabs.appendChild(li); return li; } addOnloadHook(addbotcontrib);

//