');} else if (window.episodesx.selected === 0) {if ($('.btn.next_page').length) {} else {$('.nav-links').append('
');}}//console.log(window.episodesx+' index= '+window.xis33);$('.next_page').click(function(ee) {console.log('starting ep change');$('.nextepikit').fadeOut(600);if (window.xis33 <= 0) {window.xis33 = 0;window.xis33 = window.xis33 + 1;} else {if (window.episodesx[window.xis33] === undefined) {} else {window.xis33 = window.xis33 + 1;}}window.dinext3 = window.dinext3 - 1; //increment to next option.if (localStorage.getItem("autoskipNext") === "yes") {if (window.isHLSx !== "no") {window.hls.destroy();}changeEpisode();ee.preventDefault();}});$('.prev_page').click(function(ee) {window.xis33 = window.xis33 - 1;window.dinext3 = window.dinext3 + 1; //increment to next option.if (localStorage.getItem("autoskipNext") === "yes") {if (window.isHLSx !== "no") {window.hls.destroy();}changeEpisode();ee.preventDefault();}});}, 2000);function updateQuality(newQuality) {window.hls.levels.forEach((level, levelIndex) => {if (level.height === newQuality) {console.log("Found quality match with " + newQuality);window.hls.currentLevel = levelIndex;}});}var series_slug, isLoaded, Episodetimerkx, nextEpDelay;var currenautoskip;window.nextEpDelay = 6;window.currenautoskip = false;if (localStorage.getItem("autoskipNext") === "yes") {window.currenautoskip = true;}window.isLoaded = false;window.series_slug = window.location.pathname; //unique episode slug//resume videofunction pskipsk(datax) {window.skiptimeskkx = datax;console.log(window.skiptimeskkx);if (window.skiptimeskkx !== null) {window.restt = window.skiptimeskkx.split("/");console.log('skip times set! new = ' + window.skiptimeskkx);} else {window.restt = null;}}function skipIntro(options) {window.clearInterval(window.Episodetimerkx);var restt = "";var str = options.times;var autoskipxx = options.autoskip;var hidebtnsx = options.hidebtns;restt = str.split("/");var player = options.playerf;// create skip intro buttonvar gjiup = 0;var gjifrf = 0;var skiptimenew = null;player.on('ready', event => {var isLoadefd;var seekFunctfion = function() {if (isLoadefd) return;isLoadefd = true;if (window.skiptimeskkx !== null) {console.log('Player ready skip times = ' + window.skiptimeskkx);window.restt = window.skiptimeskkx.split("/");} else {window.restt = null;}player.one('firstplay', pskipsk);};player.one('playing', seekFunctfion);player.one('loadedmetadata', seekFunctfion);});if (window.skiptimeskkx === null) {player.on('timeupdate', function(e) {var current_time = player.currentTime;var duration = player.duration;var time = Math.floor(current_time);if (Math.floor(time) === Math.floor(duration) && Math.floor(duration) > 0) {console.log('inside a1 ' + Math.floor(time) + ' duration=' + Math.floor(duration));if (window.ran9x <= 0) {time = 0;console.log('video end detected dur=' + player.duration + ' current= ' + player.currentTime);player.pause();window.ran9x = window.ran9x + 1;$('.btn.next_page')[0].click();}}});} else {var isPausedtimer = false;player.on('timeupdate', function(e) {var current_time = player.currentTime;var duration = player.duration;var time = Math.floor(current_time);if (Math.floor(time) === Math.floor(duration) && Math.floor(duration) > 0) {console.log('inside a1 ' + Math.floor(time) + ' duration=' + Math.floor(duration));if (window.ran9x <= 0) {time = 0;// localStorage.removeItem(window.series_slug);console.log('video end detected dur=' + player.duration + ' current= ' + player.currentTime);player.pause();window.ran9x = window.ran9x + 1;//window.clearInterval(window.Episodetimerkx);$('.btn.next_page')[0].click();}} else {// console.log('a2 = '+Math.floor(time)+' duration='+Math.floor(duration));}if (window.isLoaded) {localStorage.setItem(window.series_slug, time);}if (window.skiptimeskkx !== null) {window.restt = window.skiptimeskkx.split("/");if (player.currentTime >= window.restt[0] && player.currentTime < window.restt[1]) {if (gjiup < 1) {$('.nextepikit').fadeOut(600);gjifrf = 0;if (window.restt[0] == 0) {} else {$('.skipbtnx').css({opacity: 0,display: 'inline-block'}).animate({opacity: 1}, 600);gjifrf = 0;if (localStorage.getItem("autoskipIntro") === "yes") {$('.skipbtnx').click();}}}gjiup = gjiup + 1;} else if (player.currentTime >= window.restt[1]) { //skipto time$('.skipbtnx').fadeOut(600);gjiup = 0;if (window.restt[2] === '') {window.restt[2] = '9999';}if (player.currentTime >= window.restt[2]) {if (gjifrf < 1) {if (window.nextEpxx === null) {} else {if ((player.duration - player.currentTime) >= 10) {if (localStorage.getItem("autoskipNext") === "yes") {$('.nextepikit').css({opacity: 0,display: 'inline-block'}).animate({opacity: 1}, 600);var timeleft = window.nextEpDelay;document.getElementById("eptimerkir").innerHTML = timeleft;window.Episodetimerkx = window.setInterval(function() {document.getElementById("eptimerkir").innerHTML = timeleft;if (timeleft <= 0 && !player.paused) {console.log('timeleft = ' + timeleft);setTimeout(function() {window.clearInterval(window.Episodetimerkx);$('.btn.next_page')[0].click();timeleft = window.nextEpDelay;}, 400);window.clearInterval(window.Episodetimerkx);}if (!player.paused) {timeleft = timeleft - 1;}}, 1000);}}}}gjifrf = gjifrf + 1;} else {window.clearInterval(Episodetimerkx);$('.nextepikit').fadeOut(600);gjifrf = 0;}}}});}}; //end skip script$('body').on('click', '.autonextD', function() {if ($('.autonextD > i').attr('class') === "fas fa-check-square") {$('.autonextD i').attr('class', 'fa fa-square');window.autonextD = 'no';localStorage.setItem("autoskipNext", 'no');} else {$('.autonextD > i').attr('class', 'fas fa-check-square');window.autonextD = 'yes';localStorage.setItem("autoskipNext", 'yes');}});$('body').on('click', '.autointroD', function() {if ($('.autointroD > i').attr('class') === "fas fa-check-square") {$('.autointroD i').attr('class', 'fa fa-square');localStorage.setItem("autoskipIntro", 'no');} else {$('.autointroD > i').attr('class', 'fas fa-check-square');localStorage.setItem("autoskipIntro", 'yes');}});$('body').on('click', '.autoplayD', function() {if ($('.autoplayD > i').attr('class') === "fas fa-check-square") {$('.autoplayD i').attr('class', 'fa fa-square');localStorage.setItem("autoPlayEp", 'no');} else {$('.autoplayD > i').attr('class', 'fas fa-check-square');localStorage.setItem("autoPlayEp", 'yes');}});var gjiup = 0;var gjifrf = 0;function grabVideo() {function updateQuality(newQuality) {window.hls.levels.forEach((level, levelIndex) => {if (level.height === newQuality) {console.log("Found quality match with " + newQuality);window.hls.currentLevel = levelIndex;}});}return new Promise((resolve) => {var video = document.querySelector("video");var source = video.getElementsByTagName("source")[0].src;const defaultOptionsf = {controls: ["play-large","rewind","play","fast-forward","progress","current-time","duration","mute","volume","captions","settings","pip","airplay","fullscreen"], quality: {default: 1080,options: [1080, 720, 576, 480, 360, 240],},keyboard: { focused: true, global: true }};if (video.getElementsByTagName("source")[0].type === "video/mp4") {const playerf = new Plyr(video, defaultOptionsf);window.player = playerf;return resolve(playerf);window.isHLSx = "no";} else {if (Hls.isSupported()) {const hls = new Hls();hls.loadSource(source);window.isHLSx = "yes";hls.on(Hls.Events.MANIFEST_PARSED, function(event, data) {const availableQualities = hls.levels.map((l) => l.height);availableQualities.reverse();defaultOptionsf.quality = {default: availableQualities[0],options: availableQualities,forced: true,onChange: (e) => updateQuality(e)};const playerf = new Plyr(video, defaultOptionsf);window.player = playerf;resolve(playerf);});hls.attachMedia(video);window.hls = hls;} else {const playerf = new Plyr(video, defaultOptionsf);window.player = playerf;resolve(playerf);}}});}const player = await grabVideo();player.on('ready', function(event) {var instance = event.detail.plyr;var seekFunction = function() {if (window.isLoaded) return;window.isLoaded = true;var seek;seek = parseInt(localStorage.getItem(window.series_slug));var tss9 = player.duration - seek;console.log('time left = ' + tss9);if (tss9 <= 55) {console.log('resetting');seek = 0;}player.currentTime = seek;if (window.skiptimeskkx !== null) {console.log('Player ready skip times = ' + window.skiptimeskkx);window.restt = window.skiptimeskkx.split("/");} else {window.restt = null;}if (localStorage.getItem("autoPlayEp") === "yes") {document.getElementById("player").play();}};player.on('playing', seekFunction);player.on('play', seekFunction);player.on('loadedmetadata', seekFunction);var skipOps = {playerf: player,autoskip: window.currenautoskip,hidebtns: false, //if hidebtns = true {autoskip = true}times: window.skiptimeskkx};if (window.skiptimeskkx !== null) {if (window.skipsLoadedx === 0) {skipIntro(skipOps);}window.skipsLoadedx = window.skipsLoadedx + 1;$('.plyr__video-wrapper').append('
Skip Intro
');var stylex = 'background-color: rgba(149, 182, 208, 0.69); display: none; padding: 7px; text-shadow:1px 1px 2px black; border-radius: 3px; padding-right: 11px; box-shadow: 0px 0px 5px black; padding-left: 11px; border:2px solid #8c7c9b; position: absolute; bottom: 50px; right:10px; font-size: 13px; cursor: pointer;z-index:86667; color:white !important;';var cancelstylei = 'color:white !important; background-color: rgba(149, 182, 208, 0.69);display: inline-block;z-index:86667;padding: 5px 10px;text-shadow: black 1px 1px 2px;border-radius: 3px;box-shadow: black 0px 0px 5px;border: 2px solid rgb(140, 124, 155);position: absolute;left: -50px;top: -0.5px;';$('.plyr__video-wrapper').append('
Next episode in ' + window.nextEpDelay + '
');$('.cancelNextAuto').click(function(e) {$('.nextepikit').fadeOut(600);window.clearInterval(window.Episodetimerkx);e.stopPropagation();});$('.skipcreditskix').click(function() {player.currentTime(restt[1]);player.play();});$('.nextepikit').click(function() {window.clearInterval(window.Episodetimerkx);$('.btn.next_page')[0].click();});$('.skipbtnx').click(function() {player.currentTime = parseInt(window.restt[1]);var totalrungucheck = 0;var gucheck1 = setInterval(function() {if (player.seeking && !player.playing) {totalrungucheck++;if (totalrungucheck >= 100) {clearInterval(gucheck1);}} else {document.getElementById("player").play();clearInterval(gucheck1);}}, 200);});}$('.plyr__video-wrapper').append('
Changing Episode
');});window.errorcounft = 1;window.player.on('error', function() {totalservers = $(".host-select:first .autoservers").length;console.log('error on video, totalservers = ' + totalservers + ' error count = ' + window.errorcounft);window.prevErrorid = window.errorcounft;if (window.errorcounft < totalservers) {window.errorcounft = window.errorcounft + 1;$('.host-select:first .autoservers:nth-child(' + window.prevErrorid + ')').attr('selectedserver', 'false');$('.host-select:first .autoservers:nth-child(' + window.prevErrorid + ')').removeAttr('selected');$('.host-select:first .autoservers:nth-child(' + window.prevErrorid + ')').attr('errorx', 'true');$('.host-select:first .autoservers:nth-child(' + window.errorcounft + ')').attr('selectedserver', 'true');$('.host-select:first .autoservers:nth-child(' + window.errorcounft + ')').attr('selected', 'selected');var serverHashnew = $('.host-select:first .autoservers:nth-child(' + window.errorcounft + ')').attr('server');console.log('video error on ' + $('.host-select:first .autoservers:nth-child(' + window.prevErrorid + ')').text());if ($('.host-select:first .autoservers:nth-child(' + window.errorcounft + ')').attr('isEmbed') === 'true') {$('#iframeBackup').remove();$('#chapter-video-frame').prepend('
');} else {loadServerxx(serverHashnew);}} else {// All Server(s) failed to load.}});})();});
Αμα ο server δεν λειτουργεί καντε ανανεωση (Reload video) η δοκιμαστε τους υπόλοιπους servers.