freezoo / wyylde

// ==UserScript==
// @name        wyylde
// @namespace   https://openuserjs.org/meta/freezoo
// @include     http*://wyylde.com/*
// @include     http*://m.wyylde.com/*
// @include     http*://www.wyylde.com/*
// @include     http*://netechangisme.com/*/mediacenter/*
// @include     http*://www.netechangisme.com/*/mediacenter/*
// @version     2.4
// @grant       none
// @run-at      document-start
// @licence     MIT
// ==/UserScript==

function createBut() {
  var makeBut = function (cont, src) {
    var a = document.createElement("a");
    var b = document.createElement("button");
    cont.appendChild(a);
    a.appendChild(b);
    b.id = "myBut";
    b.innerHTML ="vérif image";
    b.type = "button";
    b.style.display="block";
    b.style.position = "fixed";
    b.style.left = 0;
    b.style.bottom = 0;
    b.style.zindex="10000";
    b.onclick = function() {
      var d = document.createElement('a');
      d.href = 'https://tineye.com/search/?url=' + src();
      d.target = '_blank';
      document.body.appendChild(d);
      d.click();
      document.body.removeChild(d);
    };
  };
  var mc = document.getElementsByClassName("ngdialog mediaContainer");
  if (mc.length > 0 && !document.getElementById("myBut")) {
    makeBut(mc[0], function(){var a=document.getElementsByClassName("photoBig")[0].src; return a});
  }
  mc = document.getElementById("mediacenter");
  if (mc  && !document.getElementById("myBut")) {
    makeBut(mc, function(){var a = document.getElementById("show").src; return a});
  }
  document.querySelectorAll(".mobile-pict-comment:not(.verifed)").forEach(function(value){
    try{
        var verif = document.createElement("a");
        verif.className = "dTCell vaM w30 pad5 BMR5";
        verif.href = 'https://tineye.com/search/?url=' + value.parentNode.parentNode.getElementsByTagName("img")[0].src;
        verif.target = "_blank";
        verif.innerHTML = "Vérif";
        value.parentNode.appendChild(verif);
        value.className += " verifed";
    } catch(e){};
  });
}
setInterval(createBut, 1000);