Diferencia entre revisiones de «Usuario:Taln Fan/common.js»

sin resumen de edición
var customizeToolbar = function() {
/* Your code goes here */
// Adding an art infobox button to the "main" section
 
$('#wpTextbox1' ).wikiEditor( 'addToToolbar', {
//Add new page ends dropdown to the "advanced" section
section: 'main',
group: 'insert',
tools: {
"code": {
label: 'Art infobox',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/5/5a/Vector_toolbar_insert_picture_gallery_button.png',
action: {
type: 'encapsulate',
options: {
pre: '{' + '{art' + '\n' + '|#artist=' + '\n' + '|series=' + '\n' + '|#source=',
post: '\n' + '|type=' + '\n' + '}}'
}
}
}
}
});
// Adding artist attribution button for galleries to the "main" section
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'main',
group: 'insert',
tools: {
"artist-attribution": {
label: 'Artist Attribution',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/1/1b/Button_miss_signature.png',
action: {
type: 'encapsulate',
options: {
pre: '| <small><center>by {{a|',
post: '}}</center></small>'
}
}
}
}
});
// Adding artist page button to the "main" section
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'main',
group: 'insert',
tools: {
"artist-page": {
label: 'Artist Page',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/7/76/Button_atelier_graphique.PNG',
action: {
type: 'encapsulate',
options: {
pre: '{'+'{artist' + '\n' + '|image=' + '\n' + '|alias=' + '\n' + '|fb=' + '\n' + '|reddit=' + '\n' + '|behance=' + '\n' + '|da=' + '\n' + '|ig=' + '\n' + '|as=' + '\n' + '|tumblr=' + '\n' + '|twitter=' + '\n' + '|site=' + '\n' + '|license=all|some|none|official' + '\n' + '|contact=' + '\n' + '|type=fan|interior|cover|multimedia' + '\n' + '|no-notify=y' + '\n' + '}}' + '\n\n' + '<br style="clear:right;"/>' + '\n' + '== Gallery ==' + '\n' + '<gallery caption="Gallery" mode="packed" heights=200px>' + '\n\n' + '</gallery>' + '\n' + '{{meta/done}}'
}
}
}
}
});
// Adding image template button to the "main" section
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'main',
group: 'insert',
tools: {
"image": {
label: 'Image template',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/d/d8/Vector_toolbar_insert_image_button.png',
action: {
type: 'encapsulate',
options: {
pre: '{' + '{image|',
post: '|side=|width=|caption}}'
}
}
}
}
});
// Adding link button to the "main" section
$('#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'main',
group: 'insert',
tools: {
"link": {
label: 'Link',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/9/97/Button_int_link.png',
action: {
type: 'encapsulate',
options: {
pre: "[[",
post: "]]"
}
}
}
}
});
// Adding Wikipedia link button to the "main" section
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'main',
group: 'insert',
tools: {
"wikipedia": {
label: 'Wikipedia',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/c/cb/Button_wikipedia.png',
action: {
type: 'encapsulate',
options: {
pre: "[[Wikipedia:",
post: "|]]"
}
}
}
}
});
//Add new references dropdown to the "advanced" section
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'advanced',
list: {
tools: {
bottomsreferences: {
label: 'bottomsreferences',
type: 'select',
list: {
'pagenamebook-ref': {
label: '{' + '{SUBST:PAGENAMEbook ref}}',
action: {
type: 'encapsulate',
options: {
pre: '\n{' + '\'\'\'{'book + '{SUBST:PAGENAME}}\'\'\'ref|',
post: '}}'
}
}
},
'noteswob-ref': {
label: '=={' Notes+ =='{wob ref}}',
action: {
type: 'encapsulate',
options: {
pre: '\n\n{' + '=={wob Notes ==ref|',
post: '}}'
}
}
},
'refsectionref-plaintext': {
label: '<{' + 'references/>{ref}}',
action: {
type: 'encapsulate',
options: {
pre: '\n{' + '<' + 'references />{ref|text=',
post: '}}'
}
}
},
'stubepigraph-ref': {
label: '{' + '{stubepigraph ref}}',
action: {
type: 'encapsulate',
options: {
pre: '\n{' + '{'epigraph + '{stub}}ref|',
post: '}}'
}
}
},
'partialau-ref': {
label: '{' + '{partialau ref}}',
action: {
type: 'encapsulate',
options: {
pre: '\n{' + '{'au + '{partial}}ref|',
post: '}}'
}
}
},
'completemsh-ref': {
label: '{' + '{completemsh ref}}',
action: {
type: 'encapsulate',
options: {
pre: '\n{' + '{'msh + '{complete}}ref|',
post: '}}'
}
}
},
'alcatraztes-ref': {
label: '{' + '{Alcatraztes ref}}',
action: {
type: 'encapsulate',
options: {
pre: '\n{' + '{'tes + '{Alcatraz}}ref|',
post: '}}'
}
}
},
'elantrisfile-ref': {
label: '{' + '{Elantrisfile ref}}',
action: {
type: 'encapsulate',
options: {
pre: '\n{' + '{'file + '{Elantris}}ref|',
post: '}}'
}
}
},
'mbera1map-ref': {
label: '{' + '{Mistborn|Eramap 1ref}}',
action: {
type: 'encapsulate',
options: {
pre: '\n{' + '{'map + '{Mistbornref|Era 1}}',
post: '}}'
}
}
},
'mbera2url-ref': {
label: '{' + '{Mistborn|Eraurl 2ref}}',
action: {
type: 'encapsulate',
options: {
pre: '\n{' + '{'url + '{Mistbornref|Era 2}}url=',
post: '|text=|date=|site=}}'
}
}
},
'reckoners17s-ref': {
label: '{' + '{Reckoners17s ref}}',
action: {
type: 'encapsulate',
options: {
pre: '\n{' + '{'17s + '{Reckoners}}ref|topic/news/post',
post: '|id#|description|date=}}'
}
},
'sky': {
label: '{' + '{Skyward}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{Skyward}}'
}
}
},
'stormlight': {
label: '{' + '{Stormlight}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{Stormlight}}'
}
}
},
'warbreaker': {
label: '{' + '{Warbreaker}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{Warbreaker}}'
}
}
},
'whitesand': {
label: '{' + '{White Sand}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{White Sand}}'
}
}
}
} );
 
