Usuario:Emiduronte/vector.js

De Wikipedia, la enciclopedia libre

Nota: Después de guardar, debes refrescar la caché de tu navegador para ver los cambios. Internet Explorer: mantén presionada Ctrl mientras pulsas Actualizar. Firefox: mientras presionas Mayús pulsas el botón Actualizar, (o presiona Ctrl-Shift-R). Los usuarios de Google Chrome y Safari pueden simplemente pulsar el botón Recargar. Para más detalles e instrucciones acerca de otros exploradores, véase Ayuda:Cómo limpiar la caché.

/* Adición de botones dentro de la barra de botones «avanzada» del nuevo editor */
/* Label = etiquetita cuando le pasas el ratón */
/* icon = la imagen del botón */
/* type = desconozco que otros hay además de ''encapsulate''. */
/* pre = lo que va antes del texto seleccionado (puedes poner "") */
/* post = lo que cierra, aquí puedes poner la plantilla. Explicacion gracias a Magister Mathematicae */

if ( typeof $j != 'undefined' && typeof $.fn.wikiEditor != 'undefined' ) {
        $( function() {
                $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
                        'section': 'main',
                        'group': 'insert',
                        'tools': {
                                'Hecho': {
                                        label: 'Plantilla Hecho (chek)',
                                        type: 'button',
                                        icon: 'http://upload.wikimedia.org/wikipedia/commons/b/b6/Button_article_de_qualite.png',
                                        action: {
                                                type: 'encapsulate',
                                                options: {
                                                   pre : "",    
                                                   post: "{{hecho}}"
                                                }
                                        }
                                }
                        }
                } );
        } );
}
if ( typeof $j != 'undefined' && typeof $.fn.wikiEditor != 'undefined' ) {
        $( function() {
                $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
                        'section': 'main',
                        'group': 'insert',
                        'tools': {
                                'Hecho': {
                                        label: 'Aviso de imágen externa',
                                        type: 'button',
                                        icon: 'http://upload.wikimedia.org/wikipedia/commons/7/7e/Art_alt-2.svg',
                                        action: {
                                                type: 'encapsulate',
                                                options: {
                                                   pre : "{{subst:",    
                                                   post: "Usuario:Emiduronte/Imágenexterna}}"
                                                }
                                        }
                                }
                        }
                } );
        } );
}
if ( typeof $j != 'undefined' && typeof $.fn.wikiEditor != 'undefined' ) {
        $( function() {
                $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
                        'section': 'main',
                        'group': 'insert',
                        'tools': {
                                'No': {
                                        label: 'Plantilla No (No)',
                                        type: 'button',
                                        icon: 'http://upload.wikimedia.org/wikipedia/commons/a/a2/X_mark.svg',
                                        action: {
                                                type: 'encapsulate',
                                                options: {
                                                   pre : "",    
                                                   post: "{{No}}"
                                                }
                                        }
                                }
                        }
                } );
        } );
}
if ( typeof $j != 'undefined' && typeof $.fn.wikiEditor != 'undefined' ) {
        $( function() {
                $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
                        'section': 'main',
                        'group': 'insert',
                        'tools': {
                                'Hecho': {
                                        label: 'Blanqueo de discusión',
                                        type: 'button',
                                        icon: 'http://upload.wikimedia.org/wikipedia/commons/e/ee/Crystal_Clear_app_kdmconfig.png',
                                        action: {
                                                type: 'encapsulate',
                                                options: {
                                                   pre : "{{subst:",    
                                                   post: "Usuario:Emiduronte/Borradodiscu}}"
                                                }
                                        }
                                }
                        }
                } );
        } );
}
if ( typeof $j != 'undefined' && typeof $.fn.wikiEditor != 'undefined' ) {
        $( function() {
                $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
                        'section': 'main',
                        'group': 'insert',
                        'tools': {
                                'Hecho': {
                                        label: 'Artículo sin sentido',
                                        type: 'button',
                                        icon: 'http://upload.wikimedia.org/wikipedia/commons/1/16/Commons-emblem-hand.svg',
                                        action: {
                                                type: 'encapsulate',
                                                options: {
                                                   pre : "{{subst:",    
                                                   post: "Aviso sin sentido}}"
                                                }
                                        }
                                }
                        }
                } );
        } );
}
if ( typeof $j != 'undefined' && typeof $.fn.wikiEditor != 'undefined' ) {
        $( function() {
                $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
                        'section': 'advanced',
                        'group': 'format',
                        'tools': {
                                'comment': {
                                        label: 'Comment',
                                        type: 'button',
                                        icon: 'http://upload.wikimedia.org/wikipedia/commons/3/37/Btn_toolbar_commentaire.png',
                                        action: {
                                                type: 'encapsulate',
                                                options: {
                                                        pre: "<!-- ",
                                                        post: " -->"
                                                }
                                        }
                                }
                        }
                } );
        } );
}