AO Next/Prev Epp

Add to anime-odcinki.pl's players buttons: Prev & Next

Από την 05/06/2015. Δείτε την τελευταία έκδοση.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name        AO Next/Prev Epp
// author       Wiktor Radecki
// @namespace   AnimeOdcinki
// @include     http://anime-odcinki.pl/*
// @version     1
// @grant       none
// @description Add to anime-odcinki.pl's players buttons: Prev & Next
// ==/UserScript==
$(document).ready(function(){
var linki = $('#edit-jump').children();
var isNext = false;
var isPrev = true;
for(var i = 0; i < linki.length; i++)
{
 var e = linki[i];
 if(typeof(e.attributes['selected']) != 'undefined'){
  isNext = true;
  isPrev = false;
  continue;
}

if(isPrev === true && e.value !== "")
 var next = e;
if(isNext === true){
 var prev = e;
 break;
}
}

$div = $('#video-player-control');

if(typeof(prev) !== "undefined")
{
 var plink = prev.value.split("::")[1];
 jQuery('<div/>', {
    id: 'video-player-mode',
    linkid: '1000',
    title: 'Poprzedni odcinek',
    rel: 'external',
    text: '<<',
    style: 'background-color: #126533',
    onclick: 'location.href="'.concat(plink).concat('";')
  }).prependTo($div);
}

if(typeof(next) !== "undefined")
{
 var nlink = next.value.split("::")[1];
 jQuery('<div/>', {
    id: 'video-player-mode',
    linkid: '1001',
    title: 'Nastepny odcinek',
    rel: 'external',
    text: '>>',
    style: 'background-color: #126533',
    onclick: 'location.href="'.concat(nlink).concat('";')
  }).appendTo($div);
}
});