//Add new build-a-box dropdown to the "advanced" section
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
}
} );
//Add new infobox endings dropdown to the "advanced" section
 
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
// Adding Wikipedia link button to the "main" section
section: 'advanced',
$('#wpTextbox1').wikiEditor('addToToolbar', {
groups: {
section: 'main',
list: {
group: 'insert',
tools: {
"wikipedia"endings: {
label: 'Wikipediaends',
type: 'buttonselect',
list: {
icon: '//upload.wikimedia.org/wikipedia/commons/c/cb/Button_wikipedia.png',
action'sa': {
label: 'Stormlight',
type: 'encapsulate',
action: {
options: {
type: 'encapsulate',
pre: "[[Wikipedia:",
options: {
post: "|]]"
pre: '\n' + '|world=Roshar' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[The Stormlight Archive]]' + '\n' + '}}'
}
}
}
},
'mbe1': {
});
label: 'MB Era 1',
 
action: {
// Adding link button to the "main" section
type: 'encapsulate',
$('#wpTextbox1' ).wikiEditor( 'addToToolbar', {
options: {
section: 'main',
pre: '\n' + '|world=Scadrial' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[Mistborn Era 1]]' + '\n' + '}}'
group: 'insert',
}
tools: {
}
"link": {
},
label: 'Link',
'mbe2': {
type: 'button',
label: 'MB Era 2',
icon: '//upload.wikimedia.org/wikipedia/commons/9/97/Button_int_link.png',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|world=Scadrial' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[Mistborn Era 2]]' + '\n' + '}}'
pre: "[[",
}
post: "]]"
}
},
'wb': {
label: 'Warbreaker',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|world=Nalthis' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[Warbreaker]]' + '\n' + '}}'
}
}
},
'ela': {
label: 'Elantris',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|world=Sel' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[Elantris (book)|Elantris]]' + '\n' + '}}'
}
}
},
'alc': {
label: 'Alcatraz',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|earth=Alcatraz' + '\n' + '|books=[[Alcatraz Versus the Evil Librarians (series)|Alcatraz Versus the Evil Librarians]]' + '\n' + '}}'
}
}
},
'ws': {
label: 'White Sand',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|world=Taldain' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[White Sand]]' + '\n' + '}}'
}
}
},
'skyward': {
label: 'Skyward',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|world=',
post: '\n' + '|universe=[[Cytoverse]]' + '\n' + '|books=[[Skyward (series)]]' + '\n' + '}}'
}
}
}
}
}
}
}
}
} );
}
//Add new page ends dropdown to the "advanced" section
}
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
}
section: 'advanced',
});
groups: {
 
list: {
// Adding an art infobox button to the "main" section
tools: {
$('#wpTextbox1' ).wikiEditor( 'addToToolbar', {
bottoms: {
section: 'main',
grouplabel: 'insertbottoms',
type: 'select',
tools: {
"code"list: {
'pagename': {
label: 'Art infobox',
label: '{' + '{SUBST:PAGENAME}}',
type: 'button',
action: {
icon: '//upload.wikimedia.org/wikipedia/commons/5/5a/Vector_toolbar_insert_picture_gallery_button.png',
type: 'encapsulate',
action: {
options: {
type: 'encapsulate',
pre: '\n' + '\'\'\'{' + '{SUBST:PAGENAME}}\'\'\''
options: {
}
pre: '{' + '{art' + '\n' + '|#artist=' + '\n' + '|series=' + '\n' + '|#source=',
}
post: '\n' + '|type=' + '\n' + '}}'
},
'notes': {
label: '== Notes ==',
action: {
type: 'encapsulate',
options: {
pre: '\n\n' + '== Notes =='
}
}
},
'refsection': {
label: '<' + 'references/>',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '<' + 'references />'
}
}
},
'stub': {
label: '{' + '{stub}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{stub}}'
}
}
},
'partial': {
label: '{' + '{partial}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{partial}}'
}
}
},
'complete': {
label: '{' + '{complete}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{complete}}'
}
}
},
'alcatraz': {
label: '{' + '{Alcatraz}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{Alcatraz}}'
}
}
},
'elantris': {
label: '{' + '{Elantris}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{Elantris}}'
}
}
},
'mbera1': {
label: '{' + '{Mistborn|Era 1}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{Mistborn|Era 1}}'
}
}
},
'mbera2': {
label: '{' + '{Mistborn|Era 2}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{Mistborn|Era 2}}'
}
}
},
'reckoners': {
label: '{' + '{Reckoners}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{Reckoners}}'
}
}
},
'sky': {
label: '{' + '{Skyward}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{Skyward}}'
}
}
},
'stormlight': {
label: '{' + '{Stormlight}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{Stormlight}}'
}
}
},
'warbreaker': {
label: '{' + '{Warbreaker}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{Warbreaker}}'
}
}
},
'whitesand': {
label: '{' + '{White Sand}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{White Sand}}'
}
}
}
}
}
}
}
}
} );
}
//add new section to editing toolbar
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'sections': {
'useful-stuff': {
'type': 'booklet',
'label': 'Useful Stuff',
'pages': {
//Page of commonly used reference templates
'section-refs': {
'label': 'References',
'layout': 'characters',
'characters': [
'{' + '{book ref|}}',
'{' + '{wob ref|}}',
'{' + '{ref|text=}}',
'{' + '{epigraph ref|}}',
'{' + '{au ref|}}',
'{' + '{msh ref|}}',
'{' + '{tes ref|}}',
'{' + '{file ref|}}',
'{' + '{map ref|}}',
//These next two reference templates are very long so they are done differently
{
'action': {
'type': 'encapsulate',
options: {
pre: '{' + '{url ref|url=',
post: '|text=|date=|site=}}'
}
},
'label': '{' + '{url ref}}'
},
{
'action': {
'type': 'encapsulate',
options: {
pre: '{' + '{17s ref|topic/news/post',
post: '|id#|description|date=}}'
}
},
'label': '{' + '{17s ref}}'
},
]
},
//Page to quickly build character infoboxes
'section-Build-a-Box': {
'label': 'Build-a-Box',
'layout': 'characters',
'characters': [
'{' + '{character',
'\n' + '|image=',
'\n' + '|residence=',
'\n' + '|profession=',
'\n' + '|#profession=',
'\n' + '|species=',
'\n' + '|abilities=',
'\n' + '|ethnicity=',
'\n' + '|born=',
'\n' + '|died=',
'\n' + '|nationality=',
'\n' + '|residence=',
]
},
//Page of infobox endings
'section-end': {
'label': 'Endings',
'layout': 'characters',
'characters': [
'\n' + '|world=Scadrial',
'\n' + '|world=Roshar',
'\n' + '|world=Nalthis',
'\n' + '|world=Taldain',
'\n' + '|earth=Alcatraz',
'\n' + '|universe=[[Cosmere]]',
'\n' + '|books=[[Mistborn Era 1]]',
'\n' + '|books=[[Mistborn Era 2]]',
'\n' + '|books=[[The Stormlight Archive]]',
'\n' + '|books=[[Warbreaker]]',
//Alcatraz is very long so it has to be done differently
{
'action': {
'type': 'encapsulate',
'options': {
'pre': '\n' + '|books=[[Alcatraz Versus the Evil Librarians (series)|Alcatraz Versus the Evil Librarians]]'
}
},
'label': '|books=Alcatraz'
},
]
},
//Page of stuff to finish a page after making the infobox
'section-bottom': {
'label': 'Bottom of Page',
'layout': 'characters',
'characters': [
'\n' + '\'\'\'{' + '{SUBST:PAGENAME}}\'\'\'',
'\n\n' + '== Notes ==',
'\n' + '<' + 'references/>',
'\n' + '{' + '{stub}}',
'\n' + '{' + '{partial}}',
'\n' + '{' + '{complete}}',
'\n' + '{' + '{Alcatraz}}',
'\n' + '{' + '{Elantris}}',
'\n' + '{' + '{Mistborn|Era 1}}',
'\n' + '{' + '{Mistborn|Era 2}}',
'\n' + '{' + '{Reckoners}}',
'\n' + '{' + '{Skyward}}',
'\n' + '{' + '{Stormlight}}',
'\n' + '{' + '{Warbreaker}}',
'\n' + '{' + '{White Sand}}',
]
}
}
}
});
});
 
};
/*
2935

ediciones