Last active
October 2, 2018 12:04
-
-
Save Ser-Gen/8938ca6a16de5069f156a867da63c60c to your computer and use it in GitHub Desktop.
Ашот
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Ашоты, Асланы | |
// @namespace ashots | |
// @include *//prnt.sc/* | |
// @include *//cloud.mail.ru/public/* | |
// @include *//yadi.sk/i/* | |
// @include *//joxi.net/* | |
// @include *//monosnap.com/file/* | |
// @include *//screenshots.firefox.com/* | |
// @include *//imgur.com/* | |
// @version 7 | |
// @grant none | |
// ==/UserScript== | |
var path; | |
// ашот | |
if (document.getElementById('screenshot-image')) { | |
path = document.getElementById('screenshot-image').src; | |
} | |
// майл, имгуро | |
else if (document.querySelector('[rel="image_src"]')) { | |
path = document.querySelector('[rel="image_src"]').getAttribute('href'); | |
} | |
// яндекс | |
else if (document.querySelector('.content__image-preview')) { | |
path = document.querySelector('.content__image-preview').src; | |
} | |
// жокси | |
else if (document.querySelector('.js-tile-link-zoom img')) { | |
path = document.querySelector('.js-tile-link-zoom img').src; | |
} | |
// монаснап | |
else if (window.location.href.match('monosnap.com/file') && document.querySelector('#img')) { | |
path = document.querySelector('#img').value.match(/http(.*)\.png/)[0]; | |
} | |
// фурифокс | |
else if (window.location.href.match('screenshots.firefox.com') && document.querySelector('#clipImage')) { | |
path = document.querySelector('#clipImage').src; | |
}; | |
if (path) { | |
window.location.href = path; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment