javascript:(function(){if(document.location.href.indexOf('www.ipla.tv/')>0){var f=new XMLHttpRequest();f.open('GET','/VOD/play-in-ipla/'+document.location.href.substr(document.location.href.indexOf('/vod-')+5),false);f.send();var o=f.responseText.substr(f.responseText.indexOf('ipla://playvod-1|')+17);o=o.substr(0,o.indexOf(' ')-1);document.location.href='https://justpaste.it/redirect/1cvo7/http%3A%2F%2Fgetmedia.redefine.pl%2Fvods%2Fget_vod%2F%3Fcpid%3D1%26amp%3Bua%3Dmipla%2F23%26amp%3Bmedia_id%3D'+o}else if(document.location.href.indexOf('getmedia.redefine.pl/')>0){h=JSON.parse(document.body.textContent);if(h.vod.video_hd)a=h.vod.video_hd;else if(h.vod.video){a=h.vod.video}else{a=h.vod.copies[0].url}document.location.href=a}else if(document.location.href.indexOf('://player.pl/')>0){var n=document.location.href.split(/[.,]/);var f=new XMLHttpRequest();f.open('GET','/api/?platform=ConnectedTV&terminal=Panasonic&format=json&authKey=064fda5ab26dc1dd936f5c6e84b7d3c2&v=3.1&m=getItem&id='+n[n.length-2],false);f.send();var m=eval('('+f.responseText+')');try{var h=m.item.videos.main.video_content[1].url}catch(e){console.log('samsung HD fail, trying first vid');try{var h=m.item.videos.main.video_content[0].url}catch(e){console.log('samsung fail. falling back to android')}};if(!h){function u(){var c=document.location.href.split(/[.,]/);var g=new XMLHttpRequest();var d='/api/?platform=Mobile&terminal=Android&format=json&v=3.0&authKey=b4bc971840de63d105b3166403aa1bea&type=episode&id='+c[c.length-2]+'&sort=newest&m=getItem&deviceScreenHeight=1080&deviceScreenWidth=1920';g.open('GET',d,false);g.send();try{var k=eval('('+g.responseText+')');var l=k.item.videos.main.video_content[1].url;var i=r(l)}catch(e){console.log('android 3.0 fail. falling back to android 2.0');var d='/api/?platform=Mobile&terminal=Android&format=json&v=2.0&authKey=b4bc971840de63d105b3166403aa1bea&type=episode&id='+c[c.length-2]+'&sort=newest&m=getItem&deviceScreenHeight=1080&deviceScreenWidth=1920';g.open('GET',d,false);g.send();var k=eval('('+g.responseText+')');var l=k.item.videos.main.video_content[1].url;var i=r(l)}if(i==false){return false}document.body.innerHTML='';videoUrlHtml=document.createTextNode(i);document.body.appendChild(videoUrlHtml);document.location.href=i}function r(c){try{c=c.replace('http://redir.atmcdn.pl/http/','');console.log(c);var g=CryptoJS.lib.WordArray.random(16).toString();var d='E8E2CE332A8BE7761B5E3397A18563E2';var k=new Date();var l=k.getTime();var i=l-946681200000;var q='name='+c+'&expire='+i+'\0';q=v(q);var w=CryptoJS.AES.encrypt((q),(CryptoJS.enc.Hex.parse(d)),{iv:(CryptoJS.enc.Hex.parse(g)),mode:CryptoJS.mode.CBC});var x=w.ciphertext.toString();return'http://redir.atmcdn.pl/http/'+c+'?salt='+g+'&token='+String(x).toUpperCase()}catch(e){return false}}function y(c,g){var d=16;var k=c.length%d;var l=d-k;for(var i=0;i=2){u()}}}else{document.location.href=h}}else if(document.location.href.indexOf('://bajki.onet.pl/')+document.location.href.indexOf('://vod.pl/')>0){var i=document.body.innerHTML.substr(document.body.innerHTML.indexOf('id='+atob('Ig==')+'mvp:')+8,100);i=i.substr(0,i.indexOf(atob('Ig==')));s=atob('PGh0bWw+PGhlYWQ+PHNjcmlwdD4KZnVuY3Rpb24gbShlKXsKdj1ldmFsKGUpOwptYXhiaXRyYXRlPTA7Cm1heHVybD0iIjsKZm9yIChpID0gMDsgdi5yZXN1bHRbMF0uZm9ybWF0cy53aWRlby5tcDQubGVuZ3RoID4gaTtpPWkrMSkKICB7aWYgKHBhcnNlRmxvYXQodi5yZXN1bHRbMF0uZm9ybWF0cy53aWRlby5tcDRbaV1bInZpZGVvX2JpdHJhdGUiXSk+bWF4Yml0cmF0ZSkKICAgIHsKICAgIG1heHVybD12LnJlc3VsdFswXS5mb3JtYXRzLndpZGVvLm1wNFtpXVsidXJsIl07CiAgICBtYXhiaXRyYXRlPXBhcnNlRmxvYXQodi5yZXN1bHRbMF0uZm9ybWF0cy53aWRlby5tcDRbaV1bInZpZGVvX2JpdHJhdGUiXSk7CiAgICB9CiAgfQpkb2N1bWVudC5sb2NhdGlvbi5ocmVmPW1heHVybDsKfQo8L3NjcmlwdD4KPHNjcmlwdCBzcmM9Imh0dHA6Ly9xaS5ja20ub25ldGFwaS5wbC8/Y2FsbGJhY2s9bSZib2R5W2lkXT1FQkJBRTFFNDMyNkU0Q0U5MzQzRkZFRUY1NkE5MTk4RCZib2R5W2pzb25ycGNdPTIuMCZib2R5W21ldGhvZF09Z2V0X2Fzc2V0X2RldGFpbCZib2R5W3BhcmFtc11bSURfUHVibGlrYWNqaV09UVFRUSZib2R5W3BhcmFtc11bU2VydmljZV09dm9kLm9uZXQucGwmY29udGVudC10eXBlPWFwcGxpY2F0aW9uJTJGanNvbnAmeC1vbmV0LWFwcD1wbGF5ZXIuZnJvbnQub25ldGFwaS5wbCZfPTEzNjIxNjQ5MTMxNDUiPjwvc2NyaXB0Pgo8L2hlYWQ+PGJvZHk+PC9ib2R5PjwvaHRtbD4K');s=s.replace('QQQQ',i);var win=open();with(win.document){open();write(s);close();}}else{if(document.location.href.charAt(4)=='s'){document.location.href=document.location.href.replace('https','http');}var xmlhttp=new XMLHttpRequest();m=document.body.innerHTML.substr(document.body.innerHTML.indexOf('data-video-id=')+15,8).replace(/\D/g,'');if (!/^\d+$/.test(m)) m=document.body.innerHTML.substr(document.body.innerHTML.indexOf('data-videoid=')+14,8).replace(/\D/g,'');if (!/^\d+$/.test(m)) m=document.body.innerHTML.substr(document.body.innerHTML.indexOf('/player/video?id=')+17,8);if (!/^\d+$/.test(m)) m=document.body.innerHTML.substr(document.body.innerHTML.indexOf('/player/')+8,8);if (!/^\d+$/.test(m)) m=document.body.innerHTML.substr(document.body.innerHTML.indexOf('video_id=')+9,8).replace(/\D/g,'');if (!/^\d+$/.test(m)) m=document.body.innerHTML.substr(document.body.innerHTML.indexOf('object_id:')+10,9).replace(/\D/g,'');if (!/^\d+$/.test(m)) m=document.body.innerHTML.substr(document.body.innerHTML.indexOf('amp;object_id=')+14,8).replace(/\D/g,'');if (!/^\d+$/.test(m)) m=document.body.innerHTML.substr(document.body.innerHTML.indexOf('object_id=')+10,8).replace(/\D/g,'');if (!/^\d+$/.test(m)) {n=document.location.href.split(/[?/=-]/);m=n[n.length-2];}if (!/^\d+$/.test(m)) m=n[n.length-1]; xmlhttp.open('GET','http://www.tvp.pl/shared/cdn/tokenizer_v2.php?object_id='+m,false);xmlhttp.send(); var o = eval('('+xmlhttp.responseText+')'); maxbitrate=0; maxurl='';for (i = 0; o.formats.length > i;i=i+1) {if ((o.formats[i].totalBitrate > maxbitrate) && (o.formats[i].adaptive == false)) {maxbitrate=o.formats[i].totalBitrate; maxurl=o.formats[i].url;}}document.location.href=maxurl;}})();