Utilisateur:Lepticed7/common.js
Apparence
Remarque: après avoir sauvegardé, vous devez vider le cache de votre navigateur pour que les changements prennent effet. Mozilla, cliquez sur Actualiser (ou ctrl-r). Internet Explorer / Opera: ctrl-f5. Safari: cmd-r. Konqueror ctrl-r.
// [[File:Krinkle_RTRC.js]]
importScript('Utilisateur:Lepticed7/Gadget-CreerFlexionEo.js');
importScript('Utilisateur:Lepticed7/Gadget-CreerFlexionIt.js');
importScript('Utilisateur:Lepticed7/Gadget-EoAutresSystemes.js');
importScript('Utilisateur:Sebleouf/linksheredeluxe.js');
mw.loader.load("/wiki/Utilisateur:VIGNERON/LienLex.js?action=raw&ctype=text/javascript");
var ft_whitelist = ["eo", "io", "tok", "na’vi", "en", "vo"];
var max_number_of_examples = 3;
//[[Catégorie:JavaScript du Wiktionnaire|Barre de luxe.js]]
/*$(function () {
if (mw.config.get('wgNamespaceNumber') == 106) {
$("li a[href^='/wiki/Thésaurus:']").each(function () {
$(this).text($(this).text().substr("Thésaurus:".length));
});
}
});
*/
importScript('Utilisateur:Lepticed7/Gadget-ModèleVoir.js');
mw.loader.load('//fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-HomonymiesEnCouleur.js&action=raw&ctype=text/javascript');
bklCheckOnlyCheckMainNS = false;
window.bklCheck_customCats = {};
window.bklCheck_customCats['Catégorie:espéranto'] = {
className : 'EOWix',
titleAppend : ' (EOWix)',
htmlAppend : '',
};
window.bklCheck_customCats['Catégorie:toki pona'] = {
className : 'TPWix',
titleAppend : ' (TPWix)',
htmlAppend : '',
};
var bdl_buttons = [
// Définition des boutons.
{
tagOpen: "[[",
tagClose: "]]",
imageFileNameOOUI: "thumb/3/35/OOjs UI icon wikiText.svg/24px-OOjs UI icon wikiText.svg.png",
tooltip: "Lien",
buttonId: "link-tag",
group: "insert",
},
{
action: function (selectedText, langCode) {
return "#* {{exemple|lang=" + langCode + "}}";
},
promptText: "Langue",
promptDefault: "",
imageFileName: "2/26/Button_latinas.png",
imageFileNameOOUI: "thumb/a/a9/OOjs_UI_icon_quotes-ltr-invert.svg/24px-OOjs_UI_icon_quotes-ltr-invert.svg.png",
tooltip: "Modèle exemple vide",
buttonId: "exemple-template",
group: "insert",
},
{
action: function (selectedText, langCode) {
var regex = /^#+\*\s*''(.+)''\s*{{source\s*\|(.+)}}\s*$/gs;
var match = regex.exec(selectedText);
if (!match)
return selectedText;
var text = match[1];
var source = match[2];
console.log(match);
return "#* {{exemple|lang=" + langCode + "\n | " + text + "\n | source=" + source + "}}";
},
promptText: "Langue",
promptDefault: "",
imageFileName: "2/26/Button_latinas.png",
imageFileNameOOUI: "thumb/a/a9/OOjs_UI_icon_quotes-ltr-invert.svg/24px-OOjs_UI_icon_quotes-ltr-invert.svg.png",
tooltip: "Vers modèle exemple",
buttonId: "to-exemple-template",
group: "insert",
},
];
var cnmFilter = ["synonymes", "vocabulaire", "apparentés", "antonymes", "holonymes", "hyperonymes", "méronymes", "holonymes", "hyper-verbes", "troponymes"];