Pornolab Image Expander

Lets you preview torrents first image by showing on hover on the tracker listing

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         Pornolab Image Expander
// @description  Lets you preview torrents first image by showing on hover on the tracker listing
// @namespace    https://pornolab.net/forum/index.php
// @version      1.0
// @description  try to take over the world!
// @author       Anon1337Elite
// @match        https://pornolab.net/*
// @require      https://cdn.jsdelivr.net/npm/[email protected]/dist/axios.min.js
// @grant        GM_xmlhttpRequest
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
    let links = window.document.querySelectorAll('.med .tLink');

    links.forEach((el) => {
        axios.get(el.href).then(function(res) {
            let div = document.createElement('div');
            div.innerHTML = res.data;
            let source = div.querySelector('var.postImg').title;
            let img = document.createElement('img');

            img.src = source;
            img.classList.add('appendedHoverIMg');
            img.style = 'width: auto; height: auto;';

            let container = el.closest('tr').querySelector('td.row4.med.tLeft.u');
            container.appendChild(img);
        });
    });
})();