User:Skittleys/monobook.js

importScript('User:Zro/stubtagtab3.js'); // Tab to mark as stub. Gets options from Wikipedia:WikiProject Stub sorting dump importScript('User:AndyZ/peerreviewer.js'); //User:AndyZ/peerreviewer.js importScript('User:Drilnoth/assessortags.js'); //easily adds project banners. See User:Drilnoth/assessortags.js/doc for details

importScript('User:Skittleys/cactions.js'); //Original source: User:Haza-w/cactions.js importScript('User:Alex Smotrov/histcomb.js'); //When a user has edited a page multiple times in a row, this bundles them up into one importScript('User:Ais523/watchlistnotifier.js'); //Notifies of a change in the watchlist importScript('Wikipedia:WikiProject User scripts/Scripts/Changes since I last edited'); //All changes since your last edit in a diff in "Since" tab importScript('User:Magnus_animum/count.js'); //Adds an edit count tab to each page importScript('User:Cacycle/watchlistSorter.js'); // "Sorts, color-codes by namespace, Keeps a Most recent section on top. importScript('User:Omegatron/monobook.js/dashfixer.js'); // em-dash fixer importScript('User:Barticus88/WhatLinksHere.js'); //Choose namespace for "What links here" pages importScript('MediaWiki:Gadget-markblocked.js', 'ru'); //Strikes out all blocked users importScript('User:Sander Säde/quickpreview.js'); importScript('User:Jnothman/automod.js'); //lets you update a page by passing values through the url importScript('User:Cameltrader/Advisor.js'); //points out stylistic issues

importScript('User:Pyrospirit/metadata/projectbanners.js'); //User:Pyrospirit/metadata/projectbanners.js importScript('User:Pyrospirit/metadata/assesslinks.js'); //User:Pyrospirit/metadata/assesslinks.js

importScript('user:js/watchlist.js'); //AJAX unwatch, sort, new changes

// related to User:Lupin/popups.js popupStructure = 'Original'; popupFixRedirs = true; popupFixDabs = true; popupLastEditLink = false; popupRedirAutoClick = 'wpDiff';

//Give the labels on the personal toolbar shorter names addOnloadHook(function {   var tab = document.getElementById('pt-preferences');    if(!tab) return;    var tablink = tab.getElementsByTagName('a')[0];    if(!tablink) return;    tablink.firstChild.nodeValue = 'prefs'; }); addOnloadHook(function {   var tab = document.getElementById('pt-mytalk');    if(!tab) return;    var tablink = tab.getElementsByTagName('a')[0];    if(!tablink) return;    tablink.firstChild.nodeValue = 'talk'; }); addOnloadHook(function {   var tab = document.getElementById('pt-watchlist');    if(!tab) return;    var tablink = tab.getElementsByTagName('a')[0];    if(!tablink) return;    tablink.firstChild.nodeValue = 'watches'; }); addOnloadHook(function {   var tab = document.getElementById('pt-mycontris');    if(!tab) return;    var tablink = tab.getElementsByTagName('a')[0];    if(!tablink) return;    tablink.firstChild.nodeValue = 'edits'; }); addOnloadHook(function {   var tab = document.getElementById('pt-logout');    if(!tab) return;    var tablink = tab.getElementsByTagName('a')[0];    if(!tablink) return;    tablink.firstChild.nodeValue = 'logout'; }); addOnloadHook(function {   var tab = document.getElementById('ca-talk');    if(!tab) return;    var tablink = tab.getElementsByTagName('a')[0];    if(!tablink) return;    tablink.firstChild.nodeValue = 'talk'; });

/************************************************************************/ //My variation of the WP:WikiProject User Scripts/Scripts/Six tabs script. if (wgNamespaceNumber >= 0) addOnloadHook(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 = ; id2dash = ; id2cap = ''; } else {   el_move = caMain; el_create = caTalk; id2 = 'dicussion'; id2dash = '-discussion'; id2cap = 'Discussion '; } caEdit.firstChild.innerHTML = 'edit'; caHistory.firstChild.innerHTML = 'history'; 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', 'history',    'ca-history'+id2dash, id2cap+'history', '', el_create.nextSibling); mw.util.addPortletLink('p-cactions', href + '?action=edit', 'edit',    'ca-edit'+id2dash, 'Edit '+id2, '', el_create.nextSibling); }  caMain.style.marginRight = '0.25em'; caTalk.style.marginRight = '0.2em'; caTalk.style.marginLeft = '1.1em'; })

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

