Difference between revisions of "MediaWiki:Common.js"

From GATE
 
(35 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
/* Any JavaScript here will be loaded for all users on every page load. */
 
/* Any JavaScript here will be loaded for all users on every page load. */
 +
 +
if (mw.config.get('wgNamespaceNumber')==6 && mw.config.get('wgAction')=='view') {
 +
mw.loader.load('//tools.wmflabs.org/imagemapedit/ime.js');
 +
}
 
var customizeToolbar = function () {
 
var customizeToolbar = function () {
 
$('#wpTextbox1').wikiEditor('addToToolbar', {
 
$('#wpTextbox1').wikiEditor('addToToolbar', {
Line 44: Line 48:
 
label: 'Head: "the <head> element is used to identify a heading prefixed to the start of any textual division, at any level" (TEI P5).',
 
label: 'Head: "the <head> element is used to identify a heading prefixed to the start of any textual division, at any level" (TEI P5).',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/d/db/TEI_Head22px.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/d/db/TEI_Head22px.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
Line 63: Line 67:
 
label: 'Paragraph: the <p> tag "marks paragraphs in prose" (TEI P5)',
 
label: 'Paragraph: the <p> tag "marks paragraphs in prose" (TEI P5)',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/b/b3/TEI_P22px.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/b/b3/TEI_P22px.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
Line 82: Line 86:
 
label: 'Line break: "<lb> (line break) marks the start of a new (typographic) line in some edition or version of a text" (TEI P5).',
 
label: 'Line break: "<lb> (line break) marks the start of a new (typographic) line in some edition or version of a text" (TEI P5).',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/1/1b/TEI_Lb22px.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/1/1b/TEI_Lb22px.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
Line 101: Line 105:
 
label: 'Page break: "<pb> (page break) marks the start of a new page in a paginated document" (TEI P5).',
 
label: 'Page break: "<pb> (page break) marks the start of a new page in a paginated document" (TEI P5).',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/2/28/TEI_Pb22px.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/2/28/TEI_Pb22px.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
Line 120: Line 124:
 
label: 'Abbreviation: "<abbr> (abbreviation) contains an abbreviation of any sort." (TEI P5).',
 
label: 'Abbreviation: "<abbr> (abbreviation) contains an abbreviation of any sort." (TEI P5).',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/f/f7/TEI_Abbr22px.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/f/f7/TEI_Abbr22px.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
 
options: {
 
options: {
pre: '<abbr>',
+
pre: '<span class="abbreviation" style="text-decoration: underline dotted" title="">',
post: "</abbr>"
+
post: "</span>"
 
}
 
}
 
}
 
}
Line 139: Line 143:
 
label: 'Addition: "<add> (addition) contains letters, words, or phrases inserted in the source text by an author, scribe, or a previous annotator or corrector" (TEI P5).',
 
label: 'Addition: "<add> (addition) contains letters, words, or phrases inserted in the source text by an author, scribe, or a previous annotator or corrector" (TEI P5).',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/0/09/TEI_Add22px.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/0/09/TEI_Add22px.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
Line 158: Line 162:
 
label: 'Deletion: "<del> (deletion) contains a letter, word, or passage deleted, marked as deleted, or otherwise indicated as superfluous or spurious in the copy text by an author, scribe, or a previous annotator or corrector" (TEI P5).',
 
label: 'Deletion: "<del> (deletion) contains a letter, word, or passage deleted, marked as deleted, or otherwise indicated as superfluous or spurious in the copy text by an author, scribe, or a previous annotator or corrector" (TEI P5).',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/b/bb/TEI_Del22px.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/b/bb/TEI_Del22px.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
Line 177: Line 181:
 
label: 'Gap: "<gap> indicates a point where material has been omitted in a transcription, whether for editorial reasons described in the TEI header, as part of sampling practice, or because the material is illegible, invisible, or inaudible" (TEI P5).',
 
label: 'Gap: "<gap> indicates a point where material has been omitted in a transcription, whether for editorial reasons described in the TEI header, as part of sampling practice, or because the material is illegible, invisible, or inaudible" (TEI P5).',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/3/3e/TEI_Gap22px.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/3/3e/TEI_Gap22px.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
Line 196: Line 200:
 
label: 'Unclear: "<unclear> contains a word, phrase, or passage which cannot be transcribed with certainty because it is illegible or inaudible in the source" (TEI P5).',
 
label: 'Unclear: "<unclear> contains a word, phrase, or passage which cannot be transcribed with certainty because it is illegible or inaudible in the source" (TEI P5).',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/c/c7/TEI_Unclear22px.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/c/c7/TEI_Unclear22px.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
Line 215: Line 219:
 
label: 'Sic: "<sic> (Latin for thus or so) contains text reproduced although apparently incorrect or inaccurate" (TEI P5).',
 
label: 'Sic: "<sic> (Latin for thus or so) contains text reproduced although apparently incorrect or inaccurate" (TEI P5).',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/9/91/TEI_Sic22px.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/9/91/TEI_Sic22px.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
Line 234: Line 238:
 
label: 'Underline: marks underlined text.',
 
label: 'Underline: marks underlined text.',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/b/b5/TEI_Und22px.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/b/b5/TEI_Und22px.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
Line 253: Line 257:
 
label: 'Superscript: marks a superscripted text.',
 
label: 'Superscript: marks a superscripted text.',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/9/92/TEI_Sup22px.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/9/92/TEI_Sup22px.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
Line 272: Line 276:
 
label: 'Note: "<note> contains a note or annotation" (TEI P5).',
 
label: 'Note: "<note> contains a note or annotation" (TEI P5).',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/f/f1/TEI_Note22px.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/f/f1/TEI_Note22px.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
Line 295: Line 299:
 
         group: 'text',
 
         group: 'text',
 
tools: {
 
tools: {
"jointed": {
+
"red-text": {
label: 'Jointed text',
+
label: 'Red text',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/1/18/Jointed.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/2/26/Red_text_icon.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
 
options: {
 
options: {
pre: '<span title="" style="background:PaleGreen">[[isJointed::',
+
pre: '<span style="color:Red">',
post: "]]</span>"
+
post: "</span>"
 
}
 
}
 
}
 
}
Line 314: Line 318:
 
         group: 'text',
 
         group: 'text',
 
tools: {
 
tools: {
"disjointed": {
+
"blue-text": {
label: 'Disjointed text',
+
label: 'Blue text',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/5/5a/Disjointed.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/d/d8/Blue_text_icon.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
 
options: {
 
options: {
pre: '<span title="" style="background:Gold">[[isDisjointed::',
+
pre: '<span style="color:Blue">',
post: "]]</span>"
+
post: "</span>"
 
}
 
}
 
}
 
}
 
}
 
}
 
}
 
}
});
+
});  
 
$('#wpTextbox1').wikiEditor('addToToolbar', {
 
$('#wpTextbox1').wikiEditor('addToToolbar', {
 
section: 'edition',
 
section: 'edition',
Line 333: Line 337:
 
tools: {
 
tools: {
 
"error": {
 
"error": {
label: 'Grammatical error',
+
label: 'Transcription error',
 
type: 'button',
 
type: 'button',
 
icon: 'https://upload.wikimedia.org/wikipedia/commons/2/23/Toolbar_cross.png',
 
icon: 'https://upload.wikimedia.org/wikipedia/commons/2/23/Toolbar_cross.png',
Line 339: Line 343:
 
type: 'encapsulate',
 
type: 'encapsulate',
 
options: {
 
options: {
pre: '<span title="" style="color:red">ˣ</span>[[isGrammaticalError::',
+
pre: '<span title="" style="background:Gold">[[transcriptionError::',
post: "]]"
+
post: "]]</span>"
 
}
 
}
 
}
 
}
Line 373: Line 377:
 
label: 'Annotate names. Select the text and then click on the button.',
 
label: 'Annotate names. Select the text and then click on the button.',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/5/57/Icon_Users.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/5/57/Icon_Users.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
 
options: {
 
options: {
pre: '[[citesName::',
+
pre: '[[Name::',
 
post: "]]"
 
post: "]]"
 
}
 
}
Line 392: Line 396:
 
label: 'Annotate places. Select the text and then click on the button.',
 
label: 'Annotate places. Select the text and then click on the button.',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/7/76/Icon_Placeholder.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/7/76/Icon_Placeholder.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
 
options: {
 
options: {
pre: '[[citesPlace::',
+
pre: '[[Place::',
 
post: "]]"
 
post: "]]"
 
}
 
}
Line 411: Line 415:
 
label: 'Annotate works. Select the text and then click on the button.',
 
label: 'Annotate works. Select the text and then click on the button.',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/e/e0/Icon_work.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/e/e0/Icon_work.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
 
options: {
 
options: {
pre: '[[citesWork::',
+
pre: '[[Work::',
 
post: "]]"
 
post: "]]"
 
}
 
}
Line 430: Line 434:
 
label: 'Annotate objects. Select the text and then click on the button.',
 
label: 'Annotate objects. Select the text and then click on the button.',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/7/7e/Icon_object.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/7/7e/Icon_object.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
 
options: {
 
options: {
pre: '[[citesObject::',
+
pre: '[[Object::',
 
post: "]]"
 
post: "]]"
 
}
 
}
Line 488: Line 492:
 
tools: {
 
tools: {
 
"term": {
 
"term": {
label: 'Annotate concepts. Select the text and then click on the button.',
+
label: 'Annotate semantic content. Select the text and then click on the button.',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/b/b3/Icon_term.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/b/b3/Icon_term.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
 
options: {
 
options: {
pre: '[[citesConcept::',
+
pre: '[[Semantic content::',
 
post: "]]"
 
post: "]]"
 
}
 
}
Line 509: Line 513:
 
label: 'Annotate languages. Select the text and then click on the button.',
 
label: 'Annotate languages. Select the text and then click on the button.',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/0/05/Icon_language.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/0/05/Icon_language.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
 
options: {
 
options: {
pre: '[[citesLanguage::',
+
pre: '[[Language::',
 
post: "]]"
 
post: "]]"
 
}
 
}
Line 537: Line 541:
 
label: 'Annotate printed marginalia. Select the text and then click on the button. The marginalia will be visualized as footnote.',
 
label: 'Annotate printed marginalia. Select the text and then click on the button. The marginalia will be visualized as footnote.',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/3/3a/Icon_Chat.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/3/3a/Icon_Chat.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
Line 556: Line 560:
 
label: 'Annotate images. Use at the end of the text, as last line.',
 
label: 'Annotate images. Use at the end of the text, as last line.',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/4/46/Icon_Image.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/4/46/Icon_Image.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
Line 568: Line 572:
 
}
 
}
 
});
 
});
 
+
$('#wpTextbox1').wikiEditor('addToToolbar', {
 +
section: 'annotation',
 +
        group: 'other',
 +
tools: {
 +
"alia-manu": {
 +
label: 'Annotate other hands. Select the text and then click on the button. The marginalia will be visualized as footnote.',
 +
type: 'button',
 +
icon: 'https://gate.unigre.it/mediawiki/images/a/a5/Alia_mano_icon.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: "<ref>Alia manu: [[aliaManu::",
 +
post: "]].</ref>"
 +
}
 +
}
 +
}
 +
}
 +
});
 +
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
 +
'sections': {
 +
'symbols': {
 +
'type': 'toolbar', // Can also be 'booklet'
 +
'label': 'Symbols'
 +
// or 'labelMsg': 'section-emoticons-label' for a localized label
 +
}
 +
}
 +
} );
 +
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
 +
section: 'symbols',
 +
groups: {
 +
'zodiac': {
 +
'label': 'Zodiac'
 +
}
 +
}
 +
} );
 +
