ATKingdom Images

Access to full size content and download buttons

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

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

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.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

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!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

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

// ==UserScript==
// @name         ATKingdom Images
// @namespace    https://greasyfork.org/en/users/1384264-atman
// @version      2024-11-24
// @description  Access to full size content and download buttons
// @author       atman
// @match        https://*.amkingdom.com/tour/photo/*
// @match        https://*.atkpetites.com/tour/photo/*
// @match        https://*.atkpremium.com/tour/photo/*
// @match        https://*.atkexotics.com/tour/photo/*
// @match        https://*.atkhairy.com/tour/photo/*
// @match        https://*.atkarchives.com/tour/photo/*
// @grant        none
// @license      GPL-3.0
// ==/UserScript==

(function() {
    'use strict';

    const galleryBlock = document.querySelector('.content-header');
    const photoHolders = document.querySelectorAll('.photo_holder img');

    if (photoHolders) {
        photoHolders.forEach(img => {
            let originalSrc = img.src;
            let modifiedSrc = originalSrc.replace(/cdn\d{2}/, 'content').replace('thumbs', '3000');

            // Set the link
            let joinLink = img.closest('.photo_holder').parentElement;
            joinLink.href = modifiedSrc;
            joinLink.target = '_blank';
        });

        const srcUrl = photoHolders[1].src.split('.jpg')[0].slice(0, -3) + "_3000_all.zip";
        const downloadUrl = srcUrl.replace(/cdn\d{2}/, 'content').replace('thumbs', '3000');

        // Create a single download button
        if (downloadUrl) {
            const joinNow = document.querySelector('.left .member');
            const downloadButton = document.createElement('a');
            downloadButton.href = downloadUrl;
            downloadButton.textContent = 'Download ZIP';
            downloadButton.style.cssText = `
            display: block;
            margin-bottom: 10px;
            padding: 5px 10px;
            background: linear-gradient(90deg, #00d478, #297d58);
            color: #FFFFFF;
            text-decoration: none;
            border-radius: 5px;
            text-align: center;
            transition: background 0.5s linear;
        `;

            if (joinNow) {
                let joinNow = document.querySelector('.left .member');
                joinNow.innerText = '';
                joinNow.appendChild(downloadButton);
                document.querySelector('.login_section').remove();
                document.querySelector('.join_bottom').remove();
            }
            else {
                galleryBlock.insertBefore(downloadButton, galleryBlock.firstChild);
                document.querySelector('.pull-left').remove();
                document.querySelector('.pull-right').remove();
            }
        }
    }
})();