Doujins Loader

Get all of the urls from a page on Doujins.com

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         Doujins Loader
// @description  Get all of the urls from a page on Doujins.com
// @namespace    https://sleazyfork.org/en/users/182876-belphegor
// @version      1
// @author       https://sleazyfork.org/en/users/182876-belphegor
// @match        https://doujins.com/*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    window.onload = function () {
        var imgDoujin = document.querySelector("img.doujin")
        var urlList = []

        function allLoadedCallback () {
            var counter = 0
            window.doujinUrls = urlList
            window.doujinWGET = urlList.map(function (url) {
                counter++
                return `wget "${url}" -O ${counter}.jpg`
            }).join('\n')
            console.log(window.doujinWGET)
        }

        if (imgDoujin) {
            var imgDoujinNext = imgDoujin
            var iv = setInterval(function () {
                urlList.push(imgDoujinNext.dataset.file)
                if (imgDoujinNext.nextElementSibling && imgDoujinNext.nextElementSibling.dataset.file) {
                    imgDoujinNext = imgDoujinNext.nextElementSibling
                    console.log('loading next')
                } else {
                    clearInterval(iv);
                    allLoadedCallback();
                }
            }, 600)
        }
    }
})();