User:Ric36/monobook.js

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

// Add an [edit] link to pages $(function {  // if this is preview page or generated page, stop  if( document.getElementById("wikiPreview") || document.getElementById("histlegend‎") || document.getElementById("difference‎") || document.getElementById("watchdetails") || document.getElementById("ca-viewsource") || window.location.href.indexOf("/wiki/Special:") != -1 ) {   if(window.location.href.indexOf("&action=edit&section=0") != -1) {      document.getElementById("wpSummary").value = "/* Intro */ ";    }    return;  };

// get the page title var pageTitle = mw.config.get('wgPageName');

// create div and set innerHTML to link var divContainer = document.createElement("div"); divContainer.innerHTML = ' [edit intro] ';

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

});

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

//Please leave the following line //user:Where/usertabs 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/wiki/Special:Contributions/" + username, "contrib", "ca-contrib", "contribs", "");      addTab("http://en.wikipedia.org/w/index.php?title=Special%3ALog&type=move&user=" + username, "page moves", "ca-pagemoves", "page moves", "");      addTab("http://en.wikipedia.org/w/index.php?title=Special%3ALog&type=block&user=" + username, "block log", "ca-blog", "blog", "");      addTab("http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?dbname=enwiki_p&user=" + username, "edit count", "ca-kate", "kate", "");   } });

//

function shortcutsInit {  shortcutsAddLink ( 'Navigation shortcuts', 'Wikipedia:Tools/Navigation shortcuts' );

shortcutsStartSection ('wikify');

shortcutsAddLink ( 'Wikify',         'Wikipedia:Wikify' ); shortcutsAddLink ( 'Guide to layout', 'Wikipedia:Guide to layout' ); shortcutsAddLink ( 'Manual of Style', 'Wikipedia:Manual of Style' ); shortcutsAddLink ( 'Village pump', 'Wikipedia:Village pump' );

}

var mpTitle = "Main Page"; var isMainPage = (document.title.substr(0, document.title.lastIndexOf(" - ")) == mpTitle) if (isMainPage) {window.location="http://en.wikipedia.org/wiki/User:Ric36/Main_Page_Alternate";}

$(function { document.getElementById('searchform').action = 'http://www.google.com/search';   document.getElementById('searchInput').name = 'q';   document.getElementById('searchGoButton').name = 'btnG';   document.getElementById('mw-searchButton').name = 'btnI';   document.getElementById('searchGoButton').value = 'G';   document.getElementById('mw-searchButton').value = 'Lucky!';   var enwp = document.createElement('input');  enwp.id = 'as_sitesearch';  enwp.name = 'as_sitesearch';  enwp.value = 'en.wikipedia.org';  enwp.type = 'hidden';  document.getElementById('searchform').appendChild(enwp);  return false;

if (mw.config.get('wgPageName') == "Main_Page") { window.location = "http://en.wikipedia.org/wiki/Wikipedia:Main_Page_alternative_%28Classic_2006%29"; } });