Grand Theft Encyclopedia
Grand Theft Encyclopedia
Sin resumen de edición
Sin resumen de edición
 
Línea 41: Línea 41:
 
</pre>
 
</pre>
 
}}
 
}}
<small>(Perdón que se agarre mucho espacio pero por el momento parece que no funciona bien esta plantilla como ya [http://es.gta.wikia.com/wiki/Pruebas#Tom comprobé])</small>
+
<small><s>(Perdón que se agarre mucho espacio pero por el momento parece que no funciona bien esta plantilla como ya [http://es.gta.wikia.com/wiki/Pruebas#Tom comprobé])</s></small>
   
 
Sería algo muy interesante para los usuarios que gustan de agregarle cosas a sus perfiles y muros, incluso tal vez lo use jeje.
 
Sería algo muy interesante para los usuarios que gustan de agregarle cosas a sus perfiles y muros, incluso tal vez lo use jeje.

Revisión actual - 21:43 23 ene 2017

Saludos, Cuban.

Preguntaba si sería posible añadir un script de java al GTE. Aviso que la función del script es meramente no-enciclopédico.


Este script es necesario para que funcione una plantilla que pienso exportar de Dragon Ball Wiki (Plantilla:MPC). Ya hable con el autor de la plantilla y del script y me dio permiso.

Script de java
// Plantilla:MPC
$(function () {
$('.youtubeplayer').each(function () {
var esc = mw.html.escape,
$this = $(this);
playertype = esc('' + $this.data('playertype')),
id = esc($this.data('id') || ''),
width = esc('' + $this.data('width')),
height = esc('' + $this.data('height')),
autoplay = esc('' + $this.data('autoplay')),
args = esc('' + $this.data('args'));

if ( id === '' ) {
return;
}
$this.html('<iframe width="' + width + '" height="' + height + '" src="//www.youtube.com/' + playertype + '/' + id + '?feature=player_embedded&autoplay=' + autoplay + '&' + args + '" frameborder="0" allowfullscreen></iframe>');
});
});
$(function () {
 $('.audio').each(function () {
var esc = mw.html.escape,
$this = $(this);
options = esc('' + $this.data('options')),
src = esc('' + $this.data('src')),
type = esc('' + $this.data('type'));
$this.html('<audio ' + options + '><source src="' + src + '" type="' + type + '"></audio>');
});
});

(Perdón que se agarre mucho espacio pero por el momento parece que no funciona bien esta plantilla como ya comprobé)

Sería algo muy interesante para los usuarios que gustan de agregarle cosas a sus perfiles y muros, incluso tal vez lo use jeje.

Edit: Olvide mencionar su función. La plantilla hace que se pueda reproducir un vídeo de youtube y viene con opciones de auto reproducción y para que el vídeo este escondido. Funcionaría como se ve acá: "test".<ac_metadata title="Adición al Mediawiki:common.js"> </ac_metadata>