User:SoLando/monobook.js

// //-- //First loads //Helper tools mw.loader.load(            'https://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Addtabs/monobook.js'             + '&action=raw&ctype=text/javascript&dontcountme=s'); //END //BCrat tools document.write(' '); RfAshowlinks = 'true'; //END //Google tools document.write(' '); //END //UTC clock document.write(' '); //END //Replace txt document.write(' '); //END //Admin protection tools document.write(' '); //END

//live-preview stuff wpUserName = 'Voice of All'; wpShowImages = true; mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Pilaf/livepreview.js&action=raw&ctype=text/javascript'); //END //--- function URLEncoding(input) {       var encodedInputString=escape(input); encodedInputString=encodedInputString.replace("+", "%2B").replace("+", "%2B").replace("+", "%2B"); encodedInputString=encodedInputString.replace("/", "%2F").replace("/", "%2F").replace("/", "%2F"); encodedInputString=encodedInputString.replace("&","%26").replace("&","%26").replace("&","%26"); var outputurl=encodedInputString; return outputurl; } //END

//--- //Toolbox links function changelinks { if(!document.getElementById) return; document.getElementById('pt-mytalk').firstChild.innerHTML = 'my Talk page'; document.getElementById('pt-preferences').firstChild.innerHTML = 'Change Preferences'; document.getElementById('pt-watchlist').firstChild.innerHTML = 'Check my Watchlist'; document.getElementById('pt-mycontris').firstChild.innerHTML = 'My Contributions'; document.getElementById('pt-logout').firstChild.innerHTML = 'Log out'; } function addtoolboxlinks { var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0]; addlilink(tb, '/wiki/Special:Newpages', 'New pages', ''); addlilink(tb, '/wiki/Special:Log/newusers', 'New users', ''); addlilink(tb, '/wiki/Category:Candidates_for_speedy_deletion', 'Speedy deletions', ''); addlilink(tb, '/wiki/Wikipedia:Administrator_intervention_against_vandalism', 'Vandalism', ''); addlilink(tb, '/wiki/WP:RfPP', 'Protection requests', ''); addlilink(tb, '/wiki/WP:PP', 'Protected pages', ''); addlilink(tb, '/wiki/Wikipedia:Administrators%27_noticeboard', 'Noticeboard', ''); addlilink(tb, '/wiki/Wikipedia:Administrators%27_noticeboard/3RR', '3RR violations', ''); } //END

// ======== USER TABS ======= addOnloadHook(function {  if (document.title.search("/") != -1 || document.title.search("- History -") != -1) { //no subpages or history      return;   }   if (document.title.indexOf("User:") == 0 || document.title.indexOf("User talk:") == 0) {      username_a = document.URL.match(/:.*:(.*)/);      username=username_a[1];      addTab("http://en.wikipedia.org/w/index.php?title=Special%3ALog&type=block&user=&page=User:" + username, "log", "ca-blog", "block log", "");      addTab("http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?dbname=enwiki_p&user=" + username, "info", "ca-kate", "user info", "");   } });

//************

//************ //LAST DIFF TAB function lastdiff {   if (document.title.indexOf("Editing ") != -1 || document.getElementById('ca-history') == undefined) {return;} z=document.getElementById("content").childNodes; for (var n=0;n<z.length;n++) { if (z[n].className=="firstHeading") { var pname=document.title.split(' - ')[0].replace(/&/g,'%26').replace(/\\+/g, '%2B'); }   } addTab("http://en.wikipedia.org/w/index.php?title=" + pname + "&diff=cur&oldid=prev", "Last", "ca-diff", "Show most recent diff", ""); }

// This will add an [edit top] link at the top of all pages except preview pages function addtoplink { var edittop = ' [ edit top ] '; // if this is preview page or generated page, stop if(document.getElementById("wikiPreview") || window.location.href.indexOf("w/index.php?title=Special:") != -1) return; if(document.title.indexOf("Main Page") != -1) return;

// get the page title var pageTitle = document.title.split(" - ")[0].replace(" ", "_");

// create div and set innerHTML to link var divContainer = document.createElement("div"); divContainer.innerHTML = ' ' + edittop + ' ';

// insert divContainer into the DOM before the h1 if (document.getElementById("content") !=undefined) { document.getElementById("content").insertBefore(divContainer, document.getElementsByTagName("h1")[0]);} } //END

//************ //MAIN //************

addOnloadHook(Mainfast) function Mainfast {   lastdiff; changemovetab; changelinks; addtoolboxlinks; }

window.onload = Main; function Main {   addtoplink; LivePreviewInstall; if(addSinceTab) {addSinceTab;} } //END //************

// Mvaluejsadmin = 'DMalak1'; Rvaluejsadmin = 'ERollenH1'; // //************ //Slow load tools //Admin rollback tools document.write(' '); //END // Script from User:MarkS/extraeditbuttons.js document.write(' '); //END //New user log tools document.write(' '); //END //Admin warning tools document.write(' '); //END //Delete tabs document.write(' '); //END //************ //Google tools document.write(' '); //END

//Interiot's javascript edit counter if (document.title.indexOf('User:Interiot/Tool2/code.js') != -1) { mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Interiot/Tool2/code.js&action=raw&ctype=text/javascript'); } //

//Change move tab name function changemovetab { if (document.title.indexOf("Talk:") == -1 && document.title.indexOf("talk:") == -1 && document.title.indexOf("User:") == -1 && document.title.indexOf("MediaWiki:") == -1 && document.title.indexOf("Image:") == -1 && document.title.indexOf("Wikipedia:") == -1 && document.title.indexOf("Template:") == -1 && document.title.indexOf("Portal:") == -1 && document.title.indexOf("Help:") == -1 && document.title.indexOf("Main Page") == -1 && document.title.indexOf("Category:") == -1) { if(document.getElementById('ca-edit')) {document.getElementById('ca-edit').firstChild.innerHTML = 'Modify';} if(document.getElementById('ca-move')) {document.getElementById('ca-move').firstChild.innerHTML = 'Rename';} if(document.getElementById('ca-history')) {document.getElementById('ca-history').firstChild.innerHTML = 'Revisions';} } if (document.title.split(' - ')[0].split(".js")[1] != undefined) { if (document.title.split(' - ')[0].split(".js")[1] != undefined) {     if(document.getElementById('ca-nstab-main')) {     document.getElementById('ca-nstab-main').firstChild.innerHTML = 'Javascript'; }       else if(document.getElementById('ca-nstab-user')) {     document.getElementById('ca-nstab-user').firstChild.innerHTML = 'User JS'; }      else if(document.getElementById('ca-nstab-mediawiki')) {     document.getElementById('ca-nstab-mediawiki').firstChild.innerHTML = 'MediaWiki JS'; }     }  } } //END

//************ //Lupin's tools //************ //Filter changes live //User:Lupin/recent2.js - please include this line mw.loader.load(            'https://en.wikipedia.org/w/index.php?title=User:Lupin/recent2.js'             + '&action=raw&ctype=text/javascript&dontcountme=s');

//User:Lupin/popupsdev.js - please include this line document.write(' ');

popupShortcutKeys=true; // optional: enable keyboard shortcuts popupAdminLinks=true;  // optional: enable admin links popupSubpopups=false; popupOnEditSelection=false; popupStructure='shortmenus'; //END //************ //