XXXClub Thumbnails Expander and Higher Resolution Loader

Make thumbnails always visible, larger, and replace with high-res images

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         XXXClub Thumbnails Expander and Higher Resolution Loader
// @namespace    http://tampermonkey.net/
// @version      0.8
// @description  Make thumbnails always visible, larger, and replace with high-res images
// @author       Anon1337Elite
// @match        *://xxxclub.to/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=xxxclub.to
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // Add CSS to make thumbnails always visible and larger
    const style = document.createElement('style');
    style.textContent = `
        .floaterimg, .thumbnail-image, .detailsimg img {
            display: inline !important;
            visibility: visible !important;
            position: relative !important;
            top: 0 !important;
            left: 0 !important;
            width: 1000px !important; /* Adjust the width as needed */
            height: auto !important; /* Maintain aspect ratio */
            margin: 10px !important; /* Add some margin if needed */
        }
    `;
    document.head.append(style);

    // Replace thumbnail URLs with higher resolution URLs
    function replaceThumbnails() {
        document.querySelectorAll('img').forEach(img => {
            if (img.src.includes('/ps/')) {
                img.src = img.src.replace('/ps/', '/p/');
            }
        });
    }

    // Run the replacement function after the page has fully loaded
    window.addEventListener('load', () => {
        replaceThumbnails();
        setTimeout(replaceThumbnails, 500); // Additional initial check after 500ms
    });

    // Use MutationObserver to replace URLs in dynamically loaded content
    const observer = new MutationObserver(replaceThumbnails);
    observer.observe(document.body, { childList: true, subtree: true });

    // Periodic check to ensure all images are high-res, every 1 second
    setInterval(replaceThumbnails, 1000);
})();