$('#wpTextbox1').wikiEditor('addToToolbar', {
 +
section: 'symbols',
 +
        group: 'zodiac',
 +
tools: {
 +
"aries": {
 +
label: 'Aries',
 +
type: 'button',
 +
icon: 'https://gate.unigre.it/mediawiki/images/a/a7/Aries-20px.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '[[File:Aries-20px.png]]',
 +
ownline: false
 +
}
 +
}
 +
}
 +
}
 +
});
 +
$('#wpTextbox1').wikiEditor('addToToolbar', {
 +
section: 'symbols',
 +
        group: 'zodiac',
 +
tools: {
 +
"taurus": {
 +
label: 'Taurus',
 +
type: 'button',
 +
icon: 'https://gate.unigre.it/mediawiki/images/6/6c/Taurus-20px.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '[[File:Taurus-20px.png]]',
 +
ownline: false
 +
}
 +
}
 +
}
 +
}
 +
});
 +
$('#wpTextbox1').wikiEditor('addToToolbar', {
 +
section: 'symbols',
 +
        group: 'zodiac',
 +
tools: {
 +
"gemini": {
 +
label: 'Gemini',
 +
type: 'button',
 +
icon: 'https://gate.unigre.it/mediawiki/images/a/ad/Gemini-20px.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '[[File:Gemini-20px.png]]',
 +
ownline: false
 +
}
 +
}
 +
}
 +
}
 +
});
 +
