LZT Image Chat Viewer

Данное расширение позволяет просматривать изображения в чате без наведения

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         LZT Image Chat Viewer
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Данное расширение позволяет просматривать изображения в чате без наведения
// @author       Shark | zelenka.guru/shark
// @match        https://zelenka.guru/chatbox/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=zelenka.guru
// @grant        none
// ==/UserScript==

(function() {
    setInterval(check_imgs, 1);
})();




function check_imgs(){
    let messages = document.querySelectorAll('.chat2-message-text-inner')
    for (let i = 0; i < messages.length; i++) {
        let obj = messages[i];
        let check = obj.querySelectorAll('a')
        if (check){
            for (let b = 0; b < check.length; b++){
                let link = check[b].href;
                if (link.includes('imgur.com')){
                    let img = document.createElement('img');
                    img.src = link;
                    check[b].remove();
                    obj.append(img);
                }
            }
        }
    }
}