Zelenka.guru Задом наперёд

Some useful utilities for Lolzteam

// ==UserScript==
// @name         Zelenka.guru Задом наперёд
// @namespace    https://greasyfork.org/ru/users/1187197-molihan
// @namespace    https://greasyfork.org/ru/users/1142494-llimonix
// @version      0.2
// @description  Some useful utilities for Lolzteam
// @description:ru  Полезные улучшения для Lolzteam
// @author       Molihan&llimonix
// @match        https://zelenka.guru/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=zelenka.guru
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
    const LZTBdiv = document.querySelector('div.fr-element.fr-view.fr-element-scroll-visible');
    // Функция для оборачивания текста в теги [B][/B] и центрирования
    function wrapTextInBoldAndCenter(message) {
        LZTBdiv.focus();
        LZTBdiv.innerHTML = `<div style="font-weight: bold;">${message}</div>`;
    }

    LZTBdiv.addEventListener("keypress", function(event) {
        const LZTBtext = document.querySelector('div.fr-element.fr-view.fr-element-scroll-visible').textContent;
        wrapTextInBoldAndCenter(LZTBtext)
    });
})();