$('#wpTextbox1').wikiEditor('addToToolbar', {
 +
section: 'symbols',
 +
        group: 'zodiac',
 +
tools: {
 +
"cancer": {
 +
label: 'Cancer',
 +
type: 'button',
 +
icon: 'https://gate.unigre.it/mediawiki/images/d/dd/Cancer-20px.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '[[File:Cancer-20px.png]]',
 +
ownline: false
 +
}
 +
}
 +
}
 +
}
 +
});
 +
$('#wpTextbox1').wikiEditor('addToToolbar', {
 +
section: 'symbols',
 +
        group: 'zodiac',
 +
tools: {
 +
"leo": {
 +
label: 'Leo',
 +
type: 'button',
 +
icon: 'https://gate.unigre.it/mediawiki/images/0/0e/Leo-20px.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '[[File:Leo-20px.png]]',
 +
ownline: false
 +
}
 +
}
 +
}
 +
}
 +
});
 +
$('#wpTextbox1').wikiEditor('addToToolbar', {
 +
section: 'symbols',
 +
        group: 'zodiac',
 +
tools: {
 +
"virgo": {
 +
label: 'Virgo',
 +
type: 'button',
 +
icon: 'https://gate.unigre.it/mediawiki/images/d/d9/Virgo-20px.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '[[File:Virgo-20px.png]]',
 +
ownline: false
 +
}
 +
}
 +
}
 +
}
 +
});
 +
