User:Brochon99/global.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* Patrouille LiveRC */
loadJs('User:EDUCA33E/LiveRC.js');
///// Projet:Javascript /////
obtenir("HistoryNumDiff");
/********************************
*** Onglet Google contextuel ***
********************************/
function OngletGoogle() {
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="http://www.google.ca/search?num=20&hl=fr&safe=off&q=site%3Afr.wikipedia.org+' + pageName + '&btnG=Search">'
+ 'Wiki</a>'
+ '<a href="http://www.google.ca/search?num=20&hl=fr&safe=off&q=' + pageName + '&btnG=Search">'
+ 'Web</a>'
+ '</li>';
}
}
}
$(OngletGoogle);
/*********************
*** Résumé Deluxe ***
*********************/
var resumedeluxeTitles = new Array();
with (resumedeluxeTitles) {
push("orthographe");
push("- homonymie");
push("- typographie");
push("- catégorisation");
push("- interwiki");
push("- wikification");
push("- référence");
push("- image");
push("- redirection");
push("- style");
push("- revert");
push("- réorganisation");
push("- réponse à ");
push("- maintenance");
push("- renommage");
push("- essais");
push("- infobox");
push("- ajout");
push("- ajout du bandeau");
push("- retrait");
push("- retrait du bandeau");
}
var resumedeluxeInputs= new Array();
with (resumedeluxeInputs) {
push("Orthographe");
push("Homonymie");
push("Typographie");
push("Catégorisation");
push("Interwiki");
push("Wikification");
push("Référence");
push("Image");
push("Redirection");
push("Style");
push("Revert");
push("Réorganisation");
push("Réponse à ");
push("Maintenance");
push("Renommage");
push("Essai supplémentaire");
push("Infobox");
push("Ajout");
push("Ajout du bandeau");
push("Retrait");
push("Retrait du bandeau");
}
function setSummary(str)
{
document.editform.wpSummary.value = str;
}
function addToSummary(str)
{
var resum = document.editform.wpSummary.value;
if(resum != 0 && resum.indexOf("*/") < resum.length - 3) {
document.editform.wpSummary.value += " - ";
}
document.editform.wpSummary.value += str;
}
function DeluxeSummary()
{
var sumLbl = document.getElementById("wpSummaryLabel");
if(sumLbl) {
var sumInput = document.getElementById("wpSummary");
sumInput.style.width = "95%";
var str = "Messages prédéfinis : ";
for(var cpt = 0; cpt < resumedeluxeTitles.length; cpt ++) {
var tmp = resumedeluxeInputs[cpt];
str += "<a href=\"javascript:addToSummary('" + tmp.replace( /[']/g , "\\'") + "')\""
+ " class=\"sumLink\" title=\"Ajouter dans la boîte de résumé\">"
+ resumedeluxeTitles[cpt]
+ "</a> ";
}
sumLbl.innerHTML = str + "<br />" + sumLbl.innerHTML;
}
}
$(DeluxeSummary);