Favorites enumerator

1/23/2021

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

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