$('#wpTextbox1').wikiEditor('addToToolbar', {
 +
section: 'symbols',
 +
        group: 'zodiac',
 +
tools: {
 +
"libra": {
 +
label: 'Libra',
 +
type: 'button',
 +
icon: 'https://gate.unigre.it/mediawiki/images/9/9e/Libra-20px.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '[[File:Libra-20px.png]]',
 +
ownline: false
 +
}
 +
}
 +
}
 +
}
 +
});
 +
$('#wpTextbox1').wikiEditor('addToToolbar', {
 +
section: 'symbols',
 +
        group: 'zodiac',
 +
tools: {
 +
"scorpio": {
 +
label: 'Scorpio',
 +
type: 'button',
 +
icon: 'https://gate.unigre.it/mediawiki/images/f/f9/Scorpio-20px.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '[[File:Scorpio-20px.png]]',
 +
ownline: false
 +
}
 +
}
 +
}
 +
}
 +
});
 +
$('#wpTextbox1').wikiEditor('addToToolbar', {
 +
section: 'symbols',
 +
        group: 'zodiac',
 +
tools: {
 +
"sagittarius": {
 +
label: 'Sagittarius',
 +
type: 'button',
 +
icon: 'https://gate.unigre.it/mediawiki/images/5/57/Sagittarius-20px.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '[[File:Sagittarius-20px.png]]',
 +
ownline: false
 +
}
 +
}
 +
}
 +
}
 +
});
 +
$('#wpTextbox1').wikiEditor('addToToolbar', {
 +
section: 'symbols',
 +
        group: 'zodiac',
 +
tools: {
 +
"capricorn": {
 +
label: 'Capricorn',
 +
type: 'button',
 +
icon: 'https://gate.unigre.it/mediawiki/images/0/04/Capricorn-20px.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '[[File:Capricorn-20px.png]]',
 +
ownline: false
 +
}
 +
}
 +
}
 +
}
 +
});
 +
$('#wpTextbox1').wikiEditor('addToToolbar', {
 +
section: 'symbols',
 +
        group: 'zodiac',
 +
tools: {
 +
"aquarius": {
 +
label: 'Aquarius',
 +
type: 'button',
 +
icon: 'https://gate.unigre.it/mediawiki/images/8/80/Aquarius-20px.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '[[File:Aquarius-20px.png]]',
 +
ownline: false
 +
}
 +
}
 +
}
 +
}
 +
});
 +
$('#wpTextbox1').wikiEditor('addToToolbar', {
 +
section: 'symbols',
 +
        group: 'zodiac',
 +
tools: {
 +
"pisces": {
 +
label: 'Pisces',
 +
type: 'button',
 +
icon: 'https://gate.unigre.it/mediawiki/images/3/36/Pisces-20px.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '[[File:Pisces-20px.png]]',
 +
ownline: false
 +
}
 +
}
 +
}
 +
}
 +
});
  
 
$('#wpTextbox1').wikiEditor('addToToolbar', {
 
$('#wpTextbox1').wikiEditor('addToToolbar', {
Line 583: Line 837:
 
pre: '<center>',
 
pre: '<center>',
 
post: "</center>"
 
post: "</center>"
 +
}
 +
}
 +
}
 +
}
 +
});
 +
$('#wpTextbox1').wikiEditor('addToToolbar', {
 +
section: 'advanced',
 +
        group: 'format',
 +
tools: {
 +
"smallcaps": {
 +
label: 'Small-caps',
 +
type: 'button',
 +
icon: 'https://upload.wikimedia.org/wikipedia/commons/6/6e/Small_caps.svg',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '{{Smallcaps|',
 +
post: "}}"
 
}
 
}
 
}
 
}
Line 592: Line 864:
 
         group: 'insert',
 
         group: 'insert',
 
