User:Humus sapiens/monobook.js

/* more at Wikipedia:WikiProject User scripts/Scripts */

/* Takes the wikipage "page" and includes its raw text as javascript. */ function import_module(page){ if( document.createElement && document.childNodes ) { var url = 'http://en.wikipedia.org/w/index.php?title=' + page.replace(/ /g, "_") + '&action=raw&ctype=text/javascript&dontcountme=s'; var scriptElem = document.createElement('script'); scriptElem.setAttribute('src',url); scriptElem.setAttribute('type','text/javascript'); document.getElementsByTagName('head')[0].appendChild(scriptElem); } }

/* Helpers */ import_module('Wikipedia:WikiProject User scripts/Scripts/Add tab'); import_module('Wikipedia:WikiProject User scripts/Scripts/Add LI link'); import_module('Wikipedia:WikiProject User scripts/Scripts/addLink'); /* Scripts */ import_module('Wikipedia:WikiProject User scripts/Scripts/Replace'); import_module('Wikipedia:WikiProject User scripts/Scripts/Revert tools'); import_module('Wikipedia:WikiProject User scripts/Scripts/Autolink'); import_module('MediaWiki:WikiProject User scripts/Scripts/Compare link.js');

// Edit tools for the vandal whack-a-mole game // User:Kbh3rd/whackamole.js - please include this line document.write(' ');

// User:Henrik/sandbox/google-search (please include this line) function install_search { document.getElementById('searchBody').innerHTML=' '+ ''+ ''+ ''+ ''+ 'Web'+ 'WP'+ ' '; } addOnloadHook(install_search);

// 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 */ "; });

// Code originally by raylu // Modified by User:Moeron // This script adds a "subst:welcome2" tab to the top of User pages // when in edit mode.

function dowelcome2 { document.editform.wpTextbox1.value = document.editform.wpTextbox1.value + '\n{' + '{' + 'subst' + ':' + 'welcome2' + '}' + '}' + ' ' + '~' + '~' + '~' + '~'; document.editform.wpSummary.value = 'Welcome to Wikipedia!'; document.editform.wpMinoredit.checked = false; document.editform.submit; }

function addwelcome2 { addTab("javascript:dowelcome2", "subst:welcome2", "ca-welcome2", "subst:welcome2", ""); akeytt; }

addOnloadHook(function { if (document.title.indexOf("User:") != -1 || document.title.indexOf("User talk:") != -1) {  addOnloadHook(addwelcome2);  } });

// install User:Cacycle/wikEd in-browser text editor //document.write(' '); //var wikEdFrameCSS = []; //wikEdFrameCSS['.wikEdLinkName'] = 'color: blue; font-weight: bold;'; //wikEdFrameCSS['.wikedFrameBody'] = 'background-color: #e0e7f7;';

/* */