PussyTorrents display images on list page

The list page shows the images from the torrent data sheet.

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

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το 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    PussyTorrents display images on list page 
// @name:hu     PussyTorrents torrenten, képek megjelenítése listaoldalon
// @author    Kepek
// @description The list page shows the images from the torrent data sheet.
// @description:hu A lista oldalon megmutatja a képeket, az adatlapról kiolvasva
// @namespace  https://openuserjs.org/users/Kepek
// @license     MIT
// @version    1
// @include    https://pussytorrents.org/torrents/browse*
// @compatible  Greasemonkey
// @require     https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js
// ==/UserScript==

//if the images do not appear, press F5


var site = "https://pussytorrents.org";

var delay_milliseconds = 100;

// press F5
if ( window.location.href.indexOf('#') > -1 ) {
	var new_url = window.location.href.replace(/\#/g, '?');
  window.location.href = new_url;
}

// images from description
$('tr.even, tr.odd').each(function (index, value) {

  setTimeout(function () {

    var item = $('<tr style="width: max-content; padding-top: 10px;">');
    
    $(value).after( item.load( '/torrent/' + value.id + ' #torrentImages', function (responseText, textStatus, req) {

      $('#torrentImages', $(this)).replaceWith('<td colspan="8">' + $('#torrentImages', $(this)).html() +'</td>');

      $('a', $(this)).each(function (index2) {
        
        if ( index2 < 3 ) {
        	var image_url = $(this).attr('href');

        	$('img', this).attr("src", image_url);  
        }
        
      });

    }));

  }, (delay_milliseconds * (index + 1)));

});