Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name HTML5 player for Xat
- // @namespace HTML5 player for Xat
- // @description Converts Xat's YouTube player into the official HTML5 player. Also fixes the image oversize bug.
- // @include *//xat.com/*
- // @Author Daniel. S.
- // @version 0.1.65
- // @run-at document-end
- // ==/UserScript==
- unsafeWindow.window.GetEmbed=function(a){var b=425,c=355;a=clean(a);embed='<embed wmode="transparent" bgcolor="#000000" ';if("$U"==a.substr(0,2))embed+='src="//ustream.tv/flash/live/'+a.substr(2)+'" flashvars="autoplay=true&brand=embed"',b=416,c=340;else if("$L"==a.substr(0,2))embed+='src="//cdn.livestream.com/grid/LSPlayer.swf?channel='+a.substr(2)+'&color=0xe7e7e7&autoPlay=true&mute=false" width="560" height="340" allowScriptAccess="always" ',b=560,c=340;else if("$Y"==a.substr(0,2))embed+='src="//live.yahoo.com/swf/player/'+
- a.substr(2)+'"',b=412,c=363;else if("$G"==a.substr(0,2))embed+='src="//video.google.com/googleplayer.swf?docId='+a.substr(2)+'&hl=en-GB&autoplay=true"',b=400,c=326;else if("$O"==a.substr(0,2))embed+='src="//www.mogulus.com/grid/PlayerV2.swf?channel='+a.substr(2)+'&externalInterface=false&backgroundColor=0xffffff&color=0x333333&showviewers=false&on=true&initialVolume=10&chatEnabled=false"',b=454,c=389;else if("$M"==a.substr(0,2))embed+='src="//lads.myspace.com/videos/vplayer.swf" flashvars="m='+a.substr(2)+
- '&v=2&type=video&a=1"',b=430,c=346;else if("$V"==a.substr(0,2))embed+='src="//www.veoh.com/videodetails2.swf?permalinkId='+a.substr(2)+'&id=anonymous&player=videodetailsembedded&videoAutoPlay=1"',b=450,c=438;else{if("$P"==a.substr(0,2))return a=a.substr(2),a=a.split(","),url="http://"+a[0]+".photobucket.com/"+a[1],embed='<a href="'+url+'" target="_blank"><img src="'+url+'" width="'+b+'" height="'+c+'" border="0"></a>';embed+='src="//www.youtube.com/embed/'+a+'?controls=1&autohide=1&fs=1&modestbranding=1&iv_load_policy=3&rel=0&autoplay=1"';
- embed=embed.replace('wmode="transparent"','frameborder="0"').replace("<embed","<iframe");b=425;c=355}return embed+=' width="'+b+'" height="'+c+'" allowfullscreen="allowfullscreen" allowscriptaccess="always" style="display:block" />'};
Advertisement
Add Comment
Please, Sign In to add comment