Diferencia entre revisiones de «Widget:Slides»
m (1 revisión importada: Slides de wikieducator.org) |
|||
(No se muestran 4 ediciones intermedias de 2 usuarios) | |||
Línea 1: | Línea 1: | ||
− | <noinclude>Infrastructure for wiki-based "slide" presentations, based on [http://code.google.com/p/html5slides/ html5slides].</noinclude><includeonly> | + | <noinclude>Infrastructure for wiki-based "slide" presentations, based on [http://code.google.com/p/html5slides/ html5slides]. Idea original de Jim Tittsler http://wikieducator.org/index.php?title=Widget:Slide</noinclude><includeonly> |
− | <div id=" | + | <div id="MIslides"></div> |
<script type="text/javascript">/*<![CDATA[*/ | <script type="text/javascript">/*<![CDATA[*/ | ||
− | + | Element.prototype.remove = function() { | |
− | + | this.parentElement.removeChild(this); | |
− | + | } | |
− | + | NodeList.prototype.remove = HTMLCollection.prototype.remove = function() { | |
− | + | for(var i = this.length - 1; i >= 0; i--) { | |
− | + | if(this[i] && this[i].parentElement) { | |
− | + | this[i].parentElement.removeChild(this[i]); | |
+ | } | ||
+ | } | ||
+ | } | ||
− | + | function MIslideshow() { | |
− | + | mw.loader.load(wgServer + '/extensions/WE/Slides/slides.js'); | |
− | + | document.getElementById("MIslides").remove(); | |
− | + | document.getElementsByClassName('mw-editsection').remove(); | |
− | + | return false; | |
− | + | }; | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | } | ||
− | |||
− | + | function creaSlides() { | |
− | + | if (window.location.search.indexOf('present') >= 0) { MIslideshow(); } else { | |
− | + | var boton = document.createElement("input"); | |
− | + | boton.setAttribute('type', 'submit'); | |
+ | boton.setAttribute('value', 'Ver presentación'); | ||
+ | boton.setAttribute('href', '#'); | ||
+ | boton.onclick = MIslideshow; | ||
+ | document.getElementById("MIslides").appendChild(boton) | ||
+ | }; | ||
+ | } | ||
+ | RLQ.push(function () { | ||
+ | creaSlides(); | ||
}); | }); | ||
/*]]>*/</script></includeonly> | /*]]>*/</script></includeonly> |
Revisión actual del 19:24 27 nov 2019
Infrastructure for wiki-based "slide" presentations, based on html5slides. Idea original de Jim Tittsler http://wikieducator.org/index.php?title=Widget:Slide