Тестовый скрипт

Решено

// ==UserScript==
// @name         Тестовый скрипт
// @namespace    http://tampermonkey.net/
// @version      2.7
// @description  Решено
// @match        https://forum.blackrussia.online/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function likeAllMessages() {
        const likeButtons = document.querySelectorAll('button.js-likeButton'); // кнопки лайка
        let count = 0;

        likeButtons.forEach(btn => {
            if (!btn.classList.contains('is-active')) { // проверяем, что ещё не лайкнуто
                btn.dispatchEvent(new MouseEvent('click', {bubbles: true, cancelable: true}));
                count++;
            }
        });

        alert(`Лайки проставлены! Всего: ${count}`);
    }

    function addLikeButton() {
        const btn = document.createElement("button");
        btn.innerText = "Поставить все лайки";
        btn.style.cssText = `
            position: fixed;
            top: 10px;
            right: 10px;
            z-index: 99999;
            background-color: #0099FF;
            color: white;
            border: none;
            padding: 10px 15px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
        `;
        btn.onclick = likeAllMessages;

        document.body.appendChild(btn);
    }

    // Ждём полной загрузки страницы
    window.addEventListener("load", () => {
        addLikeButton();
    });

})();