tools: {
 
tools: {
"center": {
+
"signature": {
 
label: 'Signature',
 
label: 'Signature',
 
type: 'button',
 
type: 'button',
Line 599: Line 871:
 
type: 'encapsulate',
 
type: 'encapsulate',
 
options: {
 
options: {
pre: '-- [[User:ManciniWiki|ManciniWiki]] ([[User talk:ManciniWiki|talk]]) 11:17, 22 December 2017 (CET)',
+
pre: '~~',
ownline: false
+
post: "~~"
 
}
 
}
 
}
 
}
Line 622: Line 894:
 
label: 'Assent',
 
label: 'Assent',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/e/e8/Assent_Annotation_Button_05.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/e/e8/Assent_Annotation_Button_05.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
Line 641: Line 913:
 
label: 'Dissent',
 
label: 'Dissent',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/8/87/Dissent_Annotation_Button.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/8/87/Dissent_Annotation_Button.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
Line 659: Line 931:
 
label: 'Laudation',
 
label: 'Laudation',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/9/94/Laudation_Annotation_Button.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/9/94/Laudation_Annotation_Button.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
Line 677: Line 949:
 
label: 'Question',
 
label: 'Question',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/2/26/Question_Annotation_Button.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/2/26/Question_Annotation_Button.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
Line 695: Line 967:
 
label: 'Recommendation',
 
label: 'Recommendation',
 
type: 'button',
 
type: 'button',
icon: 'http://gate.unigre.it/mediawiki/images/0/0f/Recomendation_Annotation_Button.png',
+
icon: 'https://gate.unigre.it/mediawiki/images/0/0f/Recomendation_Annotation_Button.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
Line 720: Line 992:
 
if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) {
 
if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) {
 
$.when(
 
$.when(
mw.loader.using( 'ext.wikiEditor.toolbar' ), $.ready
+
mw.loader.using( 'ext.wikiEditor' ), $.ready
 
).then( function(){ window.setTimeout(customizeToolbar, 1); } );
 
).then( function(){ window.setTimeout(customizeToolbar, 1); } );
 
}
 
}
 
} );
 
} );
 
}
 
}
 
mw.config.set('wgContentNamespaces', [0,250]);
 

Latest revision as of 15:08, 14 July 2022

/* Any JavaScript here will be loaded for all users on every page load. */

