User:Jd/monobook.js

document.write(' ');

document.write(' ');

document.write(' ');

//

function addLoadEvent(func) { if (window.addEventListener) { window.addEventListener("load", func, false); } else if (window.attachEvent) { window.attachEvent("onload", func); } }

//

function perso { var l = document.getElementById("column-one"); if (l) { l.innerHTML = l.innerHTML + ' '   + ' Boîte perso ' + ' '   + '   ' + '    Babel' + '    Site map ~ Plan' + '    Inventory</a> ~ To do</a></li>' + '    WP Editors</a></li>' + '  </ul>' + ' '   + ' ';  } }

addLoadEvent(perso);

//

function DeluxeBar { if (document.createTextNode) { var toolbar = document.getElementById("toolbar"); if (!toolbar) return; var messages = new Array messages[0] = "Category:Français"; messages[1] = "Category:English";

messages[2] = ""; messages[3] = "";

var images = new Array images[0] = "http://upload.wikimedia.org/wikipedia/fr/1/12/Button_accueilA.png"; images[1] = "http://upload.wikimedia.org/wikipedia/fr/1/12/Button_accueilA.png"; images[2] = "http://upload.wikimedia.org/wikipedia/fr/1/12/Button_accueilA.png"; images[3] = "http://upload.wikimedia.org/wikipedia/fr/1/12/Button_accueilA.png";

var commentaires = new Array commentaires[0] = "cat: Français"; commentaires[1] = "cat: English"; commentaires[2] = ""; commentaires[3] = "";

for (var i=0;i<messages.length;i++) { var img = document.createElement("img"); img.setAttribute("src", images[i]); var ref = document.createElement("a"); ref.setAttribute("href", "javascript:insertTags(, \"" + messages[i] + "\", );" + 		                "javascript:changeSummary(\"" + commentaires[i] + "\");" ); ref.appendChild(img); toolbar.appendChild(ref); } } }

function changeSummary(sampleText) { document.editform.wpSummary.value = document.editform.wpSummary.value + ' ' + sampleText }

addLoadEvent(DeluxeBar);

//

function CategoriesAGauche {

var catlinks = document.getElementById("catlinks"); if (!catlinks) { return; } var categories = catlinks.getElementsByTagName("a") ; var h5_cats = document.createElement( "h5" ); var text = document.createTextNode( "Catégories" ) ; h5_cats.appendChild( text ) ; var div_cats = document.createElement( "div" ); div_cats.setAttribute( "class", "pBody" ); var ul = document.createElement( "ul" ); var a_debut = 1 ; for (var i = a_debut ; i < categories.length ; i++ ) { var a = categories[i] ; var li = document.createElement( "li" ) ; li.appendChild( a.cloneNode(1) ) ; ul.appendChild( li ); }

div_cats.appendChild( ul ) ;

var portlet = document.createElement( "div" ) ; portlet.setAttribute( "class", "portlet" ); portlet.setAttribute( "id", "p-cat" ) ; portlet.appendChild( h5_cats ) ; portlet.appendChild( div_cats ) ; //document.getElementById("column-one").insertBefore( document.getElementById("p-search"), portlet ) ; //document.getElementById("column-one").appendChild( portlet ) ; div_ptb = document.getElementById( "p-tb" ); document.getElementById("column-one").insertBefore( portlet, div_ptb) }

addLoadEvent(CategoriesAGauche);

//

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</a>] ';

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