Skip to content

Instantly share code, notes, and snippets.

@felixexter
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felixexter/ecbc9f35028c0709d07c to your computer and use it in GitHub Desktop.
Save felixexter/ecbc9f35028c0709d07c to your computer and use it in GitHub Desktop.
host2image
{
"name": "host2image",
"description": "Редирект с хостинга с рекламой на картинку.",
"author": "felixexter",
"version": "2.0",
"content_scripts": [{
"all_frames": false,
"js": [ "script.js" ],
"matches": [ "http://*/*", "https://*/*" ],
"run_at": "document_end"
}],
"manifest_version": 2,
"permissions": ["tabs"]
}
(function (doc, host, blacklist) {
blacklist[host] &&
doc.querySelector(blacklist[host]) &&
(location.href = doc.querySelector(blacklist[host]).src)
})(document, location.host, {
'clip2net.com': '.image-pic-max > img',
'fastpic.ru': '#picContainer img',
'joxi.ru': '.tile-preview > img',
'monosnap.com': '#currentItem',
'prntscr.com': '.image__pic',
'snag.gy': '.mainImage'
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment