Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const sRequestFiltreEpizodes = x => {
- $.post(window.location.href, {
- voice: $('#voice').val(),
- quality: $('#quality').val(),
- source: $('#source').val()
- }, response => {
- if(x === 'voice') {
- $('#quality')[0].innerHTML = $(response).find('#quality')[0].innerHTML;
- $('#source')[0].innerHTML = $(response).find('#source')[0].innerHTML;
- }
- else if(x === 'quality') {
- $('#source')[0].innerHTML = $(response).find('#source')[0].innerHTML;
- }
- document.getElementsByClassName('episodes_wrapper')[0].innerHTML = $(response).find('.episodes_wrapper')[0].innerHTML;
- });
- }
- $(document).ready(() => {
- $('body').on('click', '.watch-link', function () {
- const episode_link = $(this).data('link'),
- video_wrapper = $('.content_bg')[0];
- if(!episode_link) {
- alert('Cannot find this epizode!'); return;
- }
- video_wrapper.innerHTML = `<iframe width="598" height="337" frameborder="0" src="${ episode_link }" allowfullscreen></iframe>`;
- });
- $('body').on('change', '#voice, #quality, #source', function () {
- sRequestFiltreEpizodes(this.getAttribute('id'));
- });
- sRequestFiltreEpizodes();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement