greasemonkey pour regarder les vidéos bakchich

Voici mon script greasemonkey du site bakchich (par exemple) (remplace le lecteur vidéo flash par un logiciel externe comme mplayer-plugin, ...).

Le prestataire de diffusion est ici vpod.tv. Et la création de script est simple :

  • bakchic.user.js
// ==UserScript==
// @name bakchich
// @namespace http://gnunux.info/
// @description bakchich video
// @include http://www.bakchich.info/article*.html
// ==/UserScript==

var as = document.getElementsByTagName('object');
asl = as.length;
if ( asl != 0 )
{
for(var i = 0; i < asl; ++i) {
asi=as[i].getElementsByTagName('param');
if ( asi[0].name == "movie" )
{
video='http://stream.vpod.tv/Bakchich/'+asi[0].value.substring(24,asi[0].value.length-18)+'/stream?seek=0';
content='<object><embed type="video/x-flv" src="'+video+'" width="428" height="323" showcontrols="1" showstatusbar="0" showdisplay="0" autostart="0"></embed></object>';
content+='<div style="border-width:1px;"><strong><a href="'+video+'">Le fichier vidéo</a></strong></div>';
as[i].innerHTML=content;
}
}
}

Si vous rencontrez des problèmes, n'hésitez pas à mettre un commentaire.

Mise à jour : mise à jour ici.

Haut de page