if (mw.config.get('wgNamespaceNumber')==6 && mw.config.get('wgAction')=='view') {
	mw.loader.load('//tools.wmflabs.org/imagemapedit/ime.js');
}
var customizeToolbar = function () {
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'advanced',
	group: 'format',
	tools: {
		"strikethrough": {
			label: 'Strike',
			type: 'button',
			icon: '//upload.wikimedia.org/wikipedia/commons/2/21/OOjs_UI_icon_strikethrough-s.svg',
			action: {
				type: 'encapsulate',
				options: {
					pre: "<s>",
					post: "</s>"
				}
			}
		}
	}
});
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	'sections': {
		'edition': {
			'type': 'toolbar', // Can also be 'booklet'
			'label': 'Edition'
			// or 'labelMsg': 'section-emoticons-label' for a localized label
		}
	}
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'edition',
	groups: {
		'tei': {
			'label': 'TEI'
		}
	}
} );

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'edition',
        group: 'tei',
	tools: {
		"head": {
			label: 'Head: "the <head> element is used to identify a heading prefixed to the start of any textual division, at any level" (TEI P5).',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/d/db/TEI_Head22px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<head>',
					post: "</head>"
				}
			}
		}
	}
});

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'edition',
        group: 'tei',
	tools: {
		"paragraph": {
			label: 'Paragraph: the <p> tag "marks paragraphs in prose" (TEI P5)',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/b/b3/TEI_P22px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<p>',
					post: "</p>"
				}
			}
		}
	}
});

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'edition',
        group: 'tei',
	tools: {
		"lb": {
			label: 'Line break: "<lb> (line break) marks the start of a new (typographic) line in some edition or version of a text" (TEI P5).',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/1/1b/TEI_Lb22px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<lb/>',
					ownline: false
				}
			}
		}
	}
});

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'edition',
        group: 'tei',
	tools: {
		"pb": {
			label: 'Page break: "<pb> (page break) marks the start of a new page in a paginated document" (TEI P5).',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/2/28/TEI_Pb22px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<pb/>',
					ownline: true
				}
			}
		}
	}
});

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'edition',
        group: 'tei',
	tools: {
		"abbreviation": {
			label: 'Abbreviation: "<abbr> (abbreviation) contains an abbreviation of any sort." (TEI P5).',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/f/f7/TEI_Abbr22px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<span class="abbreviation" style="text-decoration: underline dotted" title="">',
					post: "</span>"
				}
			}
		}
	}
});

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'edition',
        group: 'tei',
	tools: {
		"add": {
			label: 'Addition: "<add> (addition) contains letters, words, or phrases inserted in the source text by an author, scribe, or a previous annotator or corrector" (TEI P5).',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/0/09/TEI_Add22px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<add>',
					post: "</add>"
				}
			}
		}
	}
});

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'edition',
        group: 'tei',
	tools: {
		"del": {
			label: 'Deletion: "<del> (deletion) contains a letter, word, or passage deleted, marked as deleted, or otherwise indicated as superfluous or spurious in the copy text by an author, scribe, or a previous annotator or corrector" (TEI P5).',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/b/bb/TEI_Del22px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<del>',
					post: "</del>"
				}
			}
		}
	}
});

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'edition',
        group: 'tei',
	tools: {
		"gap": {
			label: 'Gap: "<gap> indicates a point where material has been omitted in a transcription, whether for editorial reasons described in the TEI header, as part of sampling practice, or because the material is illegible, invisible, or inaudible" (TEI P5).',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/3/3e/TEI_Gap22px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<gap/>',
					ownline: false
				}
			}
		}
	}
});

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'edition',
        group: 'tei',
	tools: {
		"unclear": {
			label: 'Unclear: "<unclear> contains a word, phrase, or passage which cannot be transcribed with certainty because it is illegible or inaudible in the source" (TEI P5).',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/c/c7/TEI_Unclear22px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<unclear>',
					post: "</unclear>"
				}
			}
		}
	}
});

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'edition',
        group: 'tei',
	tools: {
		"sic": {
			label: 'Sic: "<sic> (Latin for thus or so) contains text reproduced although apparently incorrect or inaccurate" (TEI P5).',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/9/91/TEI_Sic22px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<sic>',
					post: "</sic>"
				}
			}
		}
	}
});

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'edition',
        group: 'tei',
	tools: {
		"underline": {
			label: 'Underline: marks underlined text.',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/b/b5/TEI_Und22px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<hi rend="underline">',
					post: "</hi>"
				}
			}
		}
	}
});

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'edition',
        group: 'tei',
	tools: {
		"superscript": {
			label: 'Superscript: marks a superscripted text.',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/9/92/TEI_Sup22px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<hi rend="superscript">',
					post: "</hi>"
				}
			}
		}
	}
});

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'edition',
        group: 'tei',
	tools: {
		"note": {
			label: 'Note: "<note> contains a note or annotation" (TEI P5).',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/f/f1/TEI_Note22px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<note>',
					post: "</note>"
				}
			}
		}
	}
});
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'edition',
	groups: {
		'text': {
			'label': 'Text'
		}
	}
} );
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'edition',
        group: 'text',
	tools: {
		"red-text": {
			label: 'Red text',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/2/26/Red_text_icon.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<span style="color:Red">',
					post: "</span>"
				}
			}
		}
	}
});

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'edition',
        group: 'text',
	tools: {
		"blue-text": {
			label: 'Blue text',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/d/d8/Blue_text_icon.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<span style="color:Blue">',
					post: "</span>"
				}
			}
		}
	}
}); 
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'edition',
        group: 'text',
	tools: {
		"error": {
			label: 'Transcription error',
			type: 'button',
			icon: 'https://upload.wikimedia.org/wikipedia/commons/2/23/Toolbar_cross.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<span title="" style="background:Gold">[[transcriptionError::',
					post: "]]</span>"
				}
			}
		}
	}
});

$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	'sections': {
		'annotation': {
			'type': 'toolbar', // Can also be 'booklet'
			'label': 'Annotation'
			// or 'labelMsg': 'section-emoticons-label' for a localized label
		}
	}
} );

