Plantilla:Slides

Infrastructure for wiki-based "slide" presentations, based on html5slides.  $(function {  function weSlideShow {    $.getScript( 'http://wikieducator.org/skins/common/we/slides.js');    $('#WEslides').remove;    return false;  }

var weAPI = wgServer + '/api.php'; var narration;

console.log('narration check'); $.each($('div.slides').attr('class').split(/\s+/), function(i, v) {   console.log(i, v);    if (v.indexOf('narration:') === 0) {      narration = v.substr('narration:'.length).replace(',', '|');      console.log(narration);    }  }); if (narration !== undefined) { console.log(narration); $.ajax({     url: weAPI,      data: {        action: 'query',        format: 'json',        prop: 'imageinfo',        iiprop: 'url',        titles: narration      },      async: true,      dataType: 'json',      type: 'POST',      success: function(data) {        var i, u;        console.log('narrationDIV');        var audiotag = ' ';        if (data && 'query' in data && 'pages' in data.query) {          for (i in data.query.pages) {            u = data.query.pages[i].imageinfo[0].url;            console.log(u);            type = (u.substr(-3) === 'mp3') ? 'mpeg' : 'ogg';            audiotag += '';          }        }        audiotag += ' ';        $('#WEslides').before(audiotag);      }    }); }

if (window.location.search.indexOf('present') >= 0) { weSlideShow; } else { $('#WEslides').html(' '); $('#WEslides > input').click(weSlideShow); } });