Guest User

serialzone watchlist

a guest
Feb 14th, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $('.futu').each(function (){
  2.     if($(this).text()!='dnes'){
  3.         $(this).closest('.watchlist').removeClass('watchlist').hide();
  4.     }
  5. });
  6.  
  7. $currentDate = new Date().getTime();
  8. $('.watchname').children('a').each(function(e){
  9.     var $row=$(this).closest('.watchlist');
  10.     $r =$row;
  11.     var $ico = $row.find('li').html();
  12.     var $sname = $row.find('.watchname').html();
  13.     var $series = $row.find('.epnr').text().substr(0,3);
  14.     $.get($(this).prop('href')+'epizody/?filtr=nevidene', function (page){
  15.         var $p = $('<div/>').html(page).contents();
  16.         $($p.find('.seznam-epizod td').slice(2,5).get().reverse()).each(
  17.             function(){
  18.                 $date = $(this).find('.vysilani').text();
  19.                 $parts = $date.replace(/\s/g,'').split('.');
  20.                 $d = Date.parse($parts.reverse().join('-'));
  21.  
  22.                 $(this).find('.vysilani').remove();
  23.                 $name = $(this).find('a').text().replace(/ *\([^)]*\) */g, "");
  24.                 $(this).find('a').remove();
  25.                 $num = $(this).text().replace(".","");
  26.                 if(parseInt($num)<10){
  27.                     $num = "0"+$num;
  28.                 }
  29.  
  30.                 if($d<$currentDate){
  31.                     $row.after($('<ul class="watchlist"><li style="width:33px;">'+$ico+'</li><li class="watchname">'+$sname+'</li><li class="epnr" id="ec7821">'+$series+$num+'</li><li class="watchinfo">'+$name+'<br><span>'+$date+'</span></li>'));
  32.                 }
  33.             });
  34.     });
  35. });
Add Comment
Please, Sign In to add comment