Advertisement
Guest User

Tampermonkey-Script, Saucenao to Yandex

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