« Utilisateur:Tractopelle-jaune/Toolbar.js » : différence entre les versions
Apparence
Contenu supprimé Contenu ajouté
m ménage ; redéfinition inutile |
début de nettoyage des boutons de ma barre d'outils Balise : Contenu remplacé |
||
Ligne 5 : | Ligne 5 : | ||
// Boutons supplémentaires |
// Boutons supplémentaires |
||
$(function() { $('#wpTextbox1').wikiEditor('addToToolbar', |
|||
var customizeToolbar = function() |
|||
{ |
{ |
||
section: 'tracto-tools', |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', |
|||
type: 'toolbar', |
|||
{ |
|||
groups: 'code', |
|||
'sections': |
|||
label: 'Code', |
|||
{ |
|||
tools: { //</nowiki> |
|||
'tracto-tools': |
|||
'code-add-code': { |
|||
{ |
|||
type: 'button', |
|||
label: 'Ajouter balises <code></code>', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/45/Farm-Fresh_script_code.png/22px-Farm-Fresh_script_code.png', |
|||
groups: |
|||
{ |
action: { |
||
type: 'encapsulate', |
|||
options: { |
|||
pre: '<code>', |
|||
peri: '', |
|||
' |
post: '</code>' |
||
}}}, |
|||
'code-add-code-with-id': { |
|||
label: '' |
|||
type: 'button', |
|||
label: 'Ajouter balises <code id=""></code> avec l\'id contenant le texte séléctionné', |
|||
'lang': |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/9/9b/Farm-Fresh_script_go.png/22px-Farm-Fresh_script_go.png', |
|||
{ |
|||
action: { |
|||
type: 'encapsulate', |
|||
options: { |
|||
pre: '<code id="param-xxx">', |
|||
{ |
|||
peri: '', |
|||
post: '</code>', |
|||
regex: /(?:<code>|\'{2,5}|\"|^( *))([^<>|{}\[\]#]+?)(?:<\/code>|\'{2,5}|\"|( *)$)/g, |
|||
} |
|||
regexReplace: '$1<code id="param-$2">$2</code>$3' |
|||
}, |
|||
}}}, |
|||
'code-add-code-with-link-id': { |
|||
'tables': |
|||
type: 'button', |
|||
{ |
|||
label: 'Ajouter balises <code>[[#param-xxx|...]]</code> avec lien vers le paramètre séléctionné', |
|||
type: 'toolbar', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/6/68/Farm-Fresh_script_link.png/22px-Farm-Fresh_script_link.png', |
|||
label: 'Tableaux', |
|||
action: { |
|||
type: 'encapsulate', |
|||
{ |
|||
options: { |
|||
pre: '<code>[[#param-xxx|', |
|||
{ |
|||
peri: '', |
|||
post: ']]</code>', |
|||
regex: /(?:<code>|\'{2,5}|\"|^( *))([^<>|{}\[\]#]+?)(?:<\/code>|\'{2,5}|\"|( *)$)/g, |
|||
'style': |
|||
regexReplace: '$1<code>[[#param-$2|$2]]</code>$3' |
|||
{ |
|||
}}}, |
|||
label: 'Style' |
|||
'code-add-magic-word': { |
|||
} |
|||
label: 'Ajout balises code + lien vers Aide:Mot magique', |
|||
} |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/6/61/Farm-Fresh_script_palette.png/22px-Farm-Fresh_script_palette.png', |
|||
action: { |
|||
type: 'encapsulate', |
|||
{ |
|||
options: { |
|||
pre: '<code>[[Aide:Mot magique#XXX|<nowiki>', |
|||
label: 'Divers', |
|||
peri: 'XXX', |
|||
post: '</nowiki>]]</code>', |
|||
{ |
|||
/* 1 2 3 4 5 6 7 8 9 10 11 12 */ |
|||
'liens': |
|||
regex: /(?:<code>(?:<nowiki>)?|^( *))(?:(__)([A-Z]+)(__)|(\{\{)([A-Za-z0-9 _!]+):?(\}\})|(\{\{)m\|([A-Za-z0-9 _!]+)(\}\})|([A-Za-z0-9 _!]+):?)(?:(?:<\/nowiki>)?<\/code>|( *)$)/g, |
|||
{ |
|||
regexReplace: '$1<code>[[Aide:Mot magique#$3$6$9$11|<nowiki>$2$3$4$5$6$7$8$9$10$11</nowiki>]]</code>$12' |
|||
label: '' |
|||
}}}, |
|||
'code-add-code+nowiki': { |
|||
'basic': |
|||
type: 'button', |
|||
{ |
|||
label: 'Ajouter balises <code><nowiki></nowiki></code>', |
|||
label: '' |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/ac/Farm-Fresh_script_visual_studio.png/22px-Farm-Fresh_script_visual_studio.png', |
|||
}, |
|||
action: { |
|||
type: 'encapsulate', |
|||
{ |
|||
options: { |
|||
pre: '<code><nowiki>', |
|||
} |
|||
peri: '', |
|||
post: '</nowiki></code>' |
|||
}, |
|||
}}}, |
|||
'code-add-nowiki': { |
|||
type: 'button', |
|||
{ |
|||
label: 'Ajouter balises <nowiki></nowiki>', |
|||
type: 'toolbar', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Farm-Fresh_script_code_red.png/22px-Farm-Fresh_script_code_red.png', |
|||
label: 'Vote', |
|||
action: { |
|||
type: 'encapsulate', |
|||
{ |
|||
options: { |
|||
pre: '<nowiki>', |
|||
peri: '', |
|||
post: '</nowiki>' |
|||
}}}, |
|||
'PàS': |
|||
'code-decode': { |
|||
{ |
|||
type: 'button', |
|||
label: 'De-code', |
|||
}, |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/8/87/Farm-Fresh_script_delete.png/22px-Farm-Fresh_script_delete.png', |
|||
'autre': |
|||
action: { |
|||
type: 'replace', |
|||
options: { |
|||
' |
pre: '', |
||
peri: '', |
|||
post: '', |
|||
regex: /(?:<code>|<nowiki>)+(.+?)(?:<\/nowiki>|<\/code>)+/g, |
|||
} |
|||
regexReplace: '$1' |
|||
} |
|||
}}}, |
|||
'code-apos2code': { |
|||
' |
type: 'button', |
||
label: 'Remplacer \'\'\'texte\'\'\' par <code>texte</code>', |
|||
{ |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/be/Farm-Fresh_script_flash.png/22px-Farm-Fresh_script_flash.png', |
|||
type: 'toolbar', |
|||
action: { |
|||
type: 'encapsulate', |
|||
groups: |
|||
{ |
options: { |
||
' |
pre: '<code>', |
||
peri: '', |
|||
post: '</code>', |
|||
regex: /(?:\'{2,5}(?:<code>)?(.+?)(?:<\/code>)?\'{2,5}|« *(?:<code>)?([^«»\n]+?)(?:<\/code>)? *»|\" *(?:<code>)?([^«»\n]+?)(?:<\/code>)? *\")/g, |
|||
} |
|||
regexReplace: '<code>$1$2$3</code>' |
|||
} |
|||
}}}, |
|||
'code-code2definitionList': { |
|||
' |
type: 'button', |
||
label: 'Remplacer "* \'\'\'<code>param</code>\'\'\' : " par "; <code>param</code> : " sur toutes les lignes sélectionnées', |
|||
{ |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/8/89/Farm-Fresh_macro_show_all_actions.png/22px-Farm-Fresh_macro_show_all_actions.png', |
|||
type: 'toolbar', |
|||
action: { |
|||
type: 'encapsulate', |
|||
groups: |
|||
{ |
options: { |
||
' |
pre: '; <code>', |
||
peri: '', |
|||
post: '</code> : ', |
|||
regex: /^[*;]+ *(?:\'{2,5} *([^<>=\n;*]+?) *(?:[:=—–] *| +- +)?\'{2,5} *(?:[:=—–] *| +- +)?|(?:\'{2,5})?<code>((?:<nowiki>)?[^<>=\n;*]+?(?:<\/nowiki>)?)<\/code>(?:\'{2,5})? *(?:[:=—–] *| +- +)?|([^<>:=\n—–;*]+?) *[:=—–] *| +- +)/mg, |
|||
}, |
|||
regexReplace: '; <code>$1$2$3</code> : ' |
|||
'CSI': |
|||
}}} |
|||
} //<nowiki> |
|||
label: 'SI' |
|||
}); }); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} ); |
|||
$('#wpTextbox1').wikiEditor( 'addToToolbar', |
|||
{ |
|||
section: 'main', |
|||
group: 'format', |
|||
'tools': |
|||
{ |
|||
'main-underline': |
|||
{ |
|||
label: 'Ajouter <u></u>', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a1/OOjs_UI_icon_underline-a.svg/22px-OOjs_UI_icon_underline-a.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '<u>', |
|||
peri: '', |
|||
post: '</u>' |
|||
} |
|||
} |
|||
}, |
|||
'main-underline-bold': |
|||
{ |
|||
label: 'Ajouter <u>\'\'\'texte\'\'\'</u>', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/1/10/OOjs_UI_icon_text-style.svg/22px-OOjs_UI_icon_text-style.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '<u>\'\'\'', |
|||
peri: '', |
|||
post: '\'\'\'</u>' |
|||
} |
|||
} |
|||
}, |
|||
'main-small': |
|||
{ |
|||
label: 'Ajouter <small></small>', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/1/10/Toolbar_Format_small.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '<small>', |
|||
peri: '', |
|||
post: '</small>' |
|||
} |
|||
} |
|||
}, |
|||
} |
|||
} ); |
|||
$('#wpTextbox1').wikiEditor( 'addToToolbar', |
|||
{ |
|||
section: 'tracto-tools', |
|||
group: 'code', |
|||
'tools': |
|||
{ |
|||
//</nowiki> |
|||
'code-code': |
|||
{ |
|||
label: 'Ajouter balises <code></code>', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/45/Farm-Fresh_script_code.png/22px-Farm-Fresh_script_code.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '<code>', |
|||
peri: '', |
|||
post: '</code>' |
|||
} |
|||
} |
|||
}, |
|||
'code-code-with-id': |
|||
{ |
|||
label: 'Ajouter balises <code id=""></code> avec l\'id contenant le texte séléctionné', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/9/9b/Farm-Fresh_script_go.png/22px-Farm-Fresh_script_go.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '<code id="param-xxx">', |
|||
peri: '', |
|||
post: '</code>', |
|||
regex: /(?:<code>|\'{2,5}|\"|^( *))([^<>|{}\[\]#]+?)(?:<\/code>|\'{2,5}|\"|( *)$)/g, |
|||
regexReplace: '$1<code id="param-$2">$2</code>$3' |
|||
} |
|||
} |
|||
}, |
|||
'code-code-with-link-id': |
|||
{ |
|||
label: 'Ajouter balises <code>[[#param-xxx|...]]</code> avec lien vers le paramètre séléctionné', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/6/68/Farm-Fresh_script_link.png/22px-Farm-Fresh_script_link.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '<code>[[#param-xxx|', |
|||
peri: '', |
|||
post: ']]</code>', |
|||
regex: /(?:<code>|\'{2,5}|\"|^( *))([^<>|{}\[\]#]+?)(?:<\/code>|\'{2,5}|\"|( *)$)/g, |
|||
regexReplace: '$1<code>[[#param-$2|$2]]</code>$3' |
|||
} |
|||
} |
|||
}, |
|||
'code-magic-word': |
|||
{ |
|||
label: 'Ajout balises code + lien vers Aide:Mot magique', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/6/61/Farm-Fresh_script_palette.png/22px-Farm-Fresh_script_palette.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '<code>[[Aide:Mot magique#XXX|<nowiki>', |
|||
peri: 'XXX', |
|||
post: '</nowiki>]]</code>', |
|||
/* 1 2 3 4 5 6 7 8 9 10 11 12 */ |
|||
regex: /(?:<code>(?:<nowiki>)?|^( *))(?:(__)([A-Z]+)(__)|(\{\{)([A-Za-z0-9 _!]+):?(\}\})|(\{\{)m\|([A-Za-z0-9 _!]+)(\}\})|([A-Za-z0-9 _!]+):?)(?:(?:<\/nowiki>)?<\/code>|( *)$)/g, |
|||
regexReplace: '$1<code>[[Aide:Mot magique#$3$6$9$11|<nowiki>$2$3$4$5$6$7$8$9$10$11</nowiki>]]</code>$12' |
|||
} |
|||
} |
|||
}, |
|||
'code-code+nowiki': |
|||
{ |
|||
label: 'Ajouter balises <code><nowiki></nowiki></code>', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/ac/Farm-Fresh_script_visual_studio.png/22px-Farm-Fresh_script_visual_studio.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '<code><nowiki>', |
|||
peri: '', |
|||
post: '</nowiki></code>' |
|||
} |
|||
} |
|||
}, |
|||
'code-nowiki': |
|||
{ |
|||
label: 'Ajouter balises <nowiki></nowiki>', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Farm-Fresh_script_code_red.png/22px-Farm-Fresh_script_code_red.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '<nowiki>', |
|||
peri: '', |
|||
post: '</nowiki>' |
|||
} |
|||
} |
|||
}, |
|||
'code-decode': |
|||
{ |
|||
label: 'De-code', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/8/87/Farm-Fresh_script_delete.png/22px-Farm-Fresh_script_delete.png', |
|||
action: |
|||
{ |
|||
type: 'replace', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: '', |
|||
post: '', |
|||
regex: /(?:<code>|<nowiki>)+(.+?)(?:<\/nowiki>|<\/code>)+/g, |
|||
regexReplace: '$1' |
|||
} |
|||
} |
|||
}, |
|||
'code-apos2code': |
|||
{ |
|||
label: 'Remplacer \'\'\'texte\'\'\' par <code>texte</code>', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/be/Farm-Fresh_script_flash.png/22px-Farm-Fresh_script_flash.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '<code>', |
|||
peri: '', |
|||
post: '</code>', |
|||
regex: /(?:\'{2,5}(?:<code>)?(.+?)(?:<\/code>)?\'{2,5}|« *(?:<code>)?([^«»\n]+?)(?:<\/code>)? *»|\" *(?:<code>)?([^«»\n]+?)(?:<\/code>)? *\")/g, |
|||
regexReplace: '<code>$1$2$3</code>' |
|||
} |
|||
} |
|||
}, |
|||
'code-apos2code-multiline': |
|||
{ |
|||
label: 'Remplacer "* \'\'\'param\'\'\' : " par "* <code>param</code> : " sur toutes les lignes sélectionnées', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/45/Farm-Fresh_page_white_actionscript.png/22px-Farm-Fresh_page_white_actionscript.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '<code>', |
|||
peri: '', |
|||
post: '</code>', |
|||
regex: /^\*+ *\'{2,5}(?:<code>)?(.+?)(?:<\/code>)?\'{2,5}(?: *[:=—–] *| +- +)?/mg, |
|||
regexReplace: '* <code>$1</code> : ' |
|||
} |
|||
} |
|||
}, |
|||
'code-apos-code2definition-list': |
|||
{ |
|||
label: 'Remplacer "* \'\'\'<code>param</code>\'\'\' : " par "; <code>param</code> : " sur toutes les lignes sélectionnées', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/8/89/Farm-Fresh_macro_show_all_actions.png/22px-Farm-Fresh_macro_show_all_actions.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '; <code>', |
|||
peri: '', |
|||
post: '</code> : ', |
|||
regex: /^[*;]+ *(?:\'{2,5} *([^<>=\n;*]+?) *(?:[:=—–] *| +- +)?\'{2,5} *(?:[:=—–] *| +- +)?|(?:\'{2,5})?<code>((?:<nowiki>)?[^<>=\n;*]+?(?:<\/nowiki>)?)<\/code>(?:\'{2,5})? *(?:[:=—–] *| +- +)?|([^<>:=\n—–;*]+?) *[:=—–] *| +- +)/mg, |
|||
regexReplace: '; <code>$1$2$3</code> : ' |
|||
} |
|||
} |
|||
} |
|||
//<nowiki> |
|||
} |
|||
} ); |
|||
$('#wpTextbox1').wikiEditor( 'addToToolbar', |
|||
{ |
|||
section: 'tracto-tools', |
|||
group: 'touche', |
|||
'tools': |
|||
{ |
|||
'touche-1': |
|||
{ |
|||
label: 'Ajouter {{Touche|key1}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Preferences-desktop-keyboard-shortcuts-ctrl.svg/28px-Preferences-desktop-keyboard-shortcuts-ctrl.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Touche|', |
|||
peri: '', |
|||
post: '}}' |
|||
} |
|||
} |
|||
}, |
|||
'touche-2': |
|||
{ |
|||
label: 'Ajouter {{Touches|key1|key2}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/77/Preferences-desktop-keyboard-shortcuts-alt.svg/28px-Preferences-desktop-keyboard-shortcuts-alt.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Touches|', |
|||
peri: '', |
|||
post: '|}}', |
|||
regex: /(.+)\+(.+)/, |
|||
regexReplace: '{{Touches|$1|$2}}' |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} ); |
|||
$('#wpTextbox1').wikiEditor( 'addToToolbar', |
|||
{ |
|||
section: 'tracto-tools', |
|||
group: 'lang', |
|||
'tools': |
|||
{ |
|||
'citation': |
|||
{ |
|||
label: 'Ajouter {{citation}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Farm-Fresh_comment.png/22px-Farm-Fresh_comment.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{citation|', |
|||
peri: '', |
|||
post: '}}', |
|||
regex: /^( *)(?:«|'{2,5}|\") *(.+?) *(?:\"|'{2,5}|»)( *)$/, |
|||
regexReplace: '$1{{citation|$2}}$3' |
|||
} |
|||
} |
|||
}, |
|||
'nobr': |
|||
{ |
|||
label: 'Ajouter {{nobr}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/e/ed/Farm-Fresh_timeline_marker.png/22px-Farm-Fresh_timeline_marker.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{nobr|1=', |
|||
peri: '', |
|||
post: '}}', |
|||
regex: /^( *)(.+?)( *)$/, |
|||
regexReplace: '$1{{nobr|1=$2}}$3' |
|||
} |
|||
} |
|||
}, |
|||
'lang|en': |
|||
{ |
|||
label: 'Ajouter {{langue|en}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/9/90/Farm-Fresh_flag_great_britain.png/22px-Farm-Fresh_flag_great_britain.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{langue|en|', |
|||
peri: '', |
|||
post: '}}', |
|||
regex: /(?:\{\{[Ll]angu?e?\|en\|)?('{2,5})(.+?)\1(?:\}\})?/, |
|||
regexReplace: '$1{{langue|en|$2}}$1' |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} ); |
|||
$('#wpTextbox1').wikiEditor( 'addToToolbar', |
|||
{ |
|||
section: 'tracto-tools', |
|||
group: 'divers', |
|||
'tools': |
|||
{ |
|||
'list-add-puces': |
|||
{ |
|||
label: 'Ajouter une puce devant chaque ligne / conversion {{Liste éléments}} en {{Liste horizontale}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/71/Farm-Fresh_text_list_bullets.png/22px-Farm-Fresh_text_list_bullets.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: '', |
|||
post: '', |
|||
regex: /^(?: *[*#|] *)?([^\n*#]+)$/mg, |
|||
regexReplace: '* $1' |
|||
} |
|||
} |
|||
}, |
|||
'list-add-num': |
|||
{ |
|||
label: 'Convertir en liste à puces numérotées', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Farm-Fresh_text_list_numbers.png/22px-Farm-Fresh_text_list_numbers.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: '', |
|||
post: '', |
|||
regex: /^(?: *[*#|] *)?([^\n*#]+)$/mg, |
|||
regexReplace: '# $1' |
|||
} |
|||
} |
|||
}, |
|||
'list-link': |
|||
{ |
|||
label: 'Ajouter crochets sur tous les éléments de la liste', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Farm-Fresh_database_repeat_insert.png/22px-Farm-Fresh_database_repeat_insert.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: '', |
|||
post: '', |
|||
regex: /^( *[*#|] *)?([^\[\]\n*#{}|]+)$/mg, |
|||
regexReplace: '$1[[$2]]' |
|||
} |
|||
} |
|||
}, |
|||
'list-link-a': |
|||
{ |
|||
label: 'Ajouter {{a}} sur tous les éléments de la liste', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Farm-Fresh_database_repeat_insert.png/22px-Farm-Fresh_database_repeat_insert.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: '', |
|||
post: '', |
|||
regex: /^( *[*#|] *)?([^\[\]\n*#{}|]+)$/mg, |
|||
regexReplace: '$1{{a|$2}}' |
|||
} |
|||
} |
|||
}, |
|||
'list-link-a-court': |
|||
{ |
|||
label: 'Ajouter {{a-court}} sur tous les éléments de la liste', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Farm-Fresh_database_repeat_insert.png/22px-Farm-Fresh_database_repeat_insert.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: '', |
|||
post: '', |
|||
regex: /^( *[*#|] *)?([^\[\]\n*#{}|]+)$/mg, |
|||
regexReplace: '$1{{a\'|$2}}' |
|||
} |
|||
} |
|||
}, |
|||
'list-delink': |
|||
{ |
|||
label: 'Supprimer crochets+puces sur tous les éléments de la liste', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/2/2c/Farm-Fresh_database_repeat_delete.png/22px-Farm-Fresh_database_repeat_delete.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: '', |
|||
post: '', |
|||
regex: /^(?:[*#] *)?(?:\[\[|\{\{a\||\{\{a-court\||\{\{a'\|)?([^\[\]\n*#{}]+)(?:\]\]|\}\})?$/img, |
|||
regexReplace: '$1' |
|||
} |
|||
} |
|||
}, |
|||
'list-convert-virg2list': |
|||
{ |
|||
label: 'Convertir une liste d\'éléments séparaés par des virgules en liste à puces verticale', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/6/62/Farm-Fresh_smartart_organization_chart_rh.png/22px-Farm-Fresh_smartart_organization_chart_rh.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: '', |
|||
post: '', |
|||
regex: /(\[\[[^\[\]]+\]\])[ \n,]+/g, |
|||
regexReplace: '* $1\n' |
|||
} |
|||
} |
|||
}, |
|||
'list-convert-list2virg': |
|||
{ |
|||
label: 'Convertir une liste verticale d\'éléments en une liste séparaés par des virgules', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/0a/Farm-Fresh_smartart_organization_chart_lh.png/22px-Farm-Fresh_smartart_organization_chart_lh.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: '', |
|||
post: '', |
|||
regex: /^[*#| ]*(?:\{\{a'?\||\{\{a-court\||\[\[)([^\[\]{}]+)(?:\]\]|\}\})[ \n,;.]+$/img, |
|||
regexReplace: '[[$1]], ' |
|||
} |
|||
} |
|||
}, |
|||
'notif-normal': |
|||
{ |
|||
label: 'Ajouter {{Notif|...}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/4b/Farm-Fresh_bell.png/22px-Farm-Fresh_bell.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Notif|', |
|||
peri: '', |
|||
post: '}}' |
|||
} |
|||
} |
|||
}, |
|||
'notif-court': |
|||
{ |
|||
label: 'Ajouter {{Notif-|...}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/5/53/Farm-Fresh_bell_go.png/22px-Farm-Fresh_bell_go.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Notif-|', |
|||
peri: '', |
|||
post: '}}' |
|||
} |
|||
} |
|||
}, |
|||
'notif-u': |
|||
{ |
|||
label: 'Ajouter {{u|...}} à l\'utilisateur séléctionné ou à toutes les adresses IP selectionnées', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/2/2e/Farm-Fresh_user_add.png/22px-Farm-Fresh_user_add.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{u|', |
|||
peri: '', |
|||
post: '}}', |
|||
regex: /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(?:\/\d+)?|[0-9A-F]{1,4}:[0-9A-F]{1,4}:[0-9A-F]{1,4}:[0-9A-F]{1,4}:[:0-9A-F]+(?:\/\d+)?)/ig, |
|||
regexReplace: '{{u|$1}}' |
|||
} |
|||
} |
|||
}, |
|||
'notif-u-court': |
|||
{ |
|||
label: 'Ajouter {{u-|...}} à l\'utilisateur séléctionné ou à toutes les adresses IP selectionnées', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/1/14/Farm-Fresh_user_go.png/22px-Farm-Fresh_user_go.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{u-|', |
|||
peri: '', |
|||
post: '}}', |
|||
regex: /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(?:\/\d+)?|[0-9A-F]{1,4}:[0-9A-F]{1,4}:[0-9A-F]{1,4}:[0-9A-F]{1,4}:[:0-9A-F]+(?:\/\d+)?)/ig, |
|||
regexReplace: '{{u-|$1}}' |
|||
} |
|||
} |
|||
}, |
|||
'convert-diff': |
|||
{ |
|||
label: 'Convertir une ou plusieurs urls de diffs en [[Spécial:Diff/]].', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/44/Farm-Fresh_edit_diff.png/22px-Farm-Fresh_edit_diff.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: '', |
|||
post: '', |
|||
regex: /\[?https:\/\/[.a-z]+\.org\/w(?:\/index\.php\?(?:title=[^\n=]+(?:&curid=\d+)?&)?(?:diff=prev&oldid=(\d+)|oldid=(\d+)&diff=prev)|(\/)index\.php\?(?:title=[^\n=]+(?:&curid=\d+)?)?&(?:diff=(\d+|next)&oldid=(\d+)|oldid=(\d+)&diff=(\d+|next)))\]?/g, |
|||
regexReplace: '[[Special:Diff/$1$2$5$6$3$4$7]]' // $1/$2=[oldid unique] / $3=[/] / $4/$7=[diff multi] / $5/$6=[oldid multi] |
|||
} |
|||
} |
|||
}, |
|||
'convert-diff-avec-texte': |
|||
{ |
|||
label: 'Convertir une ou plusieurs urls de diffs en [[Spécial:Diff/|texte]].', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/3/35/Farm-Fresh_document_inspect.png/22px-Farm-Fresh_document_inspect.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: '', |
|||
post: '', |
|||
regex: /\[https:\/\/[.a-z]+\.org\/w(?:\/index\.php\?(?:title=[^\n=]+(?:&curid=\d+)?&)?(?:diff=prev&oldid=(\d+)|oldid=(\d+)&diff=prev)|(\/)index\.php\?(?:title=[^\n=]+(?:&curid=\d+)?)?&(?:diff=(\d+|next)&oldid=(\d+)|oldid=(\d+)&diff=(\d+|next))) ([^\[\]|]+)\]/g, |
|||
regexReplace: '[[Special:Diff/$1$2$5$6$3$4$7|$8]]' // $1/$2=[oldid unique] / $3=[/] / $4/$7=[diff multi] / $5/$6=[oldid multi] / $8=[texte] |
|||
} |
|||
} |
|||
}, |
|||
'convert-permalink-avec-oldid': |
|||
{ |
|||
label: 'Convertir une ou plusieurs urls permalien en [[Spécial:Lien permanent/<oldid>[#<ancre>]|<pagename>[#<ancre>]]].', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/d/d7/Farm-Fresh_document_hash_tag.png/22px-Farm-Fresh_document_hash_tag.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '[[Spécial:Lien permanent/', |
|||
peri: 'oldid', |
|||
post: ']]', //https://fr.wikipedia.org/w/index.php?title=Discussion_utilisateur:Ini%C8%9Bi&oldid=149535055#Zealandia |
|||
regex: /https:\/\/[.a-z]+\.org\/w\/index\.php\?title=([^\n=#&]+)&oldid=(\d+)(#[^\n ]+)?/g, |
|||
regexReplace: '[[Special:Lien permanent/$2$3|$1$3]] <small>\'\'\'(lien permanent)\'\'\'</small>' // $1=titre / $2=oldid / $3=ancre |
|||
} |
|||
} |
|||
}, |
|||
'add-diff-avec-texte-selection': |
|||
{ |
|||
label: 'Ajouter [[Spécial:Diff/|texte]] où texte est le texte séléctionné.', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/5/57/Farm-Fresh_greeting_line.png/22px-Farm-Fresh_greeting_line.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '[[Spécial:Diff/XXX|', |
|||
peri: '', |
|||
post: ']]' |
|||
} |
|||
} |
|||
}, |
|||
'unité-add-formatnum': |
|||
{ |
|||
label: 'Ajouter modèle {{formatnum:}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/41/Farm-Fresh_coin_stack_gold.png/22px-Farm-Fresh_coin_stack_gold.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{formatnum:', |
|||
peri: '', |
|||
post: '}}', |
|||
regex: /(^|[^-{}:|0-9.,])(?:(?:(\d{1,3})(?: |\u00A0| |')?)?(\d{1,3})(?: |\u00A0| |')?)?(\d{1,3}(?:[.,]\d{1,3})?)/g, |
|||
regexReplace: '$1{{formatnum:$2$3$4}}' |
|||
} |
|||
} |
|||
}, |
|||
'unité-add': |
|||
{ |
|||
label: 'Ajouter modèle {{unité}} sans partie décimale.', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/f/f7/Farm-Fresh_coins_add.png/22px-Farm-Fresh_coins_add.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{unité|', |
|||
peri: '', |
|||
post: '|}}', |
|||
regex: /(?:\{\{[Ff]ormatnum:|\{\{[Uu]nité\|)?(?:(?:(\d{1,3})(?: |\u00A0| |')?)?(\d{1,3})(?: |\u00A0| |')?)?(\d{3})\|?\}?\}? (\b[^ ,.;:\[\]\{\}|\n()-]+\b|\[\[[^\[\]]+\]\])/g, |
|||
regexReplace: '{{unité|$1$2$3|$4}}' |
|||
} |
|||
} |
|||
}, |
|||
'unité-add-dot': |
|||
{ |
|||
label: 'Ajouter modèle {{unité}} avec partie décimale.', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/6/66/Farm-Fresh_finance.png/22px-Farm-Fresh_finance.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{unité|', |
|||
peri: '', |
|||
post: '|}}', |
|||
regex: /(?:\{\{[Ff]ormatnum:|\{\{[Uu]nité\|)?(?:(?:(\d{1,3})(?: |\u00A0| |')?)?(\d{1,3})(?: |\u00A0| |')?)?(\d{1,3})[.,](\d{1,3})\|?\}?\}? (\b[^ ,.;:\[\]\{\}|\n()-]+(?:s|aux|eaux)\b|\[\[[^\[\]]+\]\])/g, |
|||
regexReplace: '{{unité|$1$2$3.$4|$5}}' |
|||
} |
|||
} |
|||
}, |
|||
'unité-remove': |
|||
{ |
|||
label: 'Supprimer modèle {{unité}} ou {{formatnum:}} (prendre une espace à la fin dans la sélection en cas de modèles {{unité}})', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/d/d6/Farm-Fresh_coins_delete.png/22px-Farm-Fresh_coins_delete.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: '', |
|||
post: '', |
|||
regex: /(?:\{\{[Ff]ormatnum:([0-9.,]+)\|?\}\}|\{\{[Uu]nité\|([0-9.,]+)\|([^{}]+)?\|?\}\}([^{}]*( ))?)/g, |
|||
regexReplace: '$1$2$5$3$4' // $1/$2=nombre; $3=unité; $4=post-unité; $5=espace (si capturé) |
|||
} |
|||
} |
|||
}, |
|||
'comment-html': |
|||
{ |
|||
label: 'Commentaire HTML', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/2/26/Farm-Fresh_tag_hash.png/22px-Farm-Fresh_tag_hash.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '<!-- ', |
|||
peri: '', |
|||
post: ' -->' |
|||
} |
|||
} |
|||
}, |
|||
'pages-liées': |
|||
{ |
|||
label: '[[Spécial:Pages liées/]]', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/0a/Farm-Fresh_shortcuts.png/22px-Farm-Fresh_shortcuts.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '[[Spécial:Pages liées/PAGE|', |
|||
peri: 'texte', |
|||
post: ']]' |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} ); |
|||
$('#wpTextbox1').wikiEditor( 'addToToolbar', |
|||
{ |
|||
section: 'tables', |
|||
group: 'basic', |
|||
'tools': |
|||
{ |
|||
'caption': |
|||
{ |
|||
label: 'Ajouter titre de tableau (caption)', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/f/f4/Farm-Fresh_query_make_table.png/22px-Farm-Fresh_query_make_table.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '|+ ', |
|||
peri: '', |
|||
post: '', |
|||
regex: /^ *(.+) *$/, |
|||
regexReplace: '|+ $1', |
|||
ownline: true |
|||
} |
|||
} |
|||
}, |
|||
'scope=col': |
|||
{ |
|||
label: 'Ajouter scope="col"', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/6/69/Farm-Fresh_imex_run_import.png/22px-Farm-Fresh_imex_run_import.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '! scope="col" | ', |
|||
peri: 'texte en-tête de colonne', |
|||
post: '', |
|||
regex: /^[!|] *(?:([^\[\]{}|!\n]+ ?) *?\|(?!\|))? *(''')?(.+)\2/gm, |
|||
regexReplace: '! scope="col" $1| $3' |
|||
} |
|||
} |
|||
}, |
|||
'scope=row': |
|||
{ |
|||
label: 'Ajouter scope="row"', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/e/eb/Farm-Fresh_imex_run_export.png/22px-Farm-Fresh_imex_run_export.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '! scope="row" | ', |
|||
peri: 'texte en-tête de ligne', |
|||
post: '', |
|||
regex: /^[!|] *(?:([^\[\]{}|!\n]+ ?) *?\|(?!\|))? *(''')?(.+?)\2 *(?:\|(\|.+)(\n)|$)/gm, /* La dernière partie "(?:\|(\|.+)(\n)|$)" permet de gérer les cas où plusieurs cellules sont sur la même ligne, car cela nécéssite de casser la ligne au niveau du "||" ; en bricolant avec des captures optionelles de retours à la ligne, on arrive gérer ce cas en renvoyant sur une nouvelle ligne les autres cellules, tout en ajoutant pas de nouvelle ligne si il n'y a pas d'autres cellules */ |
|||
regexReplace: '! scope="row" $1| $3$5$4$5' |
|||
} |
|||
} |
|||
}, |
|||
'multiligne-to-uniligne': |
|||
{ |
|||
label: 'Mettre les cellules sur une seule ligne', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Farm-Fresh_consolidate.png/22px-Farm-Fresh_consolidate.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: '', |
|||
post: '', |
|||
regex: /^(\|-[^\n]*)\n([!|])(?:\2)?(?![|!+-\}])( *)([^\n]*)(?:\n(\2)(?:\2)?(?![|!+-\}])( *)([^\n]*)(?:\n(\2)(?:\2)?(?![|!+-\}])( *)([^\n]*)(?:\n(\2)(?:\2)?(?![|!+-\}])( *)([^\n]*)(?:\n(\2)(?:\2)?(?![|!+-\}])( *)([^\n]*)(?:\n(\2)(?:\2)?(?![|!+-\}])( *)([^\n]*)(?:\n(\2)(?:\2)?(?![|!+-\}])( *)([^\n]*)(?:\n(\2)(?:\2)?(?![|!+-\}])( *)([^\n]*)(?:\n(\2)(?:\2)?(?![|!+-\}])( *)([^\n]*)(?:\n(\2)(?:\2)?(?![|!+-\}])( *)([^\n]*))?)?)?)?)?)?)?)?)?/gm, |
|||
regexReplace: '$1\n$2$3$4$6$5$5$6$7$9$8$8$9$10$12$11$11$12$13$15$14$14$15$16$18$17$17$18$19$21$20$20$21$22$24$23$23$24$25$27$26$26$27$28$30$29$29$30$31' |
|||
} |
|||
} |
|||
}, |
|||
'uniligne-to-multiligne': |
|||
{ |
|||
label: 'Mettre une cellule par ligne', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/3/33/Farm-Fresh_table_chart.png/22px-Farm-Fresh_table_chart.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: '', |
|||
post: '', |
|||
regex: / *([|!])\1 */g, |
|||
regexReplace: '\n$1 ' |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} ); |
|||
$('#wpTextbox1').wikiEditor( 'addToToolbar', |
|||
{ |
|||
section: 'tables', |
|||
group: 'style', |
|||
'tools': |
|||
{ |
|||
'style-width2width': |
|||
{ |
|||
label: 'Ajouter/convertir width vers propriété CSS width:', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/2/21/Farm-Fresh_merge_cells.png/22px-Farm-Fresh_merge_cells.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: 'style="width:100%;"', |
|||
post: '', |
|||
regex: /width=\"?(\d+(?:px|%))\"?/g, |
|||
regexReplace: 'style="width:$1;"' |
|||
} |
|||
} |
|||
}, |
|||
'style-align2text-align': |
|||
{ |
|||
label: 'Ajouter/convertir align vers propriété CSS text-align:', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/f/f2/Farm-Fresh_table_select_row.png/22px-Farm-Fresh_table_select_row.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: 'style="text-align:center;"', |
|||
post: '', |
|||
regex: /align=\"?(left|center|right|justify)\"?/g, |
|||
regexReplace: 'style="text-align:$1;"' |
|||
} |
|||
} |
|||
}, |
|||
'style-bgcolor2background': |
|||
{ |
|||
label: 'Ajouter/convertir bgcolor vers propriété CSS background:', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/8/8f/Farm-Fresh_table_heatmap_cell.png/22px-Farm-Fresh_table_heatmap_cell.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: 'style="background:XXX;"', |
|||
post: '', |
|||
regex: /bgcolor=\"?([a-zA-Z]+|#[0-9A-Fa-f]+)\"?/g, |
|||
regexReplace: 'style="background:$1;"' |
|||
} |
|||
} |
|||
}, |
|||
'style-fusion-styles': |
|||
{ |
|||
label: 'Fusionner les différents attributs style=""', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/f/f4/Farm-Fresh_query_design.png/22px-Farm-Fresh_query_design.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: '', |
|||
post: '', |
|||
regex: / *style=\"([^\"|!\n]+)\"([^|!\n]*?) *style=\"([^\"|!\n]+)\"/g, |
|||
regexReplace: '$2 style="$1 $3"' |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} ); |
|||
$('#wpTextbox1').wikiEditor( 'addToToolbar', |
|||
{ |
|||
section: 'divers', |
|||
group: 'liens', |
|||
'tools': |
|||
{ |
|||
'menu-liens': |
|||
{ |
|||
label: 'Liens', |
|||
type: 'select', |
|||
list: |
|||
{ |
|||
'Aide:Modèle': { |
|||
label: 'Aide:Modèle', |
|||
action: { |
|||
type: 'encapsulate', |
|||
options: { pre:'[[Aide:Modèle|', peri:'modèle', post:']]' }}}, |
|||
'Aide:TemplateData:': { |
|||
label: 'Aide:TemplateData', |
|||
action: { |
|||
type: 'encapsulate', |
|||
options: { pre:'[[Aide:TemplateData|', peri:'modèle', post:']]' }}} |
|||
} |
|||
} |
|||
} |
|||
} ); |
|||
$('#wpTextbox1').wikiEditor( 'addToToolbar', |
|||
{ |
|||
section: 'divers', |
|||
group: 'basic', |
|||
'tools': |
|||
{ |
|||
'phab-open': |
|||
{ |
|||
label: 'Lien Phabricator', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/f/f7/Farm-Fresh_bug.png/22px-Farm-Fresh_bug.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{phab|', |
|||
peri: '', |
|||
post: '}}' |
|||
} |
|||
} |
|||
}, |
|||
'phab-duplicate': |
|||
{ |
|||
label: 'Phabricator - doublon', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/4f/Farm-Fresh_bug_go.png/22px-Farm-Fresh_bug_go.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Phab|', |
|||
peri: '', |
|||
post: '|duplicate|}}', |
|||
regex: /\{\{[Pp]hab\|T?(\d+)\}\}/, |
|||
regexReplace: '{{Phab|T$1|duplicate|NUMBER}}' |
|||
} |
|||
} |
|||
}, |
|||
'phab-invalid': |
|||
{ |
|||
label: 'Phabricator - invalid', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/9/9b/Farm-Fresh_bug_delete.png/22px-Farm-Fresh_bug_delete.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Phab|', |
|||
peri: '', |
|||
post: '|invalid}}', |
|||
regex: /\{\{[Pp]hab\|T?(\d+)\}\}/, |
|||
regexReplace: '{{Phab|T$1|invalid}}' |
|||
} |
|||
} |
|||
}, |
|||
'phab-wontfix': |
|||
{ |
|||
label: 'Phabricator - wontfix', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Farm-Fresh_bug_error.png/22px-Farm-Fresh_bug_error.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Phab|', |
|||
peri: '', |
|||
post: '|wontfix}}', |
|||
regex: /\{\{[Pp]hab\|T?(\d+)\}\}/, |
|||
regexReplace: '{{Phab|T$1|wontfix}}' |
|||
} |
|||
} |
|||
}, |
|||
'phab-fixed': |
|||
{ |
|||
label: 'Phabricator - fixed', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/45/Farm-Fresh_bug_fixing.png/22px-Farm-Fresh_bug_fixing.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Phab|', |
|||
peri: '', |
|||
post: '|fixed}}', |
|||
regex: /\{\{[Pp]hab\|T?(\d+)\}\}/, |
|||
regexReplace: '{{Phab|T$1|fixed}}' |
|||
} |
|||
} |
|||
}, |
|||
'talkback': |
|||
{ |
|||
label: 'Message {{Talkback}} pour réponse ailleurs', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/9/9c/Farm-Fresh_email_to_friend.png/22px-Farm-Fresh_email_to_friend.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Talkback|', |
|||
peri: 'Tractopelle-jaune', |
|||
post: '|section}}', |
|||
regex: /(?:\[\[)?(?:[Dd]iscussion [Uu]tilisat(?:eur|rice):)?([^\[\]#|{}]+)(?:#([^\[\]#|{}]+))?(?:\|[^\[\]]+)?(?:\]\])?/, |
|||
regexReplace: '{{Talkback|$1|$2}}' |
|||
} |
|||
} |
|||
}, |
|||
} |
|||
} ); |
|||
$('#wpTextbox1').wikiEditor( 'addToToolbar', |
|||
{ |
|||
section: 'divers', |
|||
group: 'navbox', |
|||
'tools': |
|||
{ |
|||
'navbox-liste-horizontale': |
|||
{ |
|||
label: 'Ajouter {{Liste horizontale}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Farm-Fresh_layer_import.png/22px-Farm-Fresh_layer_import.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Liste horizontale|\n* ', |
|||
peri: '', |
|||
post: '\n}}' |
|||
} |
|||
} |
|||
}, |
|||
'navbox-liste-horizontale-puces-del': |
|||
{ |
|||
label: 'Retirer un niveau de puces * ou #', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Farm-Fresh_layer_delete.png/22px-Farm-Fresh_layer_delete.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: '', |
|||
post: '', |
|||
regex: /^([*#]+)[*#]/mg, |
|||
regexReplace: '$1' |
|||
} |
|||
} |
|||
}, |
|||
'navbox-liste-horizontale-puces-add': |
|||
{ |
|||
label: 'Ajouter un niveau de puces * ou #', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/bf/Farm-Fresh_layer_add.png/22px-Farm-Fresh_layer_add.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: '', |
|||
post: '', |
|||
regex: /^([*#])/mg, |
|||
regexReplace: '$1$1' |
|||
} |
|||
} |
|||
}, |
|||
'navbox-add-navbox-sub-group': |
|||
{ |
|||
label: 'Ajouter {{Méta palette de navigation sous-groupe}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/1/1a/Farm-Fresh_layer_group.png/22px-Farm-Fresh_layer_group.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Méta palette de navigation sous-groupe\n | groupe1 = \n | liste1 = \n\n | groupe2 = \n | liste2 = ', |
|||
peri: '', |
|||
post: '\n}}' |
|||
} |
|||
} |
|||
}, |
|||
'navbox-refs-add-section': |
|||
{ |
|||
label: 'Ajouter un groupe de notes', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/1/15/Farm-Fresh_layer_his.png/22px-Farm-Fresh_layer_his.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Références|références=\n<ref name="XXX">', |
|||
peri: '', |
|||
post: '</ref>\n}}' |
|||
} |
|||
} |
|||
}, |
|||
'navbox-refs-add-note': |
|||
{ |
|||
label: 'Ajouter une note', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/75/Farm-Fresh_layer_command.png/22px-Farm-Fresh_layer_command.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '<ref name="XXX">', |
|||
peri: '', |
|||
post: '</ref>' |
|||
} |
|||
} |
|||
}, |
|||
'navbox-refs-add-renvoi': |
|||
{ |
|||
label: 'Ajouter un renvoi', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/e/e2/Farm-Fresh_next_footnote.png/22px-Farm-Fresh_next_footnote.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '<ref name="', |
|||
peri: 'XXX', |
|||
post: '" />' |
|||
} |
|||
} |
|||
}, |
|||
'navbox-refs-add-style-list': |
|||
{ |
|||
label: 'Ajouter la propriété CSS "list-style:inside;"', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/5/5a/Farm-Fresh_draw_path.png/22px-Farm-Fresh_draw_path.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: 'list-style:inside;', |
|||
peri: '', |
|||
post: '' |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} ); |
|||
$('#wpTextbox1').wikiEditor( 'addToToolbar', |
|||
{ |
|||
section: 'votes', |
|||
group: 'vote', |
|||
'tools': |
|||
{ |
|||
'pour': |
|||
{ |
|||
label: '{{Pour}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/9/94/Symbol_support_vote.svg/22px-Symbol_support_vote.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Pour}}' |
|||
} |
|||
} |
|||
}, |
|||
'plutôt pour': |
|||
{ |
|||
label: '{{Plutôt pour}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/c/cc/Pictogram_partialy_voting_support.svg/22px-Pictogram_partialy_voting_support.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Plutôt pour}}' |
|||
} |
|||
} |
|||
}, |
|||
'pour fort': |
|||
{ |
|||
label: '{{Pour fort}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Fairytale_button_add.svg/22px-Fairytale_button_add.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Pour fort}}' |
|||
} |
|||
} |
|||
}, |
|||
'contre': |
|||
{ |
|||
label: '{{Contre}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/7f/Symbol_oppose_vote.svg/22px-Symbol_oppose_vote.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Contre}}' |
|||
} |
|||
} |
|||
}, |
|||
'plutôt contre': |
|||
{ |
|||
label: '{{Plutôt contre}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/f/f5/BA_candidate.svg/22px-BA_candidate.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Plutôt contre}}' |
|||
} |
|||
} |
|||
}, |
|||
'contre fort': |
|||
{ |
|||
label: '{{Contre fort}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/e/e6/Fairytale_button_cancel.svg/22px-Fairytale_button_cancel.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Contre fort}}' |
|||
} |
|||
} |
|||
}, |
|||
'neutre': |
|||
{ |
|||
label: '{{Neutre}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/8/89/Symbol_neutral_vote.svg/22px-Symbol_neutral_vote.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Neutre}}' |
|||
} |
|||
} |
|||
}, |
|||
'plutôt neutre': |
|||
{ |
|||
label: '{{Plutôt neutre}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Symbol_partially_neutral_vote.svg/22px-Symbol_partially_neutral_vote.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Plutôt neutre}}' |
|||
} |
|||
} |
|||
}, |
|||
'neutre fort': |
|||
{ |
|||
label: '{{Neutre fort}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Symbol_neutral_vote_black.svg/22px-Symbol_neutral_vote_black.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Neutre fort}}' |
|||
} |
|||
} |
|||
}, |
|||
'fusionner': |
|||
{ |
|||
label: '{{Fusionner}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Symbol_merge_vote.svg/22px-Symbol_merge_vote.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Fusionner}}' |
|||
} |
|||
} |
|||
}, |
|||
'renommer': |
|||
{ |
|||
label: '{{Renommer}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/0a/Symbol_rename_vote.svg/22px-Symbol_rename_vote.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Renommer}}' |
|||
} |
|||
} |
|||
}, |
|||
'rediriger': |
|||
{ |
|||
label: '{{Rediriger}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/0c/Symbol_redirect_vote.svg/22px-Symbol_redirect_vote.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Rediriger}}' |
|||
} |
|||
} |
|||
}, |
|||
'attendre': |
|||
{ |
|||
label: '{{Attendre}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/3/31/Symbol_wait_vote.svg/22px-Symbol_wait_vote.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Attendre}}' |
|||
} |
|||
} |
|||
}, |
|||
'réticence': |
|||
{ |
|||
label: '{{Réticence}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Symbol_comment_vote.svg/22px-Symbol_comment_vote.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Réticence}}' |
|||
} |
|||
} |
|||
}, |
|||
'sursis': |
|||
{ |
|||
label: '{{Sursis}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Symbol_opinion_vote.svg/22px-Symbol_opinion_vote.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Sursis}}' |
|||
} |
|||
} |
|||
}, |
|||
'recycler': |
|||
{ |
|||
label: '{{Recycler}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Symbol_recycling_vote.svg/22px-Symbol_recycling_vote.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Recycler}}' |
|||
} |
|||
} |
|||
}, |
|||
'vote article de qualité': |
|||
{ |
|||
label: '{{Vote article de qualité}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/e/e7/Symbol_kept_vote.svg/22px-Symbol_kept_vote.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Vote article de qualité}}' |
|||
} |
|||
} |
|||
}, |
|||
'vote bon article': |
|||
{ |
|||
label: '{{Vote bon article}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/d/d0/Symbol_keep_vote.svg/22px-Symbol_keep_vote.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Vote bon article}}' |
|||
} |
|||
} |
|||
}, |
|||
'remarque': |
|||
{ |
|||
label: '{{Remarque}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a6/Pictogram_voting_comment.svg/22px-Pictogram_voting_comment.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Remarque}}' |
|||
} |
|||
} |
|||
}, |
|||
} |
|||
} ); |
|||
$('#wpTextbox1').wikiEditor( 'addToToolbar', |
|||
{ |
|||
section: 'votes', |
|||
group: 'PàS', |
|||
'tools': |
|||
{ |
|||
'conserver': |
|||
{ |
|||
label: '{{Conserver}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/9/94/Symbol_support_vote.svg/22px-Symbol_support_vote.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Conserver}}' |
|||
} |
|||
} |
|||
}, |
|||
'plutôt conserver': |
|||
{ |
|||
label: '{{Plutôt conserver}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/c/cc/Pictogram_partialy_voting_support.svg/22px-Pictogram_partialy_voting_support.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Plutôt conserver}}' |
|||
} |
|||
} |
|||
}, |
|||
'conservation immédiate': |
|||
{ |
|||
label: '{{Conservation immédiate}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Fairytale_button_add.svg/22px-Fairytale_button_add.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Conservation immédiate}}' |
|||
} |
|||
} |
|||
}, |
|||
'supprimer': |
|||
{ |
|||
label: '{{Supprimer}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/7f/Symbol_oppose_vote.svg/22px-Symbol_oppose_vote.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Supprimer}}' |
|||
} |
|||
} |
|||
}, |
|||
'plutôt supprimer': |
|||
{ |
|||
label: '{{Plutôt supprimer}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/f/f5/BA_candidate.svg/22px-BA_candidate.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Plutôt supprimer}}' |
|||
} |
|||
} |
|||
}, |
|||
'suppression immédiate': |
|||
{ |
|||
label: '{{Suppression immédiate}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/e/e6/Fairytale_button_cancel.svg/22px-Fairytale_button_cancel.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Suppression immédiate}}' |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} ); |
|||
$('#wpTextbox1').wikiEditor( 'addToToolbar', |
|||
{ |
|||
section: 'votes', |
|||
group: 'autre', |
|||
'tools': |
|||
{ |
|||
'faire': |
|||
{ |
|||
label: '{{Faire}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/be/Nuvola_clipboard_lined.svg/22px-Nuvola_clipboard_lined.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Faire}}' |
|||
} |
|||
} |
|||
}, |
|||
'terminé': |
|||
{ |
|||
label: '{{Terminé|texte}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/22px-Yes_check.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Terminé|', |
|||
peri: 'texte', |
|||
post: '}}' |
|||
} |
|||
} |
|||
}, |
|||
'corrigé': |
|||
{ |
|||
label: '{{Corrigé|diff}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/22px-Yes_check.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Corrigé|', |
|||
peri: 'diff', |
|||
post: '}}' |
|||
} |
|||
} |
|||
}, |
|||
'en cours': |
|||
{ |
|||
label: '{{En cours.|texte}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/f/f6/VLC.svg/22px-VLC.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{En cours.|', |
|||
peri: 'texte', |
|||
post: '}}' |
|||
} |
|||
} |
|||
}, |
|||
'non': |
|||
{ |
|||
label: '{{Non.|texte}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Black_x.svg/22px-Black_x.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Non.|', |
|||
peri: 'texte', |
|||
post: '}}' |
|||
} |
|||
} |
|||
}, |
|||
'pas fait': |
|||
{ |
|||
label: '{{Pas fait.|texte}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a2/X_mark.svg/22px-X_mark.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Pas fait.|', |
|||
peri: 'texte', |
|||
post: '}}' |
|||
} |
|||
} |
|||
}, |
|||
'bug!': |
|||
{ |
|||
label: '{{Bug!}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Nuvola_apps_bug.png/22px-Nuvola_apps_bug.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Bug!}}' |
|||
} |
|||
} |
|||
}, |
|||
'pour info': |
|||
{ |
|||
label: '{{Pour info}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Messagebox_info.svg/22px-Messagebox_info.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Pour info}}' |
|||
} |
|||
} |
|||
}, |
|||
'go': |
|||
{ |
|||
label: '{{Go}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/4e/Start_hand.svg/22px-Start_hand.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Go}}' |
|||
} |
|||
} |
|||
}, |
|||
'pause': |
|||
{ |
|||
label: '{{Pause}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/5/57/Stop_hand_nuvola_yellow.svg/22px-Stop_hand_nuvola_yellow.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Pause}}' |
|||
} |
|||
} |
|||
}, |
|||
'stop': |
|||
{ |
|||
label: '{{Stop}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Stop_hand.svg/22px-Stop_hand.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Stop}}' |
|||
} |
|||
} |
|||
}, |
|||
} |
|||
} ); |
|||
$('#wpTextbox1').wikiEditor( 'addToToolbar', |
|||
{ |
|||
section: 'votes', |
|||
group: 'actions', |
|||
'tools': |
|||
{ |
|||
'avis-déplacé': |
|||
{ |
|||
label: '{{Avis déplacé}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/6/65/Farm-Fresh_view_relayers.png/22px-Farm-Fresh_view_relayers.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{subst:Avis déplacé|motif=}}' |
|||
} |
|||
} |
|||
}, |
|||
'discussion-transfert-vers': |
|||
{ |
|||
label: '{{Discussion transférée vers|page}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/3/30/Wmerge3.svg/22px-Wmerge3.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Discussion transférée vers|', |
|||
peri: 'page', |
|||
post: '}}' |
|||
} |
|||
} |
|||
}, |
|||
'discussion-transfert-depuis': |
|||
{ |
|||
label: '{{Discussion transférée depuis|page}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/3/30/Wmerge3.svg/22px-Wmerge3.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Discussion transférée depuis|', |
|||
peri: 'page', |
|||
post: '}}' |
|||
} |
|||
} |
|||
}, |
|||
} |
|||
} ); |
|||
$('#wpTextbox1').wikiEditor( 'addToToolbar', |
|||
{ |
|||
section: 'smileys', |
|||
group: 'basic', |
|||
'tools': |
|||
{ |
|||
'smiley-???': |
|||
{ |
|||
label: '{{???}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a8/Puzzled.svg/22px-Puzzled.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{???}}' } |
|||
} |
|||
}, |
|||
'smiley-ange': |
|||
{ |
|||
label: '{{Ange}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Face-angel.svg/22px-Face-angel.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Ange}}' } |
|||
} |
|||
}, |
|||
'smiley-bisou': |
|||
{ |
|||
label: '{{Bisou}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a8/Face-kiss.svg/22px-Face-kiss.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Bisou}}' } |
|||
} |
|||
}, |
|||
'smiley-clin': |
|||
{ |
|||
label: '{{Clin}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/5/57/Face-wink.svg/22px-Face-wink.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Clin}}' } |
|||
} |
|||
}, |
|||
'smiley-cool': |
|||
{ |
|||
label: '{{Cool}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/b9/Emblem-cool.svg/22px-Emblem-cool.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Cool}}' } |
|||
} |
|||
}, |
|||
'smiley-cqfd': |
|||
{ |
|||
label: '{{CQFD}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/0f/Face-glasses.svg/22px-Face-glasses.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{CQFD}}' } |
|||
} |
|||
}, |
|||
'smiley-espiegle': |
|||
{ |
|||
label: '{{Espiègle}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Face-espiegle.svg/22px-Face-espiegle.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Espiègle}}' } |
|||
} |
|||
}, |
|||
'smiley-fier': |
|||
{ |
|||
label: '{{Fier}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/1/15/Face-smile-big.svg/22px-Face-smile-big.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Fier}}' } |
|||
} |
|||
}, |
|||
'smiley-grr': |
|||
{ |
|||
label: '{{Grr}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/5/5c/Angry.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Grr}}' } |
|||
} |
|||
}, |
|||
'smiley-oups': |
|||
{ |
|||
label: '{{Oups}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Face-blush.svg/22px-Face-blush.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Oups}}' } |
|||
} |
|||
}, |
|||
'smiley-drole': |
|||
{ |
|||
label: '{{Drôle}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Face-grin.svg/22px-Face-grin.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Drôle}}' } |
|||
} |
|||
}, |
|||
'smiley-^^': |
|||
{ |
|||
label: '{{^^}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/2/24/Im-yahoo.svg/22px-Im-yahoo.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{^^}}' } |
|||
} |
|||
}, |
|||
'smiley-boulet': |
|||
{ |
|||
label: '{{Boulet}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/c/c6/Face-badtooth.svg/22px-Face-badtooth.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Boulet}}' } |
|||
} |
|||
}, |
|||
'smiley-malin': |
|||
{ |
|||
label: '{{Malin}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/70/Face-devil-grin.svg/22px-Face-devil-grin.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Malin}}' } |
|||
} |
|||
}, |
|||
'smiley-pleure': |
|||
{ |
|||
label: '{{Pleure}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Face-crying.svg/22px-Face-crying.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Pleure}}' } |
|||
} |
|||
}, |
|||
'smiley-sourire': |
|||
{ |
|||
label: '{{Sourire}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/79/Face-smile.svg/22px-Face-smile.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Sourire}}' } |
|||
} |
|||
}, |
|||
'smiley-surprise': |
|||
{ |
|||
label: '{{Surprise}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/79/Face-surprise.svg/22px-Face-surprise.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Surprise}}' } |
|||
} |
|||
}, |
|||
'smiley-tire-langue': |
|||
{ |
|||
label: '{{Tire langue}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/c/c4/Tongue.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Tire langue}}' } |
|||
} |
|||
}, |
|||
'smiley-triste': |
|||
{ |
|||
label: '{{Triste}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/06/Face-sad.svg/22px-Face-sad.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Triste}}' } |
|||
} |
|||
}, |
|||
'smiley-bof': |
|||
{ |
|||
label: '{{Bof}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Face-plain.svg/22px-Face-plain.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Bof}}' } |
|||
} |
|||
}, |
|||
'smiley-expert': |
|||
{ |
|||
label: '{{Expert}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/03/Face-grin_expert.svg/22px-Face-grin_expert.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Expert}}' } |
|||
} |
|||
}, |
|||
'smiley-=/': |
|||
{ |
|||
label: '{{=/}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/f/fe/Gnome-face-uncertain.svg/22px-Gnome-face-uncertain.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{=/}}' } |
|||
} |
|||
}, |
|||
'smiley-hum': |
|||
{ |
|||
label: '{{Hum}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/2/26/Aliensmiley.svg/22px-Aliensmiley.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Hum}}' } |
|||
} |
|||
}, |
|||
'smiley-ampoule': |
|||
{ |
|||
label: '{{Ampoule}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Lightbulb.png/22px-Lightbulb.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Ampoule}}' } |
|||
} |
|||
}, |
|||
'smiley-amour': |
|||
{ |
|||
label: '{{Amour}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/c/cd/Nuvola_emblem-favorite.svg/22px-Nuvola_emblem-favorite.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Amour}}' } |
|||
} |
|||
}, |
|||
'smiley-marronnier': |
|||
{ |
|||
label: '{{Smiley marronnier}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/3/39/Horse-chestnut_fruit.svg/22px-Horse-chestnut_fruit.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Smiley marronnier}}' } |
|||
} |
|||
}, |
|||
'smiley-bravo': |
|||
{ |
|||
label: '{{Bravo}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/1/1f/SMirC-thumbsup.svg/22px-SMirC-thumbsup.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Bravo}}' } |
|||
} |
|||
}, |
|||
'smiley-yeux': |
|||
{ |
|||
label: '{{Yeux}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/aa/SMirC-puppyeyes.svg/22px-SMirC-puppyeyes.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Yeux}}' } |
|||
} |
|||
}, |
|||
'smiley-beurk': |
|||
{ |
|||
label: '{{Beurk}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/5/56/SMirC-puke.svg/22px-SMirC-puke.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Beurk}}' } |
|||
} |
|||
}, |
|||
'smiley-sifflote': |
|||
{ |
|||
label: '{{Sifflote}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/3/30/Sifflote.png/22px-Sifflote.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Sifflote}}' } |
|||
} |
|||
}, |
|||
'smiley-applau': |
|||
{ |
|||
label: '{{Applau}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/7/76/Applau.gif', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Applau}}' } |
|||
} |
|||
}, |
|||
'smiley-troll3': |
|||
{ |
|||
label: '{{Troll3}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/8/8d/Crystal_Clear_troll_dots.png/22px-Crystal_Clear_troll_dots.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Troll3}}' } |
|||
} |
|||
}, |
|||
'smiley-dans-le-mur': |
|||
{ |
|||
label: '{{Dans le mur}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/6/60/Wall25.gif', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Dans le mur}}' } |
|||
} |
|||
}, |
|||
'smiley-hic': |
|||
{ |
|||
label: '{{Hic}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/8/83/Drinking-smiley-Sunglass.gif', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Hic}}' } |
|||
} |
|||
}, |
|||
'smiley-gnii': |
|||
{ |
|||
label: '{{Gnii}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/d/da/Roto.svg/22px-Roto.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Gnii}}' } |
|||
} |
|||
}, |
|||
'smiley-injure': |
|||
{ |
|||
label: '{{Injure}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/2/22/PissedOff.gif', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Injure}}' } |
|||
} |
|||
}, |
|||
'smiley-nimporte quoi': |
|||
{ |
|||
label: '{{N\'importe quoi}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/d/d3/Notpayingattention.gif', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{N\'importe quoi}}' } |
|||
} |
|||
}, |
|||
'smiley-ah-ah': |
|||
{ |
|||
label: '{{Ah Ah}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/8/8f/Rolling_on_the_floor.gif', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Ah Ah}}' } |
|||
} |
|||
}, |
|||
'smiley-2-cents': |
|||
{ |
|||
label: '{{2 cents}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/9/98/Coin_Icon.svg/22px-Coin_Icon.svg.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{2 cents}}' } |
|||
} |
|||
}, |
|||
'smiley-fiesta': |
|||
{ |
|||
label: '{{Fiesta}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Partyhat_icone.png/22px-Partyhat_icone.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Fiesta}}' } |
|||
} |
|||
}, |
|||
'smiley-désespoir': |
|||
{ |
|||
label: '{{Désespoir}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/7/75/Smiley_emoticons_doh.gif', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '{{Désespoir}}' } |
|||
} |
|||
}, |
|||
'menu-test': |
|||
{ |
|||
label: 'Menu test 4', |
|||
type: 'select', |
|||
list: |
|||
{ |
|||
'menu-1': |
|||
{ |
|||
label: 'MENU 1', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'test-menu-1' } |
|||
} |
|||
}, |
|||
'menu-2': |
|||
{ |
|||
label: 'MENU 2', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'test-menu-2' } |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} ); |
|||
$('#wpTextbox1').wikiEditor( 'addToToolbar', |
|||
{ |
|||
section: 'vandalisme', |
|||
group: 'faux-nez', |
|||
'tools': |
|||
{ |
|||
'faux-nez-récurrents': |
|||
{ |
|||
label: 'WP:Faux-nez', |
|||
type: 'select', |
|||
list: |
|||
{ |
|||
'Ilyanael': |
|||
{ |
|||
label: 'WP:Faux-nez/Ilyanael', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '[[Wikipédia:Faux-nez/Ilyanael]]' } |
|||
} |
|||
}, |
|||
'Vandale TFO': |
|||
{ |
|||
label: 'WP:Faux-nez/Vandale TFO', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '[[Wikipédia:Faux-nez/Vandale TFO]]' } |
|||
} |
|||
}, |
|||
'Vandale TV 2000': |
|||
{ |
|||
label: 'WP:Faux-nez/Vandale TV 2000', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '[[Wikipédia:Faux-nez/Vandale TV 2000]]' } |
|||
} |
|||
}, |
|||
'Vandale UICN': |
|||
{ |
|||
label: 'WP:Faux-nez/Vandale UICN', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '[[Wikipédia:Faux-nez/Vandale UICN]]' } |
|||
} |
|||
}, |
|||
'Olha': |
|||
{ |
|||
label: 'WP:Faux-nez/Olha', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '[[Wikipédia:Faux-nez/Olha]]' } |
|||
} |
|||
}, |
|||
'Joseph kargbo 1': |
|||
{ |
|||
label: 'WP:Faux-nez/Joseph kargbo 1', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '[[Wikipédia:Faux-nez/Joseph kargbo 1]]' } |
|||
} |
|||
}, |
|||
'Jonathan Ebubu': |
|||
{ |
|||
label: 'WP:Faux-nez/Jonathan Ebubu [capture 10]', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '[[Wikipédia:Faux-nez/Jonathan Ebubu]]' } |
|||
} |
|||
}, |
|||
'TheCharizard31': |
|||
{ |
|||
label: 'WP:Faux-nez/TheCharizard31', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: '[[Wikipédia:Faux-nez/TheCharizard31]]' } |
|||
} |
|||
}, |
|||
} |
|||
}, |
|||
'liste-ip': |
|||
{ |
|||
label: 'Ajouter {{IP|...}} à toutes les adresses IP selectionnées', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/5/5a/Farm-Fresh_group_add.png/22px-Farm-Fresh_group_add.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{IP|', |
|||
peri: '', |
|||
post: '}}', |
|||
regex: /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(?:\/\d+)?|[0-9A-F]{1,4}:[0-9A-F]{1,4}:[0-9A-F]{1,4}:[0-9A-F]{1,4}:[:0-9A-F]+(?:\/\d+)?)/ig, |
|||
regexReplace: '{{IP|$1}}' |
|||
} |
|||
} |
|||
}, |
|||
'liste-user': |
|||
{ |
|||
label: 'Ajouter {{ELFN|...}} autour du nom d\'utilisateur séléctionné', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Farm-Fresh_group_key.png/22px-Farm-Fresh_group_key.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{ELFN|', |
|||
peri: '', |
|||
post: '||}}' |
|||
} |
|||
} |
|||
}, |
|||
'VEC-parse-pages': |
|||
{ |
|||
label: 'Transforme en une liste d\'articles séparées par des virgiules une liste de modification récupérées depuis la liste des contributions', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/5/5a/Farm-Fresh_legend.png/22px-Farm-Fresh_legend.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: '', |
|||
post: '', |
|||
regex: /\s*!? *\d+ (?:janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre) \d{4} à \d\d:\d\d \(diff \| hist\)[ .]+\([-+0-9 ]+\)\u200E[. ]+(?:[mr]{1,2} |N )?((?:(?:Catégorie|Fichier)(:))?[^\n\[\]]+?)(?: \. \. \u200E[^\n]+)? \u200E[^\n]*(?:\n|$)/g, |
|||
regexReplace: ' [[$2$1]],' |
|||
} |
|||
} |
|||
}, |
|||
'VEC-parse-pages-doublons': |
|||
{ |
|||
label: 'Supprime les doublons dans une liste d\'articles', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Farm-Fresh_data_validation.png/22px-Farm-Fresh_data_validation.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '', |
|||
peri: '', |
|||
post: '', |
|||
regex: /(\[\[[^\[\]|\n]+\]\]), (?=[^\n]*\1)/g, |
|||
regexReplace: '' |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} ); |
|||
$('#wpTextbox1').wikiEditor( 'addToToolbar', |
|||
{ |
|||
section: 'vandalisme', |
|||
group: 'CSI', |
|||
'tools': |
|||
{ |
|||
'demande-SI': |
|||
{ |
|||
label: 'Demande de suppression immédiate {{SI|...}}', |
|||
type: 'button', |
|||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/2/2a/Farm-Fresh_cross_shield.png/22px-Farm-Fresh_cross_shield.png', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{SI|', |
|||
peri: '', |
|||
post: '|{{u\'|Tractopelle-jaune}}}}\n\n' |
|||
} |
|||
} |
|||
}, |
|||
'criteres-SI': |
|||
{ |
|||
label: 'Critères SI', |
|||
type: 'select', |
|||
list: |
|||
{ |
|||
'G1': |
|||
{ |
|||
label: 'G1 - Page manifestement aberrante', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'G1 - Page manifestement aberrante' } |
|||
} |
|||
}, |
|||
'G2': |
|||
{ |
|||
label: 'G2 - « Bac à sable »', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'G2 - « Bac à sable »' } |
|||
} |
|||
}, |
|||
'G3': |
|||
{ |
|||
label: 'G3 - Vandalisme ou canular manifeste', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'G3 - Vandalisme ou canular manifeste' } |
|||
} |
|||
}, |
|||
'G4': |
|||
{ |
|||
label: 'G4 - Recréation d\'une page supprimée par décision PàS', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'G4 - Recréation d\'une page supprimée par décision PàS' } |
|||
} |
|||
}, |
|||
'G5': |
|||
{ |
|||
label: 'G5 - Page créée par un contributeur banni ou bloqué', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'G5 - Page créée par un contributeur banni ou bloqué' } |
|||
} |
|||
}, |
|||
'G6': |
|||
{ |
|||
label: 'G6 - Suppression technique', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'G6 - Suppression technique' } |
|||
} |
|||
}, |
|||
'G7': |
|||
{ |
|||
label: 'G7 - Suppression à la demande de l\'auteur', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'G7 - Suppression à la demande de l\'auteur' } |
|||
} |
|||
}, |
|||
'G8': |
|||
{ |
|||
label: 'G8 - Page liée à une page inexistante ou supprimée', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'G8 - Page liée à une page inexistante ou supprimée' } |
|||
} |
|||
}, |
|||
'G10': |
|||
{ |
|||
label: 'G10 - Page dont le seul but est de diffamer, menacer, intimider ou harceler leur sujet, ou une quelconque autre entité', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'G10 - Page dont le seul but est de diffamer, menacer, intimider ou harceler leur sujet, ou une quelconque autre entité' } |
|||
} |
|||
}, |
|||
'G11': |
|||
{ |
|||
label: 'G11 - Publicité ou promotion manifeste', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'G11 - Publicité ou promotion manifeste' } |
|||
} |
|||
}, |
|||
'G12': |
|||
{ |
|||
label: 'G12 - Violation manifeste des droits d\'auteur', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'G12 - Violation manifeste des droits d\'auteur' } |
|||
} |
|||
}, |
|||
'A1': |
|||
{ |
|||
label: 'A1 - Article sans sujet clair', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'A1 - Article sans sujet clair' } |
|||
} |
|||
}, |
|||
'A2': |
|||
{ |
|||
label: 'A2 - Article en langue étrangère', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'A2 - Article en langue étrangère' } |
|||
} |
|||
}, |
|||
'A3': |
|||
{ |
|||
label: 'A3 - Article sans contenu', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'A3 - Article sans contenu' } |
|||
} |
|||
}, |
|||
'A10': |
|||
{ |
|||
label: 'A10 - Article récemment créé qui doublonne un article existant', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'A10 - Article récemment créé qui doublonne un article existant' } |
|||
} |
|||
}, |
|||
'A11': |
|||
{ |
|||
label: 'A11 - Article ne répondant pas aux critères d\'admissibilité', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'A11 - Article ne répondant pas aux critères d\'admissibilité' } |
|||
} |
|||
}, |
|||
'A12': |
|||
{ |
|||
label: 'A12 - Travail inédit manifeste', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'A12 - Travail inédit manifeste' } |
|||
} |
|||
}, |
|||
'R1': |
|||
{ |
|||
label: 'R1 - Redirection inappropriée, peu pertinente, voire incongrue', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'R1 - Redirection inappropriée, peu pertinente, voire incongrue' } |
|||
} |
|||
}, |
|||
'R2': |
|||
{ |
|||
label: 'R2 - Redirection renvoyant de l\'espace encyclopédique vers un autre espace de nom', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'R2 - Redirection renvoyant de l\'espace encyclopédique vers un autre espace de nom' } |
|||
} |
|||
}, |
|||
'R3': |
|||
{ |
|||
label: 'R3 - Graphie improbable', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'R3 - Graphie improbable' } |
|||
} |
|||
}, |
|||
'F1': |
|||
{ |
|||
label: 'F1 - Fichier redondant', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'F1 - Fichier redondant' } |
|||
} |
|||
}, |
|||
'F2': |
|||
{ |
|||
label: 'F2 - Fichier image corrompu ou vide', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'F2 - Fichier image corrompu ou vide' } |
|||
} |
|||
}, |
|||
'F9': |
|||
{ |
|||
label: 'F9 - Violation manifeste de copyright', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'F9 - Violation manifeste de copyright' } |
|||
} |
|||
}, |
|||
'U1': |
|||
{ |
|||
label: 'U2 - Utilisateur inexistant', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'U2 - Utilisateur inexistant' } |
|||
} |
|||
}, |
|||
'M3': |
|||
{ |
|||
label: 'M3 - Modèle sans intérêt ou doublonnant des modèles existants', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: { pre: 'M3 - Modèle sans intérêt ou doublonnant des modèles existants' } |
|||
} |
|||
}, |
|||
} |
|||
} |
|||
} |
|||
} ); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', |
|||
{ |
|||
'sections': |
|||
{ |
|||
'snippets': |
|||
{ |
|||
type: 'booklet', |
|||
label: 'Menu autres', |
|||
pages: |
|||
{ |
|||
'section-lang': |
|||
{ |
|||
label: '{{Lang}}', |
|||
layout: 'characters', |
|||
characters: |
|||
[ |
|||
{ |
|||
label: '{{lang|en}}', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{lang|en|', |
|||
peri: '', |
|||
post: '}}' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '{{lang|de}}', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{lang|de|', |
|||
peri: '', |
|||
post: '}}' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '{{lang|it}}', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{lang|it|', |
|||
peri: '', |
|||
post: '}}' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '{{lang|..}}', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{lang||', |
|||
peri: '', |
|||
post: '}}' |
|||
} |
|||
} |
|||
} |
|||
] |
|||
}, |
|||
'magic-words': |
|||
{ |
|||
label: 'Mots magiques', |
|||
layout: 'characters', |
|||
characters: |
|||
[ |
|||
{ |
|||
label: '{{fullurl:}}', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '[{{fullurl:', |
|||
peri: '', |
|||
post: '|}} texte]' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '{{fullurl:Spécial:Recherche/}}', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '[{{fullurl:Spécial:Recherche|search=', |
|||
peri: '', |
|||
post: '&fulltext=1}} texte]' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '{{fullurl:Spécial:Recherche/{{urlencode:}}}}', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ //</nowiki> |
|||
pre: '[{{fullurl:Spécial:Recherche|search={{urlencode:', |
|||
peri: '', |
|||
post: '}}&fulltext=1}} <nowiki>texte</nowiki>]' |
|||
} //<nowiki> |
|||
} |
|||
} |
|||
] |
|||
}, |
|||
'section-vide': |
|||
{ |
|||
label: 'vide', |
|||
layout: 'characters', |
|||
characters: |
|||
[ |
|||
{ |
|||
label: '[[Category:]]', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '[[Category:', |
|||
peri: '', |
|||
post: ']]' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '[[File:]]', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '[[File:', |
|||
peri: '', |
|||
post: ']]' |
|||
} |
|||
} |
|||
} |
|||
] |
|||
}, |
|||
'code-source': |
|||
{ |
|||
label: 'Code source', |
|||
layout: 'characters', |
|||
characters: |
|||
[ |
|||
{ |
|||
label: '<syntaxhighlight lang="xxx">', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '<syntaxhighlight lang="xxx">\n', |
|||
peri: '', |
|||
post: '\n</syntaxhighlight>', |
|||
regex: /(?:<code><nowiki>|<code>|<pre>)([\D\d]+?)(?:<\/pre>|<\/nowiki><\/code>|<\/code>)/g, |
|||
regexReplace: '<syntaxhighlight lang="xxx">\n$1\n</syntaxhighlight>' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '<syntaxhighlight lang="xxx" inline>', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '<syntaxhighlight lang="xxx" inline>', |
|||
peri: '', |
|||
post: '</syntaxhighlight>', |
|||
regex: /(?:<code><nowiki>|<code>|<pre>)([\D\d]+?)(?:<\/pre>|<\/nowiki><\/code>|<\/code>)/g, |
|||
regexReplace: '<syntaxhighlight lang="xxx" inline>$1</syntaxhighlight>' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '<syntaxhighlight lang="xxx" line>', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '<syntaxhighlight lang="xxx" line>\n', |
|||
peri: '', |
|||
post: '\n</syntaxhighlight>', |
|||
regex: /(?:<code><nowiki>|<code>|<pre>)([\D\d]+?)(?:<\/pre>|<\/nowiki><\/code>|<\/code>)/g, |
|||
regexReplace: '<syntaxhighlight lang="xxx" line>\n$1\n</syntaxhighlight>' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '<syntaxhighlight lang="xxx" highlight="">', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '<syntaxhighlight lang="xxx" highlight="x,x-x">\n', |
|||
peri: '', |
|||
post: '\n</syntaxhighlight>', |
|||
regex: /(?:<code><nowiki>|<code>|<pre>)([\D\d]+?)(?:<\/pre>|<\/nowiki><\/code>|<\/code>)/g, |
|||
regexReplace: '<syntaxhighlight lang="xxx" highlight="">\n$1\n</syntaxhighlight>' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '<syntaxhighlight lang="xxx" line start="x">', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '<syntaxhighlight lang="xxx" line start="x">\n', |
|||
peri: '', |
|||
post: '\n</syntaxhighlight>', |
|||
regex: /(?:<code><nowiki>|<code>|<pre>)([\D\d]+?)(?:<\/pre>|<\/nowiki><\/code>|<\/code>)/g, |
|||
regexReplace: '<syntaxhighlight lang="xxx" line start="x">\n$1\n</syntaxhighlight>' |
|||
} |
|||
} |
|||
}, |
|||
] |
|||
}, |
|||
'légendes-colonnes': |
|||
{ |
|||
label: 'Légendes / Colonnes', |
|||
layout: 'characters', |
|||
characters: |
|||
[ |
|||
{ |
|||
label: '{{Légende/Début}}', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Légende/Début}}', |
|||
peri: '', |
|||
post: '' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '{{Légende}}', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Légende|COULEUR|', |
|||
peri: 'TEXTE', |
|||
post: '}}', |
|||
regex: /^ *\{\{(?:Color[ _]?box|Carré couleur)\|([a-z]+|#[0-9A-F]+)(?:\|+border=(?:[a-z]+|#[0-9A-F]+))?\}\} *(.*?) *(\n|$)/gi, /*{{Color box|#ccccff||border=darkgray}} Catégories non-olympiques*/ |
|||
regexReplace: '{{Légende|$1|$2}}$3' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '{{Légende/Fin}}', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Légende/Fin}}', |
|||
peri: '', |
|||
post: '' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '{{Carré couleur}}', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{carré couleur|', |
|||
peri: 'COULEUR', |
|||
post: '}} ', |
|||
regex: /\{\{Légende\|([a-z]+|#[0-9A-F]+)\|([^\n]+)\}\}/gi, |
|||
regexReplace: '{{carré couleur|$1}} $2' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '{{Début de colonnes}}', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Début de colonnes|taille=', |
|||
peri: '20', |
|||
post: '}}' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '{{Fin de colonnes}}', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Fin de colonnes}}', |
|||
peri: '', |
|||
post: '' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '{{Début de bloc solidaire}}', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Début de bloc solidaire}}', |
|||
peri: '', |
|||
post: '' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '{{Fin de bloc solidaire}}', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Fin de bloc solidaire}}', |
|||
peri: '', |
|||
post: '' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '{{Boîte déroulante/début}}', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Boîte déroulante/début|titre=', |
|||
peri: 'XXX', |
|||
post: '}}' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '{{Boîte déroulante/fin}}', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Boîte déroulante/fin}}', |
|||
peri: '', |
|||
post: '' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '{{Boîte déroulante/début+fin}}', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '{{Boîte déroulante/début|titre=XXX}}\n', |
|||
peri: '', |
|||
post: '\n{{Boîte déroulante/fin}}' |
|||
} |
|||
} |
|||
} |
|||
] |
|||
}, |
|||
'section-palettes': |
|||
{ |
|||
label: 'Palettes', |
|||
layout: 'characters', |
|||
characters: |
|||
[ |
|||
'{{Méta palette de navigation sous-groupe', |
|||
'{{Méta palette de navigation sous-liste', |
|||
'{{Liste éléments', |
|||
'{{Liste horizontale|', |
|||
'{{Liste verticale-horizontale|' |
|||
] |
|||
}, |
|||
'section-xml': |
|||
{ |
|||
label: 'XML Tags', |
|||
layout: 'characters', |
|||
characters: |
|||
[ |
|||
'<references/>', |
|||
{ |
|||
label: '<ref></ref>', |
|||
action: |
|||
{ |
|||
type: 'encapsulate', |
|||
options: |
|||
{ |
|||
pre: '<ref>', |
|||
peri: '', |
|||
post: '</ref>' |
|||
} |
|||
} |
|||
} |
|||
] |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} ); |
|||
}; |
|||
//</nowiki> |
Version du 19 avril 2022 à 17:06
//<nowiki>
/* Boutons supplémentaires pour la barre d'outils WikiEditor (barre d'outils par défaut) */
// [[mw:Extension:WikiEditor/Toolbar customization]]
// Boutons supplémentaires
$(function() { $('#wpTextbox1').wikiEditor('addToToolbar',
{
section: 'tracto-tools',
type: 'toolbar',
groups: 'code',
label: 'Code',
tools: { //</nowiki>
'code-add-code': {
type: 'button',
label: 'Ajouter balises <code></code>',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/45/Farm-Fresh_script_code.png/22px-Farm-Fresh_script_code.png',
action: {
type: 'encapsulate',
options: {
pre: '<code>',
peri: '',
post: '</code>'
}}},
'code-add-code-with-id': {
type: 'button',
label: 'Ajouter balises <code id=""></code> avec l\'id contenant le texte séléctionné',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/9/9b/Farm-Fresh_script_go.png/22px-Farm-Fresh_script_go.png',
action: {
type: 'encapsulate',
options: {
pre: '<code id="param-xxx">',
peri: '',
post: '</code>',
regex: /(?:<code>|\'{2,5}|\"|^( *))([^<>|{}\[\]#]+?)(?:<\/code>|\'{2,5}|\"|( *)$)/g,
regexReplace: '$1<code id="param-$2">$2</code>$3'
}}},
'code-add-code-with-link-id': {
type: 'button',
label: 'Ajouter balises <code>[[#param-xxx|...]]</code> avec lien vers le paramètre séléctionné',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/6/68/Farm-Fresh_script_link.png/22px-Farm-Fresh_script_link.png',
action: {
type: 'encapsulate',
options: {
pre: '<code>[[#param-xxx|',
peri: '',
post: ']]</code>',
regex: /(?:<code>|\'{2,5}|\"|^( *))([^<>|{}\[\]#]+?)(?:<\/code>|\'{2,5}|\"|( *)$)/g,
regexReplace: '$1<code>[[#param-$2|$2]]</code>$3'
}}},
'code-add-magic-word': {
label: 'Ajout balises code + lien vers Aide:Mot magique',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/6/61/Farm-Fresh_script_palette.png/22px-Farm-Fresh_script_palette.png',
action: {
type: 'encapsulate',
options: {
pre: '<code>[[Aide:Mot magique#XXX|<nowiki>',
peri: 'XXX',
post: '</nowiki>]]</code>',
/* 1 2 3 4 5 6 7 8 9 10 11 12 */
regex: /(?:<code>(?:<nowiki>)?|^( *))(?:(__)([A-Z]+)(__)|(\{\{)([A-Za-z0-9 _!]+):?(\}\})|(\{\{)m\|([A-Za-z0-9 _!]+)(\}\})|([A-Za-z0-9 _!]+):?)(?:(?:<\/nowiki>)?<\/code>|( *)$)/g,
regexReplace: '$1<code>[[Aide:Mot magique#$3$6$9$11|<nowiki>$2$3$4$5$6$7$8$9$10$11</nowiki>]]</code>$12'
}}},
'code-add-code+nowiki': {
type: 'button',
label: 'Ajouter balises <code><nowiki></nowiki></code>',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/ac/Farm-Fresh_script_visual_studio.png/22px-Farm-Fresh_script_visual_studio.png',
action: {
type: 'encapsulate',
options: {
pre: '<code><nowiki>',
peri: '',
post: '</nowiki></code>'
}}},
'code-add-nowiki': {
type: 'button',
label: 'Ajouter balises <nowiki></nowiki>',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Farm-Fresh_script_code_red.png/22px-Farm-Fresh_script_code_red.png',
action: {
type: 'encapsulate',
options: {
pre: '<nowiki>',
peri: '',
post: '</nowiki>'
}}},
'code-decode': {
type: 'button',
label: 'De-code',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/8/87/Farm-Fresh_script_delete.png/22px-Farm-Fresh_script_delete.png',
action: {
type: 'replace',
options: {
pre: '',
peri: '',
post: '',
regex: /(?:<code>|<nowiki>)+(.+?)(?:<\/nowiki>|<\/code>)+/g,
regexReplace: '$1'
}}},
'code-apos2code': {
type: 'button',
label: 'Remplacer \'\'\'texte\'\'\' par <code>texte</code>',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/be/Farm-Fresh_script_flash.png/22px-Farm-Fresh_script_flash.png',
action: {
type: 'encapsulate',
options: {
pre: '<code>',
peri: '',
post: '</code>',
regex: /(?:\'{2,5}(?:<code>)?(.+?)(?:<\/code>)?\'{2,5}|« *(?:<code>)?([^«»\n]+?)(?:<\/code>)? *»|\" *(?:<code>)?([^«»\n]+?)(?:<\/code>)? *\")/g,
regexReplace: '<code>$1$2$3</code>'
}}},
'code-code2definitionList': {
type: 'button',
label: 'Remplacer "* \'\'\'<code>param</code>\'\'\' : " par "; <code>param</code> : " sur toutes les lignes sélectionnées',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/8/89/Farm-Fresh_macro_show_all_actions.png/22px-Farm-Fresh_macro_show_all_actions.png',
action: {
type: 'encapsulate',
options: {
pre: '; <code>',
peri: '',
post: '</code> : ',
regex: /^[*;]+ *(?:\'{2,5} *([^<>=\n;*]+?) *(?:[:=—–] *| +- +)?\'{2,5} *(?:[:=—–] *| +- +)?|(?:\'{2,5})?<code>((?:<nowiki>)?[^<>=\n;*]+?(?:<\/nowiki>)?)<\/code>(?:\'{2,5})? *(?:[:=—–] *| +- +)?|([^<>:=\n—–;*]+?) *[:=—–] *| +- +)/mg,
regexReplace: '; <code>$1$2$3</code> : '
}}}
} //<nowiki>
}); });