$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'annotation',
	groups: {
		'entities': {
			'label': 'Entities'
		}
	}
} );

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'annotation',
        group: 'entities',
	tools: {
		"name": {
			label: 'Annotate names. Select the text and then click on the button.',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/5/57/Icon_Users.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '[[Name::',
					post: "]]"
				}
			}
		}
	}
});

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'annotation',
        group: 'entities',
	tools: {
		"place": {
			label: 'Annotate places. Select the text and then click on the button.',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/7/76/Icon_Placeholder.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '[[Place::',
					post: "]]"
				}
			}
		}
	}
});

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'annotation',
        group: 'entities',
	tools: {
		"work": {
			label: 'Annotate works. Select the text and then click on the button.',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/e/e0/Icon_work.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '[[Work::',
					post: "]]"
				}
			}
		}
	}
});

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'annotation',
        group: 'entities',
	tools: {
		"object": {
			label: 'Annotate objects. Select the text and then click on the button.',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/7/7e/Icon_object.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '[[Object::',
					post: "]]"
				}
			}
		}
	}
});
/*
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'annotation',
        group: 'entities',
	tools: {
		"language": {
			label: 'Annotate language',
			type: 'select',
			list: {
                      'Guaranì': {
                        labelMsg: 'wikieditor-toolbar-tool-heading-2',
                        action: {
                          type: 'encapsulate',
                          options: {
                            pre: '== ',
                            periMsg: 'wikieditor-toolbar-tool-heading-example',
                            post: ' ==',
                            regex: /^(\s*)(={1,6})(.*?)\2(\s*)$/,
                            regexReplace: '$1==$3==$4',
                            ownline: true
                          }
                        }
                      },
                      'heading-3': {
                        labelMsg: 'wikieditor-toolbar-tool-heading-3',
                        action: {
                          type: 'encapsulate',
                          options: {
                            pre: '=== ',
                            periMsg: 'wikieditor-toolbar-tool-heading-example',
                            post: ' ===',
                            regex: /^(\s*)(={1,6})(.*?)\2(\s*)$/,
                            regexReplace: '$1===$3===$4',
                            ownline: true
                          }
                        }
                      }
},
		}
	}
});
*/
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'annotation',
        group: 'entities',
	tools: {
		"term": {
			label: 'Annotate semantic content. Select the text and then click on the button.',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/b/b3/Icon_term.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '[[Semantic content::',
					post: "]]"
				}
			}
		}
	}
});

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'annotation',
        group: 'entities',
	tools: {
		"language": {
			label: 'Annotate languages. Select the text and then click on the button.',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/0/05/Icon_language.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '[[Language::',
					post: "]]"
				}
			}
		}
	}
});

