User:Charitwo-fduser/global.js

//

if (mwCustomEditButtons) {

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images1.wikia.nocookie.net/central/images/b/b7/Button_sig3.png", "speedTip": "Universal Sig", "tagOpen": "--", "tagClose": " ", "sampleText": "User:Charitwo (talk)"};

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://images3.wikia.nocookie.net/central/images/2/29/Button_user.png", "speedTip": "User Template", "tagOpen": "", "sampleText": "Wikia:User:Charitwo"};

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images3.wikia.nocookie.net/central/images/8/8c/Button_RedX.png", "speedTip": "Delete", "tagOpen": "", "sampleText": "reason"}; }

// 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);

// addOnloadHook(function {       var ds = document.getElementsByTagName('td');        for(var i=0; i<ds.length; i++) {                var a = ds[i];                if(a.className == 'diff-ntitle') {                        var fs = a.getElementsByTagName('a');                        for(var j=0; j<fs.length; j++) {                                var b = fs[j];                                if(b.firstChild.data == 'rollback') {                                        var oldhref = ''+b.href;                                        var usr = b.href.split('from=')[1].split('&')[0];                                        var cont = wgServer + wgScript + '?title=Special:Contributions/' + usr;                                        b.href = 'javascript:void(0)';                                        b.onclick = function {                                                var http = sajax_init_object; http.open('GET', oldhref, true); http.setRequestHeader("Connection", "close"); http.send(null); http.onreadystatechange= function { window.location.href = (cont); }                                       }                                }                        }                }        } }); //

//