EgyBest next and previous buttons

هذا الكود يضيف لك امكانية الولوج الى الحلقة التالية او السابقة بسهولة فقط بالضغط على الزر تحت مشغل الحلقة

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         EgyBest next and previous buttons
// @version      0.1
// @description  هذا الكود يضيف لك امكانية الولوج الى الحلقة التالية او السابقة بسهولة فقط بالضغط على الزر تحت مشغل الحلقة
// @author       bil-X
// @match        https://sela.egybest.xyz/episode/*
// @grant        none
// @namespace https://greatest.deepsurf.us/users/428705
// ==/UserScript==

(function() {
    'use strict';

    var ss = document.createElement('script');
    ss.text = 'function fresh(a){document.location.replace(a);};' ;
    document.head.appendChild(ss);

    var url = window.location.href;

    var c = document.getElementsByClassName("mbox tam")[0];
    var nextURL= url.replace(url.match(/ep-(\d+)/)[0],"ep-" + (Number(url.match(/ep-(\d+)/)[1]) + 1) );
    var prevURL= url.replace(url.match(/ep-(\d+)/)[0],"ep-" + (Number(url.match(/ep-(\d+)/)[1]) - 1) );
    var sp = document.createElement("label");
    var btnNext = document.createElement("button");
    var btnPrev = document.createElement("button");

    btnNext.setAttribute("class","btn b vam");
    btnPrev.setAttribute("class","btn b vam");

    btnNext.setAttribute("id","nxt");
    btnPrev.setAttribute("id","prv");

    btnNext.setAttribute("value",nextURL);
    btnPrev.setAttribute("value",prevURL);

    btnNext.setAttribute('onclick','fresh(this.getAttribute("value"))');
    btnPrev.setAttribute('onclick','fresh(this.getAttribute("value"))');

    btnNext.innerText = "الحلقة التالية";
    btnPrev.innerText = "الحلقة السابقة";

    btnNext.setAttribute("style",'font-family: inherit;');
    btnPrev.setAttribute("style",'font-family: inherit;');

    sp.innerText = "      ";
    c.appendChild(document.createElement("br"));
    c.appendChild(btnNext);c.appendChild(sp);
    c.appendChild(btnPrev);
})();