Wide Hentai 2019

Wide E-Hentai and Exhentai - support for wide 1920px monitors

< Commentaires sur Wide Hentai 2019

Avis: OK - le script fonctionne, mais souffre de quelques problèmes

§
Posté le: 11/10/2019
Édité le: 11/10/2019

Doesn't work on vertical screen

To fix this, instead of fixed 1890px width, use something more elastic, like this: (my quick hack fix, works but needs more refinement)

var w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
c("ido")[0].style.maxWidth = (w-25)+"px";

if (w>1600)
{
    c("itg gld")[0].style = "grid-template-columns: repeat(7,1fr)";
}
if (w < 1600)
{
    c("itg gld")[0].style = "grid-template-columns: repeat(4,1fr)";
}

MY FULL CODE AS IS, FOR COPY PASTE:

var w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;

function $(id) {return document.getElementById(id);}
function c(id) {return document.getElementsByClassName(id);}
if(window.location.pathname.indexOf("/g/") != 0)
{
    //c("ido")[0].style.maxWidth = "1895px";
    c("ido")[0].style.maxWidth = (w-25)+"px";

    if (w>1600)
    {
        c("itg gld")[0].style = "grid-template-columns: repeat(7,1fr)";
    }
    if (w < 1600)
    {
        c("itg gld")[0].style = "grid-template-columns: repeat(4,1fr)";
    }

}
else // /g/
{
    c("ptt")[0].style.margin = "45px auto 2px";
    if(c("gdtl").length != 0) // large thumbs hathperk
    {
        //$("gdt").style.maxWidth = "1890px";
        $("gdt").style.maxWidth = (w-30)+"px";
        var im = c("gdtl");
        for(var i=0; i< im.length; i++)
        {
            im[i].style.width = "234px";
        }
    }
    else
    {
        //$("gdt").style.maxWidth = "1681px";
        $("gdt").style.maxWidth = (w-30)+"px";
    }
}

Poster une réponse

Connectez-vous pour poster une réponse.