Favorites enumerator

1/23/2021

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name        Favorites enumerator
// @namespace   Violentmonkey Scripts
// @match       https://exhentai.org/favorites.php*
// @require     http://code.jquery.com/jquery-3.5.1.min.js
// @grant       none
// @version     1.0
// @author      Smelly Stinkowitz
// @description 1/23/2021
// ==/UserScript==

(function() {
    'use strict';

    var rows = $(".glink");
    var page = $(location).attr("href");
    var num  = page.indexOf("page");
    var mult = 0;
    if (num > -1)
    {
        var argu = page.substring(num);
        var eqp  = argu.indexOf("=");
        var ns   = argu.substring(eqp+1);
        mult     = parseInt(ns);
    }

    for (var i = 0; i < rows.length; i++)
    {
        var s = rows[i].innerHTML;
        var t = "{" + (50*mult + (i+1)).toString() + "} -- " + s;
        rows[i].innerHTML = t;
    }
})();