Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. const sRequestFiltreEpizodes = x => {
  2. $.post(window.location.href, {
  3.  
  4. voice: $('#voice').val(),
  5. quality: $('#quality').val(),
  6. source: $('#source').val()
  7.  
  8. }, response => {
  9.  
  10. document.getElementsByClassName('episodes_wrapper')[0].innerHTML = $(response).find('.episodes_wrapper')[0].innerHTML;
  11.  
  12. console.log( x )
  13.  
  14.  
  15. });
  16. }
  17.  
  18. $(document).ready(() => {
  19.  
  20. $('body').on('click', '.watch-link', function () {
  21.  
  22. const episode_link = $(this).data('link'),
  23. video_wrapper = $('.content_bg')[0];
  24.  
  25. if(!episode_link) {
  26. alert('Cannot find this epizode!'); return;
  27. }
  28.  
  29. video_wrapper.innerHTML = `<iframe width="598" height="337" frameborder="0" src="${ episode_link }" allowfullscreen></iframe>`;
  30. });
  31.  
  32.  
  33. $('body').on('change', '#voice, #quality, #source', function () {
  34.  
  35. sRequestFiltreEpizodes(this.getAttribute('id'));
  36.  
  37. });
  38.  
  39. sRequestFiltreEpizodes();
  40.  
  41. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement