Difference between revisions of "User:King of Herdaz/Toolbar customization"

m
→‎Premade Elements: normalized whitespace for dropdowns and added firstborn
m (→‎Customization: more cleanup)
m (→‎Premade Elements: normalized whitespace for dropdowns and added firstborn)
|
<pre>
//Add new build-a-box dropdown to the "advanced" section
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'advanced',
groups: {
list: {
tools: {
simplecharacterinfobox: {
label: 'build-a-box',
type: 'select',
list: {
'start': {
label: '{' + '{character',
action: {
type: 'encapsulate',
options: {
pre: '{' + '{character'
}
}
},
'residence': {
label: '|residence=',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|residence='
}
}
},
'imageparam': {
label: '|image=',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|image='
}
}
},
'profession': {
label: '|profession=',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|profession='
}
}
},
'#profession': {
label: '|#profession=',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|#profession='
}
}
},
'skills': {
label: '|skills=',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|skills='
}
}
},
'species': {
label: '|species=',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|species='
}
}
},
'abilities': {
label: '|abilities=',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|abilities='
}
}
},
'ethnicity': {
label: '|ethnicity=',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|ethnicity='
}
}
},
'born': {
label: '|born=',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|born='
}
}
},
'died': {
label: '|died=',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|died='
}
}
},
'nationality': {
label: '|nationality=',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|nationality='
}
}
},
'bonded': {
label: '|bonded=',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|bonded='
}
}
}
}
}
}
}
}
} );
</pre>
|}
|
<pre>
//Add new infobox endings dropdown to the "advanced" section
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'advanced',
groups: {
list: {
tools: {
endings: {
label: 'ends',
type: 'select',
list: {
'sa': {
label: 'Stormlight',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|world=Roshar' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[The Stormlight Archive]]' + '\n' + '}}'
}
}
},
'mbe1': {
label: 'MB Era 1',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|world=Scadrial' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[Mistborn Era 1]]' + '\n' + '}}'
}
}
},
'mbe2': {
label: 'MB Era 2',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|world=Scadrial' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[Mistborn Era 2]]' + '\n' + '}}'
}
}
},
'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' + '}}'
}
}
},
'skywardfirst-born': {
label: 'SkywardFirstborn',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '|worldnation=High Empire' + '\n' + '|books=[[Firstborn]]' + '\n' + '}}',
}
post: '\n' + '|universe=[[Cytoverse]]' + '\n' + '|books=[[Skyward (series)]]' + '\n' + '}}'
}
},
} 'skyward': {
label: }'Skyward',
action: }{
type: 'encapsulate',
}
} options: {
pre: '\n' + '|world=',
}
post: '\n' + '|universe=[[Cytoverse]]' + '\n' + '|books=[[Skyward (series)]]' + '\n' + '}}'
} );
}
}
}
}
}
}
}
}
} );
</pre>
|}
|
<pre>
//Add new page ends dropdown to the "advanced" section
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'advanced',
groups: {
list: {
tools: {
bottoms: {
label: 'bottoms',
type: 'select',
list: {
'pagename': {
label: '{' + '{SUBST:PAGENAME}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '\'\'\'{' + '{SUBST:PAGENAME}}\'\'\''
}
}
},
'notessubpagename': {
label: '=={' Notes+ =='{SUBST:SUBPAGENAME}}',
action: {
type: 'encapsulate',
options: {
pre: '\n\n' + '==\'\'\'{' Notes+ =='{SUBST:SUBPAGENAME}}\'\'\''
}
}
},
'refsectionnotes': {
label: '<'== +Notes 'references/>==',
action: {
type: 'encapsulate',
options: {
pre: '\n\n' + '<'== + 'referencesNotes />=='
}
}
},
'stubrefsection': {
label: '{<' + '{stub}}references/>',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{<' + '{stub}}references />'
}
}
},
'partialstub': {
label: '{' + '{partialstub}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{partialstub}}'
}
}
},
'completepartial': {
label: '{' + '{completepartial}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{completepartial}}'
}
}
},
'alcatrazcomplete': {
label: '{' + '{Alcatrazcomplete}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{Alcatrazcomplete}}'
}
}
},
'elantrisalcatraz': {
label: '{' + '{ElantrisAlcatraz}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{ElantrisAlcatraz}}'
}
}
},
'mbera1elantris': {
label: '{' + '{Mistborn|Era 1Elantris}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{Mistborn|Era 1Elantris}}'
}
}
},
'mbera2mbera1': {
label: '{' + '{Mistborn|Era 21}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{Mistborn|Era 21}}'
}
}
},
'reckonersmbera2': {
label: '{' + '{ReckonersMistborn|Era 2}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{ReckonersMistborn|Era 2}}'
}
}
},
'skyreckoners': {
label: '{' + '{SkywardReckoners}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{SkywardReckoners}}'
}
}
},
'stormlightsky': {
label: '{' + '{StormlightSkyward}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{StormlightSkyward}}'
}
}
},
'warbreakerstorm': {
label: '{' + '{WarbreakerStormlight}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{WarbreakerStormlight}}'
}
}
},
'whitesandwarbreaker': {
label: '{' + '{White SandWarbreaker}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{White SandWarbreaker}}'
}
}
},
} 'firstborn': {
label: '{' + '{Firstborn}}',
action: }{
type: 'encapsulate',
}
options: {
}
pre: '\n' + '{' + '{Firstborn}}'
} );
}
} },
'whitesand': {
label: '{' + '{White Sand}}',
action: {
type: 'encapsulate',
options: {
pre: '\n' + '{' + '{White Sand}}'
}
}
}
}
}
}
}
}
} );
</pre>
|}
Autopatrolled, Editors
8,718

edits