User:Vive la Rosière/common.js

// Edition buttons (thank you JackPotte) $(function { if (['edit', 'submit'].indexOf(mw.config.get('wgAction')) == -1)    return;  $.each([ // Format : apply to each buttons // [   //   'Text to insert before the selection', 'Text to insert after the selection', //  'Button's image (after « commons/ »)', //  'Text that appears in the tooltip when the button is browsed', //  'Image identifier ; low importance, but we must be sure that the identifier is unique, don't change and don't use nor space nor specials characters' // ],

[     "\n==French==\n\n===Etymology===\nFrom .\nFrom .\n\n===Pronunciation===\n* \n* Homophones: \\n:* \n\n===NounAdjectiveAdverbVerb===\n\'\'\'\'\'\'\\n\n# \\n#* \n\n====Usage notes====\n====Synonyms====\n====Antonyms====\n====Derived terms====\n====References====\n====External links====\n===Anagrams===", "",     "a/ae/Button_fr.png", "French", ""   ],

[     "\n==English==\n\n===Etymology===\nFrom .\n\n===Pronunciation===\n* \n* Homophones: \\n:* \n\n===NounAdjectiveAdverbVerb===\n\'\'\'\'\'\'\\n\n# \\n#* \n\n====Usage notes====\n====Synonyms====\n====Antonyms====\n====Derived terms====\n====Translations====\n====References====\n====External links====\n===Anagrams===", "",     "3/3f/Button_en.png", "English", ""   ],

[     "\n==Tahitian==\n\n===Etymology===\nFrom .\n\n==NounAdjectiveAdverbVerb==\n\'\'\'\'\'\'\n\n# \\n#*  — Author, [\], date\n\n====Usage notes====\n====Synonyms====\n====Antonyms====\n====Derived terms====\n====References====\n* \n* ", "",     "d/db/Flag_of_French_Polynesia.svg", "Tahitian", ""   ],

[     "…",      "",      "5/50/Button_hellip.png", "Points de suspension", ""   ],

[     "« ",      " »",      "2/29/Button_double_angle_quotes_with_ellipsis.png", "Guillemets", ""   ],

[     " ",      "",      "6/64/Button_nbsp_bold.png", " ",     ""    ],

[     "É", "",     "e/ea/Button_É.PNG", "É majuscule", ""   ],

[     "Ç", "",     "5/50/InicialÇ.svg", "Ç majuscule", ""   ],

[     "Æ", "æ", "1/1a/Unicode_æ.svg", "Æ minuscule/majuscule", ""   ],

[     "Œ", "œ", "1/1e/Button_API_œ.png", "Œ minuscule/majuscule", ""   ],

[     "Ā", "ā", "d/d0/Ā_button.png", "Ā minuscule/majuscule", ""   ],

[     "Ē", "ē", "8/84/Ē_button.png", "Ē minuscule/majuscule", ""   ],

[     "Ī", "ī", "2/29/Ī_button.png", "Ī minuscule/majuscule", ""   ],

[     "Ō", "ō", "6/66/Ō_button.png", "Ō minuscule/majuscule", ""   ],

[     "Ū", "ū", "8/85/Ū_button.png", "Ū minuscule/majuscule", ""   ],

[     "ſ", "",     "1/12/Round_s_and_long_s.jpg", "S long", ""   ],

[     "—",      "",      "d/dd/Dash.svg", "Tiret cadratin", ""   ],

[     " ",      "",      "6/64/Button_nbsp_bold.png", " ",     ""    ],

[     "",      "f/fe/Circle_sign_1.svg", "Sense", ""   ],

[     "",      "e/e0/Circle_sign_2.svg", "Qualifier", ""   ],

[     "",      "0/04/Circle_sign_3.svg", "Context", ""   ],

[     " ",      " ",      "5/58/Button_small.png", "Petit", ""   ],

[     " ",      " ",      "3/30/Btn_toolbar_rayer.png", "Rayer", ""   ],

[     "#REDIRECT ",      "", "e/e6/Redirect_arrow.png", "Redirection", ""   ],

], function(_, button) { mw.toolbar.addButton('//upload.wikimedia.org/wikipedia/commons/' + button[2], button[3], button[0], button[1], (button[0] ? button[4] : ''), 'mw-editbutton-' + button[4]); }); });