Usuario:King of Herdaz/common.js
< Usuario:King of Herdaz
Revisión del 04:36 27 oct 2021 de King of Herdaz (discusión | contribs.)
Nota: tras guardar, quizás necesites actualizar la caché de tu navegador para ver los cambios.
- Firefox/Safari: Mantén presionada la tecla Mayús mientras pulsas el botón Actualizar, o presiona Ctrl+F5 o Ctrl+R (⌘+R en Mac)
- Google Chrome: presiona Ctrl+Shift+R (⌘+Mayús+R en Mac)
- Internet Explorer: mantén presionada Ctrl mientras pulsas Actualizar, o presiona Ctrl+F5
- Opera: dirígete a Menú → Configuración (Opera → Preferencias en Mac) y luego a Privacidad y seguridad → Borrar datos de navegación → Imágenes y archivos en caché.
//change syntax highlighter timeout time ('//www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-DotsSyntaxHighlighter.js&action=raw&ctype=text/javascript'); syntaxHighlighterConfig = { timeout: 45, } //customize toolbar var customizeToolbar = function() { /* Your code goes here */ //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=' } } } } } } } } } ); //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' + '}}' } } }, 'skyward': { label: 'Skyward', action: { type: 'encapsulate', options: { pre: '\n' + '|world=' + '\n' + '|universe=[[Cytoverse]]' + '\n' + '|books=[[Skyward (series)]]' + '\n' + '}}' } } } } } } } } } ); //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}}\'\'\'' } } }, '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}}' } } }, 'storm': { 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}}' } } } } } } } } } ); }; /* * Check if view is in edit mode and that the required modules are available. Then, customize the toolbar... * Don't touch below this line! */ if (['edit', 'submit'].indexOf(mw.config.get('wgAction')) !== -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(customizeToolbar); } }); }