$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'annotation',
	groups: {
		'other': {
			'label': 'Other'
		}
	}
} );

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'annotation',
        group: 'other',
	tools: {
		"marginalia": {
			label: 'Annotate printed marginalia. Select the text and then click on the button. The marginalia will be visualized as footnote.',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/3/3a/Icon_Chat.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "<ref>Marginalia: '[[printedMarginalia::",
					post: "]]'.</ref>"
				}
			}
		}
	}
});

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'annotation',
        group: 'other',
	tools: {
		"image": {
			label: 'Annotate images. Use at the end of the text, as last line.',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/4/46/Icon_Image.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "[[Category:Pages with graphical apparatus",
					post: "]]",
					ownline: false
				}
			}
		}
	}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'annotation',
        group: 'other',
	tools: {
		"alia-manu": {
			label: 'Annotate other hands. Select the text and then click on the button. The marginalia will be visualized as footnote.',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/a/a5/Alia_mano_icon.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "<ref>Alia manu: [[aliaManu::",
					post: "]].</ref>"
				}
			}
		}
	}
});
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	'sections': {
		'symbols': {
			'type': 'toolbar', // Can also be 'booklet'
			'label': 'Symbols'
			// or 'labelMsg': 'section-emoticons-label' for a localized label
		}
	}
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'symbols',
	groups: {
		'zodiac': {
			'label': 'Zodiac'
		}
	}
} );
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'symbols',
        group: 'zodiac',
	tools: {
		"aries": {
			label: 'Aries',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/a/a7/Aries-20px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '[[File:Aries-20px.png]]',
					ownline: false
				}
			}
		}
	}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'symbols',
        group: 'zodiac',
	tools: {
		"taurus": {
			label: 'Taurus',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/6/6c/Taurus-20px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '[[File:Taurus-20px.png]]',
					ownline: false
				}
			}
		}
	}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'symbols',
        group: 'zodiac',
	tools: {
		"gemini": {
			label: 'Gemini',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/a/ad/Gemini-20px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '[[File:Gemini-20px.png]]',
					ownline: false
				}
			}
		}
	}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'symbols',
        group: 'zodiac',
	tools: {
		"cancer": {
			label: 'Cancer',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/d/dd/Cancer-20px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '[[File:Cancer-20px.png]]',
					ownline: false
				}
			}
		}
	}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'symbols',
        group: 'zodiac',
	tools: {
		"leo": {
			label: 'Leo',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/0/0e/Leo-20px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '[[File:Leo-20px.png]]',
					ownline: false
				}
			}
		}
	}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'symbols',
        group: 'zodiac',
	tools: {
		"virgo": {
			label: 'Virgo',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/d/d9/Virgo-20px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '[[File:Virgo-20px.png]]',
					ownline: false
				}
			}
		}
	}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'symbols',
        group: 'zodiac',
	tools: {
		"libra": {
			label: 'Libra',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/9/9e/Libra-20px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '[[File:Libra-20px.png]]',
					ownline: false
				}
			}
		}
	}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'symbols',
        group: 'zodiac',
	tools: {
		"scorpio": {
			label: 'Scorpio',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/f/f9/Scorpio-20px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '[[File:Scorpio-20px.png]]',
					ownline: false
				}
			}
		}
	}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'symbols',
        group: 'zodiac',
	tools: {
		"sagittarius": {
			label: 'Sagittarius',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/5/57/Sagittarius-20px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '[[File:Sagittarius-20px.png]]',
					ownline: false
				}
			}
		}
	}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'symbols',
        group: 'zodiac',
	tools: {
		"capricorn": {
			label: 'Capricorn',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/0/04/Capricorn-20px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '[[File:Capricorn-20px.png]]',
					ownline: false
				}
			}
		}
	}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'symbols',
        group: 'zodiac',
	tools: {
		"aquarius": {
			label: 'Aquarius',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/8/80/Aquarius-20px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '[[File:Aquarius-20px.png]]',
					ownline: false
				}
			}
		}
	}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'symbols',
        group: 'zodiac',
	tools: {
		"pisces": {
			label: 'Pisces',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/3/36/Pisces-20px.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '[[File:Pisces-20px.png]]',
					ownline: false
				}
			}
		}
	}
});

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'advanced',
        group: 'format',
	tools: {
		"center": {
			label: 'Center text',
			type: 'button',
			icon: 'https://upload.wikimedia.org/wikipedia/commons/c/c3/Toolbaricon_justify-center.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<center>',
					post: "</center>"
				}
			}
		}
	}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'advanced',
        group: 'format',
	tools: {
		"smallcaps": {
			label: 'Small-caps',
			type: 'button',
			icon: 'https://upload.wikimedia.org/wikipedia/commons/6/6e/Small_caps.svg',
			action: {
				type: 'encapsulate',
				options: {
					pre: '{{Smallcaps|',
					post: "}}"
				}
			}
		}
	}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'advanced',
        group: 'insert',
	tools: {
		"signature": {
			label: 'Signature',
			type: 'button',
			icon: 'https://upload.wikimedia.org/wikipedia/commons/b/be/Insert-signature3.svg',
			action: {
				type: 'encapsulate',
				options: {
					pre: '~~',
					post: "~~"
				}
			}
		}
	}
});
/*
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'annotation',
	groups: {
		'opinions': {
			'label': 'Opinions'
		}
	}
} );
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'annotation',
        group: 'opinions',
	tools: {
		"assent": {
			label: 'Assent',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/e/e8/Assent_Annotation_Button_05.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<span title="Assent" style="background:PaleGreen">[[Assent::≡≡]]</span>',
					ownline: false
				}
			}
		}
	}
});

$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'annotation',
        group: 'opinions',
	tools: {
		"dissent": {
			label: 'Dissent',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/8/87/Dissent_Annotation_Button.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<span title="Dissent" style="background:OrangeRed">[[Dissent::≠≠]]</span>',
					ownline: false
				}
			}
		}
	}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'annotation',
        group: 'opinions',
	tools: {
		"laudation": {
			label: 'Laudation',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/9/94/Laudation_Annotation_Button.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<span title="Laudation" style="background:Pink">[[Laudation::++]]</span>',
					ownline: false
				}
			}
		}
	}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'annotation',
        group: 'opinions',
	tools: {
		"question": {
			label: 'Question',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/2/26/Question_Annotation_Button.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<span style="background:Yellow">',
					post: '</span>'
				}
			}
		}
	}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'annotation',
        group: 'opinions',
	tools: {
		"recommendation": {
			label: 'Recommendation',
			type: 'button',
			icon: 'https://gate.unigre.it/mediawiki/images/0/0f/Recomendation_Annotation_Button.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<span title="Recommendation" style="background:PaleTurquoise" >[[Recommendation::++++]]</span>',
					ownline: false
				}
			}
		}
	}
}); */
}; 

$(function() {
    $( '#wpTextbox1' ).on( 'wikiEditor-toolbar-buildSection-characters', function (event, section) {
        section.pages.latin.characters.push('\u0303');
    });
});

/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar … */
 if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== -1 ) {
	mw.loader.using( 'user.options' ).then( function () { 
		// This can be the string "0" if the user disabled the preference ([[phab:T54542#555387]])
		if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) {
			$.when(
				mw.loader.using( 'ext.wikiEditor' ), $.ready
			).then( function(){ window.setTimeout(customizeToolbar, 1); } );
		}
	 } );
}