Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Saucenao to Yandex
- // @namespace whocares
- // @version 1.0
- // @description Adds Yandex link to Saucenao
- // @author Tarantulafag
- // @match https://saucenao.com/search.php*
- // @grant none
- // ==/UserScript==
- // get image url and add it into yandex stub
- var imglink = document.getElementById('yourimage').childNodes[0].childNodes[0].src;
- var yandexlink = "https://yandex.com/images/search?source=collections&&url=" + imglink + "&rpt=imageview";
- // create hyperlink element
- var aelm = document.createElement('a');
- aelm.innerHTML = '<span style="border: 1px solid #ba0000; background-color: #ff0000; font-size: 13px; position: relative; top: -3px;"><b> Y </b></span>';
- aelm.title = "Search Yandex";
- aelm.href = yandexlink;
- // add it next to the other links
- var parent = document.getElementById('yourimageretrylinks');
- parent.insertBefore(aelm, parent.firstChild);
- // enjoy
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement