MediaWiki:Common.js : Différence entre versions

Ligne 23 : Ligne 23 :
  
 
var app = new Vue({
 
var app = new Vue({
                 el: "#app",
+
                 el: "#mw-hello-world",
 
                 data: {
 
                 data: {
 
                     src: 'https://rhinedits-stream.di.unistra.fr/Films/0005FH0011_5.mp4'
 
                     src: 'https://rhinedits-stream.di.unistra.fr/Films/0005FH0011_5.mp4'

Version du 1 août 2019 à 15:18

/* Tout JavaScript ici sera chargé avec chaque page accédée par n’importe quel utilisateur. */

var coll = document.getElementsByClassName("collapsible");
var i;

for (i = 0; i < coll.length; i++) {
  coll[i].addEventListener("click", function() {
    this.classList.toggle("active");
    var content = this.nextElementSibling;
    if (content.style.maxHeight){
      content.style.maxHeight = null;
    } else {
      content.style.maxHeight = content.scrollHeight + "px";
    } 
  });
}


(function () {

  var myElement = document.getElementById('mw-hello-world');
  myElement.innerHTML = '<html>Hello World!!!</html>';

var app = new Vue({
                el: "#mw-hello-world",
                data: {
                    src: 'https://rhinedits-stream.di.unistra.fr/Films/0005FH0011_5.mp4'
                }
            });

  var myElement = document.getElementById('mw-hello-world');
  myElement.innerHTML = '<div id="app" ><video position:relative="" poster="https://rhinedits.u-strasbg.fr/w/images/4/4b/Occup%C3%A9e.jpg" width="100%" v-bind:src="src" autoplay="" type="video/mp4" controls="controls" controlslist="nodownload">   </video></div>';
  
}());