так по такому же способу картинки достаю из писси.инфо и драйв2.ру
Так можно скрипт написать и на тампермонкей запустить. У меня есть скрипт, получает автоматом прямую ссылку на картинку сделанную лайтшотом и загруженную в облако
CODE Format
// ==UserScript==
// @name Direct Images
// @version 0.6.29 - 2019-08-31
// @description Redirect from preview pages to images directly
// @author Infocatcher
// @namespace dev/null
// @run-at document-start
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_log
// @include about:blank?UserScripts/options/Direct_Images
// Get image by id:
// @include http://img*.imagevenue.com/img.php?image=*
// @include http://ipicture.ru/Gallery/Viewfull/*.html
// @include http://*.ipicture.ru/Gallery/Viewfull/*.html
// @include http://www.picamatic.com/view/*
// @include http://download.su/photo/*
// @include http://*imageup.ru/img*/*.html
// @include http://*pixshock.net/*.html
// @include http://*image-share.com/image.php?*
// @include http://*image-share.com/*.html
// @include http://*10pix.ru/view/*
// @include http://дерьмовый хостинг/show.php*.html
// @include http://opicture.ru/gallery/view/*.html
// @include http://picamigo.com/show.php/*.html
// @include http://pikucha.ru/*
// @include http://keep4u.ru/full/*.html
// @include http://www.imagebanana.com/view/*
// @include http://yfrog.com/*
// @include http://radikal.ua/full/*.html
// @include http://upyourpic.org/images/*.html
// @include http://*postimg.com/image/*
// @include http://www.bild.me/bild.php?file=*
// @include http://www.pictureshack.ru/view_*
// @include http://pixs.ru/showimage/*
// @include http://minus.com/*
// @include http://*overpic.net/viewer.php?file=*
// @include http://pictube.ru/?v=*
// @include http://owely.com/*
// @include http://uaimage.com/image/*
// @include http://vfl.ru/fotos/*.html*
// @include https://geekpics.net/view/*
// @include http://grab.by/*
// @include https://someimage.com/*
// @include http://skrinshoter.ru/*
// @include http://*.imagetitan.com/img.php?image=*
// @include http://www.picshare.ru/view/*
// URL-based redirect:
// @include http://smages.com/*.htm
// @include http://anub.ru/pic/*
// @include http://*onlinedisk.ru/image/*
// @include http://*onlinedisk.ru/view/*
// @include http://*.fotoupload.ru/viewer.php?file=*
// @include http://image.vanilla.su/viewer.php?file=*
// @include http://prostofotka.ru/viewer.php?file=*
// @include http://foto-screen.ru/viewer.php?file=*
// @include http://foto-screen.org/viewer.php?file=*
// @include http://foto-boom.org/viewer.php?file=*
// @include http://pixmaster.net/viewer.php?file=*
// @include http://itrash.ru/idb/*.htm*
// @include http://*.itrash.ru/idb/*.htm*
// @include http://*.sendpic.ru/*.html
// @include http://*imget.ru/show/?img=*
// @include http://fastpic.msk.ru/?v=*
// @include http://youpic.su/view.php?id=*
// @include https://jpegshare.net/*.html
// @include http://imagelike.org/?v=*
// @include http://rupix.org/viewer.php?*
// @include http://all-poster.ru/?v=*
// @include http://picsee.net/*.html
// @include http://img.bigstream.ru/viewer.php?file=*
// @include http://pix.toile-libre.org/?img=*
// @include http://fast-picture.ru/images/*.html
// @include http://pasteboard.co/*
// @include http://img-host.org.ua/?v=*
// @include http://images.gameru.net/image/*.html
// @match *://imgdepo.com/show/*
// @include http://stick.kz/?v=*
// @include http://imagestun.com/hosting/?v=*
// @include http://picua.org/?v=*
// @match *://*.giphy.com/media/*
// @include http://scrin.org/?v=*
// @include http://lostpix.com/?v=*
// @include http://picplus.ru/ful/*
// Get image by src:
// @include http://*imagepix.org/image/*.html
// @include http://saveimg.ru/show-image.php?id=*
// @include http://mediapix.ru/pic.php?id=*
// @include http://pixs.ru/showimage/*
// @include http://postimage.org/image/*
// @include http://uaimages.com/viewer.php?*
// @include http://7image.ru/v.php?*
// @include http://mepic.ru/view/?*
// @include http://simplest-image-hosting.net/*
// @include http://pics.kz/view/*
// @include http://*imagepost.ru/?v=*
// @include http://imgtheif.com/show-image.php?id=*
// @include http://imgtheif.com/image/*.html
// @match *://hostingkartinok.com/show-image.php?*
// @include http://image.kz/*
// @include http://imm.io/*
// @include http://narodpix.net/?v=*
// @include http://www.narodpix.net/?v=*
// @include http://www.imagebam.com/image/*
// @include http://*radikal.ru/F/*.html*
// @match *://*.radikal.ru/*fp/*
// @include http://radikal.ru/big/*
// @include http://radikal-foto.ru/F/*.html*
// @include http://radical-foto.ru/F/*.html*
// @include http://radikal-foto.ru/*fp/*
// @include http://radical-foto.ru/*fp/*
// @include http://f-page.ru/*fp/*
// @include http://f-lite.ru/*fp/*
// @include http://f-picture.net/*fp/*
// @include http://firepic.org/?v=*
// @include http://www.firepic.org/?v=*
// @include http://you-logo.ru/show-image.php?*
// @include http://uploadimagex.com/view.php?*
// @include http://toroff.net/?v=*
// @match *://clip2net.com/s/*
// @include http://screencast.com/*/*
// @include http://img.lastusja.ru/*
// @match *://gyazo.com/*
// @include http://imgchilibum.ru/*.php?id=*
// @include http://imglink.ru/show-image.php?id=*
// @include http://www.fotolink.su/v.php?id=*
// @include http://netpics.org/image/*
// @include http://*ximage.ru/index.php?id=*
// @include http://*ii4.ru/image-*.html*
// @include http://freescreens.ru/*/
// @include http://powerlogo.ru/show-image.php?id=*
// @include https://savepice.ru/full/*.html*
// @include http://funkyimg.com/viewer.php?*
// @include http://funkyimg.com/view/*
// Get image from thumbnail:
// @match *://piccash.net/*/
// @match *://pic4you.ru/*/
// @match *://picforall.ru/*
// @match *://payforpic.ru/*
// @match *://pix-x.net/*
// @match *://picclick.ru/*
// @match *://imgclick.ru/*
// @match *://imgbase.ru/*
// @match *://picpays.ru/*
// Other:
// @include http://img*.imageshack.us/*
// @include http://imageshack.us/photo/*
// @include http://imageshack.us/f/*/
// @include http://imageshack.com/photo/*
// @include http://savepic.ru/*.htm
// @include http://savepic.org/*.htm
// @include http://savepic.net/*.htm
// @include http://savepic.su/*.htm
// @include http://piccy.info/*view*/*
// @include http://*xtupload.com/*.html
// @include http://*picatom.com/*.html
// @include http://*fotosik.pl/pokaz_obrazek/*.html
// @include http://fotki.yandex.ru/users/*/view/*
// @include http://southwc.ru/*.htm
// @include http://www.pict.com/view/*
// @match *://imageban.ru/show/*
// @include http://habreffect.ru/*
// @include http://rghost.ru/*
// @include http://rghost.net/*
// @include http://rgho.st/*
// @include http://itmages.ru/image/*
// @include https://itmages.ru/image/*
// @include http://itmages.com/image/*
// @include https://itmages.com/image/*
// @include http://*floomby.ru/*/*
// @include http://www.kinopoisk.ru/picture/*/or/1/
// @include http://tenpic.ru/view.php?*
// @include http://imghost.in/pt-*.html
// @include http://img*.binimage.org/*
// @include http://forlazypeople.com/?v=*
// @include http://upit.biz/?v=*
// @match *://imgur.com/*
// @exclude *://imgur.com/
// @exclude *://imgur.com/a/*
// @exclude *://imgur.com/gallery/*
// @exclude *://imgur.com/user/*
// @include http://*.goodfon.ru/download*
// @include http://*.goodfon.su/download*
// @include http://*.badfon.ru/download*
// @include http://*image-upload.net/*.html
// @include http://imageshost.ru/links/*
// @include http://imageshost.ru/photo/*.html
// @include http://screenshotuploader.com/s/*
// @include http://prntscr.com/*
// @include http://ifotki.info/*.html
// @include http://*.photobucket.com/*?action=view*
// @include http://*.photobucket.com/*.html*
// @include http://tinypic.com/view.php?pic=*
// @include http://*fotohost.by/show/*
// @match *://fastpic.ru/view/*.html*
// @include http://joxi.ru/*
// @include http://joxi.net/*
// @match *://postimg.org/image/*
// @include http://i-fotki.info/*.html
// @include http://4put.ru/*.php?*
// @include http://fotkidepo.ru/?id=photo:*
// @include http://ixbt.photo/?id=photo:*
// @include http://lostpic.net/?*
// @include http://lostpic.net/image/*
// @include http://*.lostpic.net/image/*
// @include http://pic.lg.ua/*
// @include https://cardse.net/image/*
// @include http://image2you.ru/*/
// @match *://cl.ly/*
// @include http://*.riotpixels.com/games/*/screenshots/*
// @match *://prnt.sc/*
// @include https://snag.gy/*.*
// @include http://www.directupload.net/*.htm*
// @include https://ibb.co/*
// ==/UserScript==
(function di(event) {
var allowBack = false; // default value
// You can change greasemonkey.scriptvals.dev/null/Direct Images.allowBack in about:config
if(typeof GM_getValue == "function") {
var _allowBack = GM_getValue("allowBack", undefined);
if(_allowBack == undefined)
GM_setValue("allowBack", allowBack);
else
allowBack = _allowBack;
}
var loc = location.href;
if(
loc == "about:blank?UserScripts/options/Direct_Images"
&& typeof GM_getValue == "function"
) {
document.title = "Direct Images Options";
var body = document.body || document.documentElement;
var label = _e("label");
label.htmlFor = "allowBack";
var input = _e("input");
input.id = "allowBack";
input.type = "checkbox";
input.checked = allowBack;
var handleClick = function() {
GM_setValue("allowBack", input.checked);
};
input.addEventListener("click", handleClick, false);
label.appendChild(input);
label.appendChild(document.createTextNode("Allow back (don't remove page from back/forward history)"));
body.appendChild(label);
window.addEventListener("unload", function destroy(e) {
window.removeEventListener("unload", destroy, false);
input.removeEventListener("click", handleClick, false);
}, false);
destroy();
return;
}
var ael = di.ael || (di.ael = window.addEventListener);
var rel = di.rel || (di.rel = window.removeEventListener);
var host = (function() { // a.example.com => example.com
var tld = "msk.ru|org.ua"; // Only currently used TLD, for better performance
var tldRe = new RegExp("[^.]+\\.(?:" + tld.replace(/\./g, "\\.") + "|[^.]+)$");
return location.hostname.match(tldRe)[0];
})();
var _iid, _img, _src, _clearDoc;
function _e(nn) {
return document.createElementNS("http://www.w3.org/1999/xhtml", nn);
}
function $(id) {
return document.getElementById(id);
}
function $t(tag, node) {
return (node || document).getElementsByTagName(tag);
}
function $c(className, node) {
if(!node)
node = document;
if(node.getElementsByClassName)
return node.getElementsByClassName(className);
var classNames = className.split(/\s+/);
var count = classNames.length;
var regs = [];
for(var i = 0; i < count; ++i)
regs.push(new RegExp("(^|\\s)" + classNames[i].replace(/[\\\/.^$+*?|()\[\]{}]/g, "\\$&") + "(\\s|$)"));
var out = [];
var nodes = node.getElementsByTagName("*");
main:
for(var i = 0, l = nodes.length; i < l; ++i) {
var n = nodes[i];
var c = n.className;
for(var j = 0; j < count; ++j)
if(!regs[j].test(c))
continue main;
out.push(n);
}
return out;
}
function $i(mask, node, exclude) {
var imgs = node
? node.getElementsByTagName("img")
: document.images;
for(var i = 0, len = imgs.length; i < len; ++i) {
var src = imgs[i].src;
if(
src && mask.test(src)
&& (!exclude || !exclude.test(src))
)
return src;
}
return "";
}
function $ie(mask, exclude, node) {
return $i(mask, node, exclude);
}
function $inp(mask, node) {
var inps = (node || document).getElementsByTagName("input");
for(var i = 0, len = inps.length; i < len; ++i) {
var val = inps[i].value;
if(mask.test(val))
return val;
}
return "";
}
function $a(mask, node) {
var links = (node || document).getElementsByTagName("a");
for(var i = 0, len = links.length; i < len; ++i) {
var link = links[i];
if(mask.test(link.href))
return link;
}
return null;
}
function $th(imgRe, thumbRe, replacements) {
var src = $i(imgRe);
if(src)
return src;
src = $i(thumbRe);
if(src) for(var find in replacements)
src = src.replace(find, replacements[find]);
return src;
}
function $u(node) {
if(node && node.nodeName.toLowerCase() == "input")
return $url(node.value);
return "";
}
function $url(s) {
if(/^https?:\/\/\S+$/.test(s) && !/html?$/.test(s))
return s;
return "";
}
function $dec(url) {
try {
return decodeURIComponent(url);
}
catch(e) {
}
return url;
}
function redirect(url) {
if(allowBack)
location.href = url;
else
location.replace(url);
}
function clearDoc(src) {
window.stop();
var html = _e("html");
var head = _e("head");
var title = _e("title");
var imgName = $dec(src.match(/[^\/]*$/)[0]);
title.appendChild(document.createTextNode(imgName + " - Direct Images"));
head.appendChild(title);
var link = _e("link");
link.rel = "shortcut icon";
link.href = src;
head.appendChild(link);
var style = _e("style");
style.type = "text/css";
style.appendChild(document.createTextNode("\
html, html > body {\n\
margin: 0; padding: 0;\n\
width: auto !important; height: auto !important; /* for https://userstyles.org/styles/101141/ru-adlist-css-fixes */\n\
}\n\
.zoomIn { cursor: -moz-zoom-in; cursor: -webkit-zoom-in; cursor: zoom-in; }\n\
.zoomOut { cursor: -moz-zoom-out; cursor: -webkit-zoom-out; cursor: zoom-out; }\n\
/* From resource://gre/res/TopLevelImageDocument.css */\n\
@media not print {\n\
img {\n\
text-align: center;\n\
position: absolute;\n\
margin: auto;\n\
top: 0;\n\
right: 0;\n\
bottom: 0;\n\
left: 0;\n\
}\n\
}"
));
head.appendChild(style);
var meta = _e("meta");
meta.name = "viewport";
meta.content = "width=device-width; height=device-height;";
head.appendChild(meta);
link = _e("link");
link.rel = "stylesheet";
link.href = "resource://gre/res/TopLevelImageDocument.css";
head.appendChild(link);
link = link.cloneNode(true);
link.href = "chrome://global/skin/TopLevelImageDocument.css";
head.appendChild(link);
link = link.cloneNode(true);
link.href = "chrome://global/skin/media/TopLevelImageDocument.css"; // Firefox 19.0a1
head.appendChild(link);
var body = _e("body");
var img = _e("img");
var stl = img.style;
stl.maxWidth = window.innerWidth + "px";
stl.maxHeight = window.innerHeight + "px";
var originalSize = false;
var simpleZoom, destroySimpleZoom;
ael.call(window, "click", simpleZoom = function(e) {
if(e.button != 0 || e.target != img)
return;
originalSize = !originalSize;
if(originalSize) {
stl.maxWidth = stl.maxHeight = null;
scrollToClicked(e, img.width, img.height);
}
else {
stl.maxWidth = window.innerWidth + "px";
stl.maxHeight = window.innerHeight + "px";
}
}, true);
ael.call(window, "unload", destroySimpleZoom = function() {
rel.call(window, "unload", destroySimpleZoom, false);
rel.call(window, "click", simpleZoom, true);
}, false);
ael.call(img, "load", function initResizer(e) {
rel.call(img, e.type, initResizer, false);
destroySimpleZoom();
stl.maxWidth = stl.maxHeight = null;
var iw = img.width;
var ih = img.height;
var size = iw + " × " + ih;
function fitSize(check) {
var ww = window.innerWidth;
var wh = window.innerHeight;
var canFit = iw > ww || ih > wh;
if(check)
return canFit;
if(canFit) {
var persent = Math.min(ww/iw, wh/ih);
stl.width = iw*persent + "px";
stl.height = ih*persent + "px";
stl.marginTop = null;
persent = Math.floor(persent*100); // Inherit Firefox built-in resizer behavior...
document.title = imgName + " (" + size + ", " + persent + "%)" + " - Direct Images";
}
else {
origSize();
}
setCursor(canFit);
return canFit;
}
function origSize() {
stl.width = stl.height = null;
document.title = imgName + " (" + size + ")" + " - Direct Images";
if(ih > window.innerHeight) // Override styles from resource://gre/res/TopLevelImageDocument.css
stl.marginTop = 0;
}
function setCursor(canFit) {
if(canFit == undefined)
canFit = fitSize(true);
img.className = canFit
? originalSize
? "zoomOut"
: "zoomIn"
: "";
}
function toggleFitSize(e) {
if(e.button != 0 || e.target != img)
return;
if(!fitSize(true)) { // Nothing to toggle
setCursor(false);
return;
}
originalSize = !originalSize;
if(originalSize) {
origSize();
scrollToClicked(e, iw, ih);
}
else
fitSize();
setCursor(true);
}
function onResize(e) {
if(!originalSize)
fitSize();
setCursor();
}
ael.call(window, "click", toggleFitSize, true);
ael.call(window, "resize", onResize, false);
ael.call(window, "unload", function destroy(e) {
rel.call(window, e.type, destroy, false);
rel.call(window, "click", toggleFitSize, true);
rel.call(window, "resize", onResize, false);
}, false);
if(originalSize) {
origSize();
setCursor();
}
else {
fitSize();
}
}, false);
function scrollToClicked(e, iw, ih) {
if(!iw || !ih)
return;
var ww = window.innerWidth;
var wh = window.innerHeight;
var dx = e.clientX/ww;
var dy = e.clientY/wh;
window.scrollTo(
Math.max(0, dx*iw - ww/2),
Math.max(0, dy*ih - wh/2)
);
}
img.src = img.alt = src;
body.appendChild(img);
html.appendChild(head);
html.appendChild(body);
for(var lc; lc = document.lastChild; )
document.removeChild(lc);
document.appendChild(html);
// Prevent modifications, used new Function() to bypass unsafeWindow things in GreaseMonkey
if(Object.defineProperty)
new window.Function('var i = document.images[0]; Object.defineProperty(i, "src", { value: i.src });')();
if(window.Node && Node.prototype) {
var m = [
"appendChild",
"insertBefore",
"removeChild",
"replaceChild",
//"setAttribute",
"removeAttribute",
"addEventListener"
];
new window.Function("var p = Node.prototype; p." + m.join(" = p.") + " = function() {};")();
}
if(window.EventTarget && EventTarget.prototype)
new window.Function("EventTarget.prototype.addEventListener = function() {};")();
var tmr = setTimeout(function checkCSS(_stopTime) {
if(window.getComputedStyle(img, null).textAlign == "center")
return; // Looks like all works fine
// Let's reload styles...
GM_log("Force reload styles");
var links = document.getElementsByTagName("link");
for(var i = 0, l = links.length; i < l; ++i) {
var link = links[i];
if(link.rel == "stylesheet")
link.href = link.href.replace(/\?.*$/, "") + "?" + new Date().getTime();
}
var styles = document.getElementsByTagName("style");
for(var i = 0, l = styles.length; i < l; ++i) {
var style = styles[i];
if(style.type != "text/css")
continue;
style.type = "text/force-reload";
style.type = "text/css";
}
if(!_stopTime || _stopTime > new Date().getTime())
setTimeout(checkCSS, 100, _stopTime || new Date().getTime() + 2e3);
}, 0);
GM_log("Remove timers: " + (tmr - 1));
while(--tmr)
clearTimeout(tmr);
}
hostLoop:
switch(host) {
// Get image by id:
case "imagevenue.com": _iid = "thepic"; break;
case "ipicture.ru": _iid = "newImg"; break;
case "picamatic.com": _iid = "pic"; break;
case "download.su": _iid = "thepic"; break;
case "imageup.ru": _iid = "image"; break;
case "pixshock.net": _iid = "mi"; break;
case "image-share.com": _iid = "image"; break;
case "10pix.ru": _iid = "image"; break;
case "дерьмовый хостинг": _iid = "img_obj"; break;
case "opicture.ru": _iid = "newImg"; break;
case "picamigo.com": _iid = "img_obj"; break;
case "pikucha.ru": _iid = "image"; break;
case "keep4u.ru": _iid = "foto"; break;
case "imagebanana.com": _iid = "image"; break;
case "yfrog.com": _iid = "main_image"; break;
case "radikal.ua": _iid = "image"; break;
case "upyourpic.org": _iid = "mainimage"; break;
case "postimg.com": _iid = "image"; break;
case "bild.me": _iid = "Bild"; break;
case "pictureshack.ru": _iid = "image"; break;
case "pixs.ru": _iid = "imgg"; break;
case "minus.com": _iid = "current_image"; break;
case "overpic.net": _iid = "main_img"; break;
case "pictube.ru": _iid = "full_image"; break;
case "owely.com": _iid = "issueImg"; break;
case "uaimage.com": _iid = "im"; break;
case "vfl.ru": _iid = "img_foto"; break;
case "geekpics.net": _iid = "full_image"; break;
case "grab.by": _iid = "thegrab"; break;
case "someimage.com": _iid = "viewimage"; break;
case "skrinshoter.ru": _iid = "screenshot-image"; break;
case "imagetitan.com": _iid = "image"; break;
case "picshare.ru": _iid = "image"; break;
// URL-based redirect:
case "smages.com":
if(/^https?:\/\/(?:www\.)?smages\.com\/(.*?)\.htm/i.test(loc))
_src = "http://smages.com/i/" + RegExp.$1;
break;
case "anub.ru":
if(/^https?:\/\/(?:www\.)?anub\.ru\/pic\/(.+)$/i.test(loc))
_src = "http://anub.ru/uploads/" + RegExp.$1;
break;
case "onlinedisk.ru":
if(/^https?:\/\/(?:www\.)?onlinedisk\.ru\/(?:image|view)\/(\d+)(?:\/.*)?$/i.test(loc))
_src = "http://onlinedisk.ru/get_image.php?id=" + RegExp.$1;
break;
case "fotoupload.ru": //~ todo: remove?
case "vanilla.su": //~ todo: remove?
case "prostofotka.ru": //~ todo: remove?
case "foto-screen.ru": //~ todo: remove?
case "foto-screen.org":
case "foto-boom.org":
case "pixmaster.net":
_src = loc.replace("/viewer.php?file=", "/images/");
break;
case "itrash.ru":
case "sendpic.ru":
_src = loc.replace(/\.html?$/, "");
break;
case "imget.ru":
_src = loc.replace("/show/?img=", "");
break;
case "fastpic.msk.ru":
_src = loc.replace("/?v=", "/images/");
break;
case "youpic.su":
_src = loc.replace(/^(https?:\/\/).*?\?id=/, "$1");
break;
case "jpegshare.net":
_src = loc
.replace(/jpegshare\.net\//, "$&images/")
.replace(/\.html$/, "");
break;
case "imagelike.org":
_src = loc.replace("/?v=", "/images/");
break;
case "rupix.org":
_src = loc.replace("/viewer.php?file=", "/images/");
break;
case "all-poster.ru":
_src = loc.replace("/?v=", "/images/");
break;
case "picsee.net":
_src = loc
.replace(/^https?:\/\/(?:\w+\.)*picsee\.net\//, "$&upload/")
.replace(/\.html$/, "");
break;
case "bigstream.ru":
_src = loc.replace("/viewer.php?file=", "/i/");
break;
case "toile-libre.org":
_src = loc.replace("/?img=", "/upload/original/");
break;
case "fast-picture.ru":
_src = loc.replace(/\.html?$/, "");
break;
case "pasteboard.co":
_src = loc.replace("http://pasteboard.co/", "https://cdn.pbrd.co/images/");
break;
case "img-host.org.ua":
_src = loc.replace("/?v=", "/images/");
break;
case "gameru.net":
_src = loc
.replace("/image/", "/image/direct/")
.replace(/\.html$/, "");
break;
case "imgdepo.com"
Сообщение отредактировал imenno - Sep 3 2019, 20:37