Greasy Fork is available in English.

Redirect to high res image

Automatically redirects the browser to the full resolution image for any landing page on imagetwist.com imgspice.com acidimg.cc imx.to pixhost.to imagebam.com imgbox.com kropic.com vipr.im

< Feedback on Redirect to high res image

Review: Good - script works

§
Posted: 25.10.2023

Excellent! easily the best userscript I've ever installed. thank you so much.

I wanted to modify it (for myself) to remove the automatic redirects on one host I am unfortunately forced to use as the least cancerous "approved" image host somewhere, and eslint nagged me about @include so I rewrote them as @match statements. Also changed imagebam to only match /view/* and noticed its part could be made a bit simpler and still work. Their annoying "landing page" always has the same DOM/JS selectors. I think imagevenue changed the way their pages look, so I had to re-write that part to get it to work there at all, which is also now why I'm sharing this:

// imagebam rewrite
    } else if (location.href.includes("imagebam.com")) {
        let anchor = document.querySelector("#continue > a");
        img = document.querySelector("img.main-image");
        if (img) {
            // redirect to full res
            location.href = img.src;
        } else {anchor.click();}
     }
// imagevenue fix
    } else if (location.href.includes("imagevenue")) {
        let img = document.querySelector("#main-image");
        if (img) {location.href = img.src;}
    }

my "fork", without any disabled hosts, is unlisted but available here

Coding JoeAuthor
§
Posted: 02.11.2023

I did not know this script would garner interest during breakage. Thanks for the upkeep. I wish I could invite others to push code. I've done a few unit tests so I'll merge with the main.

Post reply

Sign in to post a reply.