addOnloadHook(function{ var nodeBefore = document.getElementById('pt-logout'); mw.util.addPortletLink('p-personal', '/wiki/Special:MyPage/monobook.js', 'js', 'pt-js', 'monobook.js is used for storing user javascripts', , nodeBefore); mw.util.addPortletLink('p-personal', '/wiki/Special:MyPage/monobook.css', 'css', 'pt-css', 'monobook.css is used for storing user CSS styles', , nodeBefore);

mw.util.addPortletLink('p-personal', '/wiki/Wikipedia:WikiProject Pharmacology', 'phm', 'pt-phm', 'Link to WikiProject Pharmacology', '', nodeBefore);

mw.util.addPortletLink('p-personal', '/wiki/Special:MyPage/todo', 'todo', 'pt-todo', 'my to-do list', '', nodeBefore); // also make one for "goals"?

mw.util.addPortletLink('p-personal', '/w/index.php?title=User:Skittleys/userboxes&action=edit', 'ubx', 'pt-ubx', 'My userboxes page (in edit mode)', '', document.getElementById('pt-preferences'));

mw.util.addPortletLink('p-personal', '/w/index.php?title=Special:PrefixIndex&prefix=Skittleys&namespace=2', 'subs', 'pt-subs', 'Subpages of my userspace', '', document.getElementById('pt-preferences'));

mw.util.addPortletLink('p-personal', '/wiki/Special:MyPage/sandbox', 'sand', 'pt-sand', 'my sandbox', '', document.getElementById('pt-js')); });

// User:GeorgeMoney // BEGIN STUBFIX CODE //check if we are editing and we want to stubfix if (window.location.href.indexOf('action=edit') != -1 && window.location.href.indexOf('destub=1') != -1) { function destub { document.getElementById('wpSummary').value = "not a stub"; var contents = document.getElementById('wpTextbox1').value; var newcontents = contents.replace(/\{\{.*?stubs?(\|?.*)\}\}/g, ""); document.getElementById('wpTextbox1').value = newcontents; document.getElementById('wpWatchthis').checked = ""; document.getElementById('wpSave').click; } addOnloadHook(function{ destub; }); } //Check if it's article to add the tab if(wgCanonicalNamespace == "") { addOnloadHook(function{ mw.util.addPortletLink('p-cactions', 'http://en.wikipedia.org/w/index.php?title='+wgPageName+'&action=edit&destub=1' , 'destub', 'ca-destub', 'This permanently removes the stub tag'); }); } //END STUBFIX CODE //

// Code to remove stub temporarily (to then use stubtagtab) // User:GeorgeMoney // BEGIN STUBFIX CODE //check if we are editing and we want to stubfix if (window.location.href.indexOf('action=edit') != -1 && window.location.href.indexOf('remstub=1') != -1) { function remstub { document.getElementById('wpSummary').value = "Removing current stub tag; better one available."; var contents = document.getElementById('wpTextbox1').value; var newcontents = contents.replace(/\{\{.*?stubs?(\|?.*)\}\}/g, ""); document.getElementById('wpTextbox1').value = newcontents; document.getElementById('wpWatchthis').checked = ""; document.getElementById('wpSave').click; } addOnloadHook(function{ remstub; }); } //Check if it's article to add the tab if(wgCanonicalNamespace == "") { addOnloadHook(function{ mw.util.addPortletLink('p-cactions', 'http://en.wikipedia.org/w/index.php?title='+wgPageName+'&action=edit&remstub=1' , 'remstub', 'ca-remstub', 'This removes a stub tag temporarily, and is meant to be used in conjunction with stubtagtab'); }); } //END STUBFIX CODE //

importScript('User:Skittleys/not-underpopulated.js');