Skip to content

Instantly share code, notes, and snippets.

@ghstbny
Last active June 13, 2024 23:59
Show Gist options
  • Save ghstbny/7bd8ab6594fa95c8525f7bac4545222c to your computer and use it in GitHub Desktop.
Save ghstbny/7bd8ab6594fa95c8525f7bac4545222c to your computer and use it in GitHub Desktop.
Display images in full page from multiple sites
// ==UserScript==
// @name full-image
// @namespace https://github.com/ghstbny
// @match https://22pixx.xyz/*/*
// @match https://bunkr.*/i/*
// @match https://bunkr.ac/i/*
// @match https://bunkr.black/i/*
// @match https://bunkr.cat/i/*
// @match https://bunkr.la/i/*
// @match https://bunkr.media/i/*
// @match https://bunkr.red/i/*
// @match https://bunkr.si/i/*
// @match https://bunkr.site/i/*
// @match https://bunkr.sk/i/*
// @match https://bunkr.su/i/*
// @match https://bunkr.ws/i/*
// @match https://bunkrr.*/i/*
// @match https://bunkrr.ru/i/*
// @match https://bunkrr.su/i/*
// @match https://ibb.co/*
// @match https://imagetwist.com/*/*
// @match https://img.trafficimage.club/image/*
// @match https://imgadult.com/img-*
// @match https://imgbaron.com/*
// @match https://imgbox.com/*
// @match https://imgdawgknuttz.com/img-*
// @match https://imgdrive.net/img-*
// @match https://imgjjtr.sbs/*
// @match https://imgqnnnebrf.sbs/*
// @match https://imgtraffic.com/*/*
// @match https://imgwwqbm.shop/*
// @match https://infosman.top/img-*
// @match https://jpg3.su/img/*
// @match https://jpg4.su/img/*
// @match https://kropic.com/*
// @match https://kvador.com/*
// @match https://picbaron.com/*
// @match https://picuenr.sbs/*
// @match https://pixhost.to/show/*
// @match https://postimg.cc/*
// @match https://rintor.space/image/*
// @match https://shotcan.com/image/*
// @match https://teenyxo.com/image/*
// @match https://thotimg.xyz/*
// @match https://trafficimage.club/image/*
// @match https://trans.firm.in/img-*
// @match https://www.imagebam.com/view/*
// @match https://xxxaddicted.online/image/*
// @match https://xxxwebdlxxx.top/img-*
// @grant none
// @version 1.0.14
// @author ghstbny
// @description display images in full page
// @downloadURL https://gist.github.com/ghstbny/7bd8ab6594fa95c8525f7bac4545222c/raw/full-image.user.js
// ==/UserScript==
function waitForElm(selector, el) {
el ??= document;
return new Promise((resolve) => {
if (el.querySelector(selector)) {
return resolve(el.querySelector(selector));
}
const observer = new MutationObserver((mutations) => {
if (el.querySelector(selector)) {
resolve(el.querySelector(selector));
observer.disconnect();
}
});
observer.observe(el, {
childList: true,
subtree: true,
});
});
}
const setLocation = (element) => {
location = element.src;
};
switch (location.hostname) {
case "22pixx.xyz":
case "imgtraffic.com": {
waitForElm("center a > img").then(setLocation);
break;
}
case "imgadult.com":
case "imgdrive.net": {
waitForElm("a.overlay_ad_link").then((element) => element.click());
waitForElm("img.centred_resized").then(setLocation);
break;
}
case "imgbox.com": {
waitForElm("#img").then(setLocation);
break;
}
case "imgdawgknuttz.com":
case "infosman.top":
case "trans.firm.in": {
waitForElm('input[name="imgContinue"]').then((element) => element.click());
waitForElm("img.centred_resized").then(setLocation);
break;
}
case "ibb.co":
case "img.trafficimage.club":
case "jpg3.su":
case "jpg4.su":
case "teenyxo.com":
case "trafficimage.club":
case "rintor.space":
case "shotcan.com":
case "xxxaddicted.online": {
waitForElm("#image-viewer-loader").then((element) => element.click());
waitForElm("#image-viewer-container").then((root) => {
waitForElm(
'img:not([src$=".md.gif"]):not([src$=".md.jpeg"]):not([src$=".md.jpg"]):not([src$=".md.png"]):not([src$=".md.webp"])',
root
).then(setLocation);
});
break;
}
case "imagetwist.com":
case "imgbaron.com":
case "picbaron.com":
case "kropic.com":
case "kvador.com": {
waitForElm('input[name="next"]').then((element) => element.click());
waitForElm("img.pic").then(setLocation);
break;
}
case "imgjjtr.sbs":
case "imgqnnnebrf.sbs":
case "imgwwqbm.shop":
case "picuenr.sbs": {
waitForElm("li:not(.d-none) > a > #uhaha").then((element) => element.click());
waitForElm('#newImgE[src^="http"]').then(setLocation);
break;
}
case "pixhost.to": {
waitForElm("#image").then(setLocation);
break;
}
case "postimg.cc": {
waitForElm("#main-image").then(setLocation);
break;
}
case "www.imagebam.com": {
waitForElm("#continue > a").then((element) => element.click());
waitForElm("img.main-image").then(setLocation);
break;
}
case "thotimg.xyz": {
waitForElm("center > img").then(setLocation);
break;
}
case "xxxwebdlxxx.top": {
waitForElm("img.centred").then(setLocation);
break;
}
// partial match
case location.hostname: {
if (location.hostname.startsWith("bunkr")) {
waitForElm("div.lightgallery > img").then(setLocation);
}
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment