Greasy Fork is available in English.

Vidéos simples sur Allociné

Corrige l'affichage des vidéos dans Allociné avec uBlock Origin

// ==UserScript==
// @name           Vidéos simples sur Allociné
// @namespace      https://openuserjs.org/users/clemente
// @match          https://www.allocine.fr/*
// @version        1.3
// @author         clemente
// @license        MIT
// @description    Corrige l'affichage des vidéos dans Allociné avec uBlock Origin
// @icon           data:image/x-icon;base64,AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAABILAAASCwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM3/AADN/wwAzf+pAM3/8ADN/9AAzf+pAM3/gwDN/0wAzf8FAM3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzf8AAM3/JQDN/+AAzf//AM3//wDN//8Azf//AM3/wQDN/w8Azf8AAAAAAAAAAAAAAAAAAM3/AADN/w4Azf8jAM3/EgDN/wYAzf8AAM3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADN/wAAzf8/AM3/8QDN//8Azf//AM3//wDN//8Azf/hAM3/LQDN/wAAAAAAAAAAAADN/wAAzf8AAM3/ZADN/94Azf/IAM3/qgDN/4kAzf9YAM3/CwDN/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM3/AADN/14Azf/8AM3//wDN//8Azf//AM3//wDN//4Azf+WAM3/DwDN/wAAzf8AAM3/AADN/ywAzf/MAM3//wDN//8Azf//AM3//wDN/+4Azf8/AM3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADN/wAAzf8AAM3/gADN//8Azf//AM3//wDN//8Azf//AM3//wDN//gAzf+qAM3/VQDN/0AA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AM3/4QDN/ycAzf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADN/wAAzf8GAM3/WwDN/5cAzf+9AM3/4gDN//0Azf+2AM3/DgDN/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wD///8A+D//APgP/wBwD/8AAA/+AAAP/gAAD/4AAA/+AAAf/gAAH/4AAB/8AAAf/AAAH/wAAB/8AAA//AAAP/wAAD/8AAA/+AAAP/gAAD/4AAA/+AAAf/gAAH/4AAB/8AAAf/AAAH/wAAB/8AAA//AOAP/wHwD//B8A////AP8=
// @inject-into    content
// @noframes
// @homepageURL    https://openuserjs.org/scripts/clemente/Vid%C3%A9os_simples_sur_Allocin%C3%A9
// @supportURL     https://openuserjs.org/scripts/clemente/Vid%C3%A9os_simples_sur_Allocin%C3%A9/issues
// ==/UserScript==


function replacePlayer() {
  const currentPlayer = document.querySelector(".video-card-player figure");
  if (!currentPlayer) return;

  const videoId = JSON.parse(currentPlayer.dataset.model).videos[0].id;
  const newPlayerUrl = `https://player.allocine.fr/${videoId}.html`;
  
  const { width, height } = currentPlayer.getBoundingClientRect();
  const newPlayer = document.createElement('iframe');
  newPlayer.src = newPlayerUrl;
  newPlayer.width = width;
  newPlayer.height = height;
  newPlayer.allow = "fullscreen";
  currentPlayer.replaceWith(newPlayer);
}

replacePlayer();