AO Next/Prev Epp

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

Version vom 05.06.2015. Aktuellste Version

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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.

(I already have a user style manager, let me install it!)

// ==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);
}
});