Utilisateur:Et caetera/monobook.js
Apparence
Note : après avoir enregistré la page, vous devrez forcer le rechargement complet du cache de votre navigateur pour voir les changements.
Mozilla / Firefox / Konqueror / Safari : maintenez la touche Majuscule (Shift) en cliquant sur le bouton Actualiser (Reload) ou pressez Maj-Ctrl-R (Cmd-R sur Apple Mac) ;
Firefox (sur GNU/Linux) / Chrome / Internet Explorer / Opera : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl-F5.// importScript('User:EDUCA33E/LiveRC.js'); //
// [[:en:User:Lupin/popups.js]]
// Traduction de [[Utilisateur:Leag|Leag]] : [[Utilisateur:Leag/Navigation popups|Navigation popups]]
document.write('<script type="text/javascript" src="'
+ 'http://fr.wikipedia.org/w/index.php?title=User:Leag/popups-strings-fr.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
mw.loader.load(
'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s');
//==Ajout de liens internes (bistro, PàS, etc.) dans la boîte de navigation à gauche==
//''Testé avec MediaWiki 1.6a''
function OptimizedNavig()
{
var a = document.getElementById("p-navigation");
if (a)
{
b = a.getElementsByTagName("ul");
if(b.length > 0)
{
var startUrl = '/w/index.php?title='
var endUrl = '&action=purge'
// liste des URLs
var urls = new Array()
urls[0] = 'Wikipédia:Le Bistro'
urls[1] = 'Wikipédia:Pages à supprimer'
urls[2] = 'Special:Wantedpages'
urls[3] = 'Utilisateur:Dake/Toolbox'
urls[4] = 'WP:BOT'
urls[5] = 'Special:Newpages'
urls[6] = 'Wikipédia:Oracle'
urls[7] = 'Special:Log/delete'
urls[8] = 'Special:Unusedcategories'
urls[9] = 'Special:Export'
var labels = new Array()
labels[0] = 'Bistro'
labels[1] = 'PàS'
labels[2] = 'WtdP'
labels[3] = 'tBox'
labels[4] = 'Bots'
labels[5] = 'nPage'
labels[6] = 'Oracle'
labels[7] = 'Log/Del'
labels[8] = 'unCat'
labels[9] = 'Export'
for (var i=0;i<urls.length;i+=2) {
tableHTML = '<table valign="top" cellspacing="0" cellpadding="0">'
tableHTML += '<tr>'
tableHTML += '<li><td><a href="' + startUrl + urls[i] + endUrl + '">' + labels[i] + ' | </a></td>'
tableHTML += '<td><a href="' + startUrl + urls[i+1] + endUrl + '">' + labels[i+1] + '</a></td></li>'
tableHTML += '</tr>'
tableHTML += '</table>'
b[0].innerHTML = b[0].innerHTML + tableHTML
}
}
}
}
$(OptimizedNavig);
// Résumé Deluxe
// Fonction ResumeDeluxeModif
//
// Code : Dake
function ResumeDeluxeModif(content) {
if (document.editform.wpSummary.value != 0) {
document.editform.wpSummary.value+=' - ';
}
document.editform.wpSummary.value+=content;
}
// Résumé Deluxe
// Fonction ResumeDeluxeModif
//
// Code : Dake
function ResumeDeluxe() {
// vous pouvez ajouter vos messages ci-dessous - attention aux apostrophes et aux
// guillemets qui peuvent casser le script
var messages = new Array()
messages[0] = "Révocation vandalisme";
messages[1] = "Révocation bac à sable";
messages[2] = "Révocation spam";
messages[3] = "Blanchiment vandalisme";
messages[4] = "Blanchiment bac à sable";
messages[5] = "Blanchiment spam";
messages[6] = "Wikification";
messages[7] = "dicussion";
messages[8] = "edition d'articles";
messages[9] = "avertissement vandale";
messages[10] = "retouches";
messages[11] = "ajouts"
messages[12] = "catégories";
messages[13] = "redirection";
messages[14] = "blanchi copyvio de";
// texte dans les boutons (pour éviter de prendre trop de place)
var labelBoutons = new Array()
labelBoutons[0] = "rv vand";
labelBoutons[1] = "rv bàs";
labelBoutons[2] = "rv spam";
labelBoutons[3] = "bl vand";
labelBoutons[4] = "bl bàs";
labelBoutons[5] = "bl spam";
labelBoutons[6] = "wiki";
labelBoutons[7] = "dicuss";
labelBoutons[8] = "edit";
labelBoutons[9] = "avert vand";
labelBoutons[10] = "retouches";
labelBoutons[11] = "ajouts";
labelBoutons[12] = "cat";
labelBoutons[13] = "red";
labelBoutons[14] = "bl cpvio";
var nombreBoutonsParLigne = 15;
// ne rien toucher ci-dessous
var mainNode = document.getElementById("wpSummaryLabel");
if (!mainNode) {
return;
}
var summaryNode = mainNode;
var formButtons = document.createElement("form");
for (var i=0;i<messages.length;i++) {
if (i%nombreBoutonsParLigne==0) {
formButtons.appendChild(document.createElement("p"));
}
var nodeInput = document.createElement("input");
nodeInput.setAttribute("type", "button");
nodeInput.setAttribute("value", labelBoutons[i]);
nodeInput.setAttribute("onClick", "ResumeDeluxeModif('" + messages[i] + "')");
formButtons.appendChild(nodeInput);
}
summaryNode.appendChild(formButtons);
}
$(ResumeDeluxe);
// Onglet Purge
function OngletPurge() {
var a = document.getElementById("p-cactions");
if (a)
{
var pageName = document.title.replace(" - Wikipédia", "");
b = a.getElementsByTagName("ul");
if(b.length > 0)
{
b[0].innerHTML = b[0].innerHTML
+ '<li id="ca-nstab-user">'
+ '<a href="/w/index.php?action=purge&title=' + pageName + '">purger</a>'
+ '</li>';
}
}
}
// Onglet Purge
$(OngletPurge);
/* Barre d'édition */
function DeluxeBar() {
if (document.createTextNode) {
var toolbar = document.getElementById("toolbar");
if (!toolbar) return;
///// zone personnalisable ////
var messages = new Array()
// le texte a été splitté sinon Mediawiki casse tout...
messages[0] = "{{subst:" + "Bienvenue sur ta page" + "}}" + "~~" + "~~";
messages[1] = "{{subst:" + "Bienvenue" + "}}" + "~~" + "~~";
messages[2] = "{{subst:" + "Bienvenue débutant" + "}}" + "~~" + "~~";
messages[3] = "{{subst:" + "test1" + "}}" + "~~" + "~~";
messages[4] = "{{subst:" + "test2" + "}}" + "~~" + "~~";
messages[5] = "{{subst:" + "test3" + "}}" + "~~" + "~~";
messages[6] = "{{subst:" + "Bienvenue spammeur" + "}}" + "~~" + "~~";
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/e/eb/Button_accueilB.png";
images[2] = "http://upload.wikimedia.org/wikipedia/fr/e/eb/Button_accueilB.png";
images[3] = "http://upload.wikimedia.org/wikipedia/commons/1/1d/Bouton_Vandale1.png";
images[4] = "http://upload.wikimedia.org/wikipedia/commons/c/cc/Bouton_Vandale2.png";
images[5] = "http://upload.wikimedia.org/wikipedia/commons/e/e4/Bouton_Vandale3.png";
images[6] = "http://upload.wikimedia.org/wikipedia/fr/f/fb/Button_spam2.png";
var commentaires = new Array()
commentaires[0] = "Bienvenue sur ta page !"
commentaires[1] = "Bienvenue !"
commentaires[2] = "Bienvenue débutant"
commentaires[3] = "Avertissement vandalisme"
commentaires[4] = "Deuxième avertissement vandalisme";
commentaires[5] = "Troisième avertissement vandalisme";
commentaires[6] = "Avertissement spam" ;
////////////////////////////////
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 = sampleText;
}
$(DeluxeBar);
/* godmode */
//document.write('<SCRIPT type="text/javascript" '
// + 'SRC="http://fr.wikipedia.org/w/index.php?title=Utilisateur:Gribeco/godmode-light.js'
// + '&action=raw&ctype=text/javascript&dontcountme=s"><\/SCRIPT>');
mw.loader.load(
'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s');
document.write('<script type="text/javascript" src="'
+ 'http://fr.wikipedia.org/w/index.php?title=User:Leag/popups-strings-fr.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
function googleOnglet() {
var a = document.getElementById("p-cactions");
if (a)
{
var pageName = document.title.replace(" - Wikipédia", "");
b = a.getElementsByTagName("ul");
if(b.length > 0)
{
b[0].innerHTML = b[0].innerHTML
+ '<li id="ca-nstab-user"><font style="color: blue; font-weight: bold; padding-left: 0.5em">G</font>'
+ '<a href="http://www.google.fr/search?num=20&hl=en&safe=off&q=site%3Afr.wikipedia.org+' + pageName + '&btnG=Search">'
+ 'wp-fr</a>'
+ '<a href="http://www.google.fr/search?num=20&hl=en&safe=off&q=site%3Awikipedia.org+' + pageName + '&btnG=Search">'
+ 'wp</a>'
+ '<a href="http://www.google.fr/search?num=20&hl=fr&safe=off&q=' + pageName + '&btnG=Search&meta=lr%3Dlang_fr">'
+ 'web-fr</a>'
+ '<a href="http://www.google.fr/search?num=20&hl=en&safe=off&q=' + pageName + '&btnG=Search">'
+ 'web</a>'
+ '</li>';
}
}
}
$(googleOnglet);
/*
* plagiarismsearch : détection de plagiats
*/
function plagiarismsearch(){
var formElement = document.createElement('form');
formElement.setAttribute('method', 'post');
formElement.setAttribute('id', 'copyscapequery');
formElement.setAttribute('name', 'copyscapequery');
formElement.setAttribute('action', 'http://www.copyscape.com/?results');
var queryInput = document.createElement('input');
queryInput.setAttribute('name', 'q');
queryInput.setAttribute('type', 'hidden');
queryInput.setAttribute('value', document.URL);
formElement.appendChild(queryInput);
var queryGO = document.createElement('a');
queryGO.setAttribute('href', 'javascript:document.forms.copyscapequery.submit();');
var queryText = document.createTextNode('copyscape');
queryGO.appendChild(queryText);
var link = document.createElement('li');
link.setAttribute ('id', 'ca-copyscape');
link.appendChild(queryGO);
link.appendChild(formElement);
var panelControl = document.getElementById('p-cactions');
if (panelControl) {
panelLinks = panelControl.getElementsByTagName('ul')[0];
if (panelLinks){
panelLinks.appendChild(link);
}
}
}
$(plagiarismsearch);
-->