User:Salix alba/monobook.js

// experimental citation mangeling style sheeet //importScript('User:Salix alba/mathcite.js');

// User:Lupin/popups.js

importScript('User:Lupin/popups.js'); popupFixRedirs = true; popupRedlinkRemoval = true; popupFixDabs = true; popupOnEditSelection = false;

// This will add an [edit top] link at the top of all pages except preview pages // by User:Pile0nades

// Add an [edit top] link to pages addOnloadHook(function {  // if this is preview page or generated page, stop  if(document.getElementById("wikiPreview") || window.location.href.indexOf("/wiki/Special:") != -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 = ' [edit top] ';

// insert divContainer into the DOM before the h1 if(window.location.href.indexOf("&action=edit") == -1) document.getElementById("content").insertBefore(divContainer, document.getElementsByTagName("h1")[0]);

if(window.location.href.indexOf("&action=edit&section=0") != -1) document.getElementById("wpSummary").value = "/* Intro */ "; });

addOnloadHook(function {    var searchGoButton = document.getElementById('searchGoButton');    if (!searchGoButton) return;

var searchNsHidden = document.createElement('input'); searchNsHidden.id = 'searchNsHidden'; searchNsHidden.type = 'hidden'; searchNsHidden.name = 'ns0'; searchNsHidden.value = '1';

var searchNsMenu = document.createElement('select'); searchNsMenu.id = 'searchNsMenu'; searchNsMenu.name = 'ns'; searchNsMenu.innerHTML = ' (Main) \n' + ' Talk \n' + ' User \n' + ' User talk \n' + ' Wikipedia \n' + ' Wikipedia talk \n' + ' Image \n' + ' Image talk \n' + ' MediaWiki \n' + ' MediaWiki talk \n' + ' Template \n' + ' Template talk \n' + ' Help \n' + ' Help talk \n' + ' Category \n' + ' Category talk \n' + ' Portal \n' + ' Portal talk \n' ; searchNsMenu.onchange = function { searchNsHidden.name = 'ns' + (this.selectedIndex < 0 ? '0' : this.options[this.selectedIndex].value); };

// From /skins-1.5/monobook/main.css?5: searchNsMenu.style.width = '10.9em'; searchNsMenu.style.margin = '0'; searchNsMenu.style.fontSize = '95%';

searchGoButton.parentNode.insertBefore(searchNsHidden, searchGoButton); searchGoButton.parentNode.insertBefore(searchNsMenu, searchGoButton); });

addOnloadHook(function {    var searchform = document.getElementById('searchform');    if (!searchform) return;    searchform.setAttribute('target','_blank'); });

addOnloadHook(function {    addPortletLink ('p-tb', '/wiki/Help:Formula', 'Help:Formula');    addPortletLink ('p-tb', '/wiki/Wikipedia:Template messages','List of available templates');    addPortletLink ('p-tb', '/wiki/Wikipedia talk:WikiProject Mathematics','WT:WPM');    addPortletLink ('p-tb', 'http://zeteo.info/','Zetro');    addPortletLink ('p-tb', '/wiki/Template:Citation','Citation template');    addPortletLink ('p-tb', '/wiki/Category:Mathematics referencing resources','Maths refs'); });

jQuery( document ).ready( function( $ ) {       // Paste jQuery snippet heres

$('li#ca-edit a').html('Edit');       // change label for wikitext edit tab $('li#ca-ve-edit a').html('VE edit'); // change label for visualEditor edit tab

$('.mw-editsection:nth-child(2) a' ).html('Edit'); // change label for wikitext section edits links $('.mw-editsection-visualeditor').html('VE edit'); // change label for visualEditor section edit links $('.mw-editsection-bracket').css('display','none'); // Don't display [ ] square brackets for section edits

// $('.mw-editsection-divider').css('display','none');     // Don't display the | divider for section edits (commented out)

$('h1#firstHeading .mw-editsection-visualeditor').css('display','none'); // Don't display the section 0 VE edit link which is broken $('h1#firstHeading .mw-editsection-divider').css('display','none');     // Don't display the divider for section zero

} );