CapsLock / pluzz-get-videos-url

// ==UserScript==
// @name        pluzz-get-videos-url
// @namespace   fr.cloudfrancois.git
// @include     http://pluzz.francetv.fr/videos/*
// @version     1
// @grant       none
// ==/UserScript==

var addVideosURL = function() {
  clearTimeout(videoUrlDisplayTimer)
  var idDiffusion = Pluzz.settings && Pluzz.settings.diffusion && Pluzz.settings.diffusion.idDiffusion
  if(!idDiffusion) {
    return
  }
  var wsURL = `http://sivideo.webservices.francetelevisions.fr/tools/getInfosOeuvre/v2/?idDiffusion=${idDiffusion}&catalogue=Pluzz&callback=_jsonp_loader_callback_request_0`
  $.ajax({
    url: wsURL,
    dataType: "jsonp",
    jsonpCallback: "callbackPluzz",
    cache: !0,
    success: function(a) {
      if(a) {
        $('#video-urls').remove();
        $('#diffusion-info').append('<ul id="video-urls"></ul>');
        for(var i=0; i < a.videos.length; i++) {
          var v = a.videos[i];
          $('#video-urls').append(
           `<li><a href="${v.url}">${v.format}</a></li>`
          )
        }
      } else {
        console.log("empty pluzz ws response")
      }
    },
    error: function(a) {
      console.dir({a})
      console.log(`an error occurred : ${a}`);
    },
    timeout: 2000
  })
}


var seconds  = 1,
    interval = seconds * 500;

var videoUrlDisplayTimer = setInterval(addVideosURL, interval);