Sleazy Fork is available in English.

Hentai in New Tabs by One Click

Make Lewding Easier

Από την 21/10/2022. Δείτε την τελευταία έκδοση.

// ==UserScript==
// @name         Hentai in New Tabs by One Click
// @namespace    https://github.com/CinnamonJui
// @version      0.1.1
// @description  Make Lewding Easier
// @author       CinnamonJui
// @match        https://exhentai.org/g/*
// @match        https://e-hentai.org/g/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=e-hentai.org
// @grant        none
// @license MIT
// ==/UserScript==

/* jshint esversion:6 */

function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}

(function() {
    'use strict';
    const rowNumSec = document.getElementById('gdo2');
    addGlobalStyle('#gdo2 { width: 350px !important; }');

    const newTabBtn = document.createElement('div');
    newTabBtn.textContent = 'New Tab';
    newTabBtn.className = 'tha nosel';
    newTabBtn.onclick = (e) => {
        e.preventDefault();
        const gallery = document.getElementById('gdt');
        const imgs = Array(...gallery.children).filter( e => e.className === 'gdtl');
        const links = imgs.map(e => e.children[0].href);
        links.map(l => window.open(l, '_blank'));
    };

    rowNumSec.append(newTabBtn);
})();