RARBG Show thumbnails in torrent lists (Plain JavaScript)

Shows the thumbnail on every item of the torrent list, highlight matched torrent in searchpattern

Stan na 16-09-2017. Zobacz najnowsza wersja.

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         RARBG Show thumbnails in torrent lists (Plain JavaScript)
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Shows the thumbnail on every item of the torrent list, highlight matched torrent in searchpattern
// @author       You
// @include     /^(https?:)?\/\/(www\.)?rarbg\.(is|to|com)\/(torrents\.php.*|catalog\/.*|top10)$/
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var searchpattern = [
        'Yonitale',
        'RylskyArt',
        'MetArt',
        'EroticBeauty',
        'Errotica-Archives',
        'SexArt',
        'FemJoy',
        'Hegre',
        'X-Art',
        'VivThomas',
        'Nubiles',
        'TheLifeErotic',
        'Domai'
    ];
    searchpattern.forEach(function(el, i){
        searchpattern[i] = el.toLowerCase();
    });
    var matches = document.querySelectorAll('.lista2 .lista a');
    var regExp = /\\'([^)]+)\\'/;
    if(matches && matches.length) {
        for(var i=0; i<matches.length; i++) {
            if(matches[i] && matches[i].onmouseover) {
                var inh = matches[i].innerHTML.toLowerCase();
                for(var j=0; j<searchpattern.length; j++) {
                    if(inh.includes(searchpattern[j])) {
                        matches[i].style.color = '#ff4db0';
                        matches[i].style.background = 'pink';
                        break;
                    }
                }
                var match = regExp.exec(matches[i].onmouseover);
                if(match) {
                    matches[i].parentNode.previousSibling.innerHTML = '<img src="'+match[1]+'"></img>';
                }
            }
        }
    }
})();