Pornhub thumbnail

Shows thumbnail in table row.

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

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

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         Pornhub thumbnail
// @namespace    http://tampermonkey.net/
// @version      0.4
// @description  Shows thumbnail in table row.
// @author       Splyez
// @match        https://pornbay.org/torrents.php*
// @grant        none
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==

/* jshint -W097 */
'use strict';


var ForbiddenCategorys = [];





var elements = $(".torrent");
 $("table[id=torrent_table] > tbody > tr:first > td:first").after("<td>Screenshot</td>");
elements.each(function(){
    var Category =$(this).find("td.center.cats_col > div").attr("title");
    //console.log(Category);
    
        var str= $(this).find("script").html();
        var re = /src=(.*\.\w\w\w)/; 
        var m;
        var src="";
        if ((m = re.exec(str)) !== null) 
        {
            if (m.index === re.lastIndex) 
            {
                re.lastIndex++;
            }
        
            if(m[1].indexOf("noimage.png") >=0)
            {
                src ="https://pornbay.org//";
            }
            src +=m[1];
            if($.inArray(Category,ForbiddenCategorys) == -1)
            {
                $("td:first",$(this)).after("<td><img style='width:300px' src='"+src+"'</img></td>");
            }
            else
            {
                 $("td:first",$(this)).after("<td><img style='width:300px' src='https://cdn2.cdnme.se/cdn/7-2/1301677/images/2010/big-no-no_87603504.jpg'</img></td>");
            }
                
            
        }
    
        
        
    
    
    
    //#torrent_table > tbody > tr:nth-child(28) > td.center.cats_col > div
    
    
  
});