User:Matthew Desjardins/monobook.js

importScript('User:Lupin/recent2.js'); importScript('User:Ais523/watchlistnotifier.js'); importScript('User:Mr.Z-man/gsearch.js'); // User:Dschwen/highlightredirects.js - please include this line

mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Dschwen/highlightredirects.js' + '&action=raw&ctype=text/javascript');

importScript('User:Blue-Haired Lawyer/footnote popups.js'); importScript('MediaWiki:Gadget-markblocked.js', 'ru');

$(function { 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; }

content = document.getElementById("content");   // Find the content div content.parentNode.insertBefore(tabs, content.nextSibling);   // Place tab list right after content div });

importScript('user:js/watchlist.js'); importScript('User:Alex Smotrov/histcomb.js'); importScript('User:Ais523/topcontrib.js'); importScript('Wikipedia:WikiProject User scripts/Scripts/Changes since I last edited');

// Please leave the following line // user:Where/usertabs

$(function { if (wgTitle.indexOf("/") != -1 || document.title.indexOf("- History -") != -1) //no subpages or history return; if (wgCanonicalNamespace == "User" || wgCanonicalNamespace == "User_talk") { var username = encodeURIComponent( wgTitle ); mw.util.addPortletLink("p-cactions", wgServer + "/wiki/Special:Contributions/" + username, "Contribs", "ca-contrib", "User contributions"); mw.util.addPortletLink("p-cactions","http://toolserver.org/~soxred93/count/index.php?name="+ username +"&lang=en&wiki=wikipedia", "Edit count", "ca-editcount", "Edit count from X!'s Tool"); mw.util.addPortletLink("p-cactions", wgServer + "/w/index.php?title=Special:Log&type=block&page=User:" + username, "Blocks received", "ca-blog", "Blocks received by this user"); mw.util.addPortletLink("p-cactions", wgServer + "/w/index.php?title=Special:Prefixindex&from=" + username + "&namespace=2", "Userspace", "", "List of pages in this user's userspace"); } });

function menu_move_to_top(menu_name) { menu = document.getElementById(menu_name); if (menu) { p = menu.parentNode; p.removeChild(menu); p.insertBefore( menu, p.firstChild ); } } $(function { /* menu_names = [      "p-tb", // toolbox       "p-matthew_desjardins", // matthew_desjardins       "p-search", // search box       "p-navigation", // navigation       "p-interaction", // interaction ]; while ( menu_name = menu_names.pop ) { menu_move_to_top(menu_name); } });
 * Edit the order of this menu_names array to change the order of the toolbox.
 * The names are the ids of the boxes.

importScript('User:Ais523/stubtagtab.js'); importScript('User:TachyonJack/gTranslate.js'); importScript("User:GregU/hotkeys.js"); hotkeys = { 't' : '{| class="wikitable"\n! header\n! header\n|-\n| data\n| data\n|}\n' }

$(function { if (wgCanonicalNamespace == "Special") return;  // no links for special pages

var title = wgTitle; if (wgCanonicalNamespace != "") title = title.replace(/^.*\//, ""); // subpage name only

var query = encodeURIComponent('"'+title+'" -Wikipedia' ); mw.util.addPortletLink('p-tb', 'http://www.google.com/search?ie=utf-8&oe=utf-8&q='+query, 'Google search', 't-googlesearch', 'Search Google for "'+title+'"', 'G'); });

importScript('User:Odie5533/SnipManager.user.js'); importScript('User:Bradv/splitpreview.js');

// User:Jsimlo/shortcuts.js importScript('User:Jsimlo/shortcuts.js'); function shortcutsInit { shortcutsAddLink ( 'Monobook.js', 'User:Matthew_Desjardins/monobook.js' );

}

function addLastDiff { mw.util.addPortletLink('p-cactions', 'http://en.wikipedia.org/w/index.php?title=' + wgPageName + "&diff=cur&oldid=prev", 'last', 'ca-last', 'Show most recent diff'); } $(addLastDiff);

if (wgNamespaceNumber >= 0) $(function{ var pCactions = document.getElementById('p-cactions'); if (!pCactions) return; var caMain = pCactions.getElementsByTagName('li')[0]; var caTalk = document.getElementById('ca-talk'); var caEdit = document.getElementById('ca-edit'); if (!caEdit) caEdit = document.getElementById('ca-viewsource'); var caHistory = document.getElementById('ca-history'); if (!caMain || !caTalk || !caEdit || !caHistory) return; var el_move, el_create, id2; if (wgNamespaceNumber % 2) { //talk space el_move = caTalk; el_create = caMain; id2 = ''; } else { el_move = caMain; el_create = caTalk; id2 = 'discussion'; } caEdit.firstChild.innerHTML = 'edit'; caHistory.firstChild.innerHTML = 'hist'; el_move.parentNode.insertBefore(caHistory, el_move.nextSibling); el_move.parentNode.insertBefore(caEdit, el_move.nextSibling); var href = el_create.firstChild.getAttribute('href', 2); if (el_create.className.indexOf('new') < 0){ mw.util.addPortletLink('p-cactions', href + '?action=history', 'hist', 'ca-history-'+id2, id2+' history', '', el_create.nextSibling); mw.util.addPortletLink('p-cactions', href + '?action=edit', 'edit', 'ca-edit-'+id2, 'Edit '+id2, '', el_create.nextSibling); } caMain.style.marginRight = '0.3em'; caTalk.style.marginRight = '0.3em'; caTalk.style.marginLeft = '1.6em'; }) //