Genopets char decoder

поменяю

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Genopets char decoder
// @namespace    http://tampermonkey.net/
// @author       0xDeadOS
// @version      1.1
// @description  поменяю
// @match        *://*/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=genopets.me
// @grant        GM_registerMenuCommand
// ==/UserScript==
GM_registerMenuCommand("Перевести страницу.", Main);
var dic = {
    "A": "M8.232 0.199999V1.572L0.42 7.032V10H2.366V8.11L8.232 4.022V10H10.192V0.199999H8.232Z",
    "B": "M4.326 0.199999V2.16H8.232V8.04H4.326V10H10.192V0.199999H4.326ZM6.286 4.12H2.366V0.199999H0.42V10H2.366V6.08H6.286V4.12Z",
    "C": "M2.856 0.199999H0.42V10H2.366V3.014L7.252 10H9.702L2.856 0.199999Z",
    "D": "M4.326 0.199999V2.16H8.232V8.04H4.326V10H10.192V0.199999H4.326ZM2.366 10V0.199999H0.42V10H2.366ZM6.286 6.08V4.12H4.326V6.08H6.286Z",
    "E": "M2.366 2.16V0.199999H0.42V2.16H2.366ZM10.192 6.094V4.134H6.958L9.702 0.199999H7.252L0.42 10H10.192V8.04H4.228L5.586 6.094H10.192Z",
    "F": "M2.366 8.04V6.08H6.286V4.12H2.366V0.199999H0.42V10H10.192V8.04H2.366Z",
    "G": "M0.42 0.199999V10H2.366V2.16H10.192V0.199999H0.42ZM4.326 6.094H8.232V10H10.192V4.134H4.326V6.094Z",
    "H": "M12.152 2.16V0.199999H0.42V2.16H12.152ZM9.408 4.134H6.958L4.228 8.04H0.42V10H12.152V8.04H6.678L9.408 4.134Z",
    "I": "M2.80057 10V8.04H0.85457V10H2.80057ZM3.29057 0.199999H0.85457L7.68657 10H10.1366L3.29057 0.199999Z",
    "J": "M2.366 2.16V0.199999H0.42V2.16H2.366ZM9.702 0.213999L4.228 8.054H0.42V10H5.306L10.192 3.014V10H12.138V0.213999H9.702Z",
    "K": "M12.138 10V8.054H10.192V10H12.138ZM7.252 0.199999L2.366 7.2V0.199999H0.42V10H2.856L8.33 2.16H12.138V0.199999H7.252Z",
    "L": "M2.366 2.16V0.199999H0.42V2.16H2.366ZM2.366 10V8.054H0.42V10H2.366ZM4.326 0.199999V2.16H8.232V8.04H4.326V10H10.192V0.199999H4.326Z",
    "M": "M6.286 10V6.08H4.326V10H6.286ZM10.192 10V0.199999H8.232V10H10.192ZM0.42 10H2.366V2.16H4.326V4.12H6.286V0.199999H0.42V10Z",
    "N": "M8.232 0.199999V8.04H4.326V10H10.192V0.199999H8.232ZM4.326 6.08H6.286V0.199999H0.42V10H2.366V2.16H4.326V6.08Z",
    "O": "M10.78 8.04L5.306 0.199999H0.42V2.16H4.228L8.33 8.04H0.42V10H12.152V8.04H10.78Z",
    "P": "M0.42 0.199999V10H2.366V3.014L4.508 6.08H6.958L4.228 2.16H8.232V6.08H10.192V0.199999H0.42Z",
    "Q": "M12.152 10V8.04H0.42V10H12.152ZM6.958 6.08H9.408L5.306 0.199999H0.42V2.16H4.228L6.958 6.08Z",
    "R": "M10.192 6.08V0.199999H0.42V10H2.366V3.014L7.252 10H9.702L4.228 2.16H8.232V6.08H10.192Z",
    "S": "M2.366 10V8.04H0.42V10H2.366ZM10.192 6.08V0.199999H0.42L7.252 10H9.702L4.228 2.16H8.232V6.08H10.192Z",
    "T": "M12.152 6.08V0.199999H10.192V6.08H12.152ZM2.366 6.08V0.199999H0.42V6.08H2.366ZM7.252 0.199999H5.306V8.04H0.42V10H12.152V8.04H7.252V0.199999Z",
    "U": "M8.232 0.199999V8.04H5.278L2.366 6.024V0.199999H0.42V7.102L4.578 10H10.192V0.199999H8.232Z",
    "V": "M2.366 10V8.054H0.42V10H2.366ZM10.192 0.199999V7.2L5.306 0.199999H0.42V2.16H4.228L9.702 10H12.138V0.199999H10.192Z",
    "W": "M9.982 10V0.199999H8.036V10H9.982ZM2.366 8.054V0.199999H0.42V10H3.444L7.546 4.134H5.096L2.366 8.054Z",
    "X": "M10.276 4.134L7.546 8.054V0.199999H4.508L0.42 6.08H2.856L5.586 2.16V10H8.624L12.726 4.134H10.276Z",
    "Y": "M6.286 6.08V4.12H2.366V0.199999H0.42V6.08H6.286ZM8.232 0.199999V8.04H0.42V10H10.192V0.199999H8.232Z",
    "Z": "M10.192 2.16V0.199999H8.232V2.16H10.192ZM3.346 0.199999H0.896L6.384 8.04H2.366V4.134H0.42V10H10.192L3.346 0.199999Z",
    "1": "M5.054 2.08V0.12H0.42V2.08H5.054Z",
    "2": "M5.054 2.16V0.199999H0.42V2.16H5.054ZM5.054 10V8.04H0.42V10H5.054Z",
    "3": "M5.054 2.16V0.199999H0.42V2.16H5.054ZM5.054 10V8.04H0.42V10H5.054ZM9.702 6.08V4.12H0.42V6.08H9.702Z",
    "4": "M5.054 6.08V4.12H0.42V6.08H5.054ZM9.702 2.16V0.199999H0.42V2.16H9.702ZM9.702 10V8.04H0.42V10H9.702Z",
    "5": "M9.702 2.16V0.199999H0.42V2.16H9.702ZM9.702 10V8.04H0.42V10H9.702Z",
    "6": "M9.702 6.08V4.12H5.054V6.08H9.702ZM9.702 10V8.04H0.42V10H9.702ZM9.702 2.16V0.199999H0.42V2.16H9.702Z",
    "7": "M9.702 10V8.04H5.054V10H9.702ZM9.702 2.16V0.199999H5.054V2.16H9.702ZM9.702 6.08V4.12H0.42V6.08H9.702Z",
    "8": "M5.054 2.16V0.199999H0.42V2.16H5.054ZM9.702 6.08V4.12H0.42V6.08H9.702ZM9.702 10V8.04H0.42V10H9.702Z",
    "9": "M9.702 10V8.04H5.054V10H9.702ZM9.702 6.08V4.12H0.42V6.08H9.702ZM9.702 2.16V0.199999H0.42V2.16H9.702Z",
    "0": "M9.702 2.16V0.199999H0.42V2.16H9.702ZM9.702 6.08V4.12H0.42V6.08H9.702ZM9.702 10V8.04H0.42V10H9.702Z",
    '“': "M0.42 0.199999L1.778 2.16L0.42 4.12H4.228V0.199999H0.42Z",
    '„': "M4.228 0.199999H0.42V4.12H4.228L2.856 2.16L4.228 0.199999Z",
    "‘": "M2.856 2.16H2.366V0.199999H0.42V4.12H4.228L2.856 2.16Z",
    "‚": "M0.42 0.199999L1.778 2.16H2.268V4.12H4.228V0.199999H0.42Z",
    ".": "M2.366 2V0.0539998H0.42V2H2.366Z",
    ",": "M2.856 0.0539998H0.42V2H4.228L2.856 0.0539998Z",
    ":": "M2.366 2V0.0539998H0.42V2H2.366ZM5.292 2V0.0539998H3.346V2H5.292Z"
}

function Main() {
    console.log("Переводим текст.");
    var elements = document.querySelectorAll(".css-540lu8");
    console.log("Найдено символов: " + document.length);
    for( let i = 0; i < elements.length; i++ ) {
        var attr = elements[i].querySelector('svg > path').getAttribute('d');
        for( var item in dic )
        {
            if( dic[item] == attr )
            {
                elements[i].innerHTML = '';
                var _node = document.createElement('a');
                _node.setAttribute('class','translation');
                _node.innerHTML = item;
                elements[i].appendChild(_node);
            }
        }
        console.log("Идёт процесс перевода.")
    }
    console.log("Перевод закончен.")
}