Удаление гудов из масс. загрузки

russian

当前为 2024-02-08 提交的版本,查看 最新版本

// ==UserScript==
// @namespace    лолзтим суета
// @name     Удаление гудов из масс. загрузки
// @version  1
// @grant    none
// @match    https://lzt.market/mass-upload/*
// @match    https://lolz.market/mass-upload/*
// @license MIT
// @description russian
// ==/UserScript==

window.addEventListener('load', function() {
    let buttonPlace = document.querySelector('.button.smallButton.fl_r');
    if (buttonPlace) {
        let button = document.createElement('button');
        button.style.width = '200px';
        button.style.height = '26px';
        button.style.backgroundColor = 'rgb(54, 54, 54)';
        button.style.color = 'white';
        button.style.borderRadius = '5px';
        button.style.boxShadow = 'none';
        button.textContent = 'Очистка гудов';
        buttonPlace.before(button);

        button.addEventListener('mousedown', function() {
            button.style.backgroundColor = 'rgb(45, 45, 45)';
        });

        button.addEventListener('mouseup', function() {
            button.style.backgroundColor = 'rgb(54, 54, 54)';
        });

        button.addEventListener('click', function() {
            let accounts = document.querySelectorAll('.account.checked');
            accounts.forEach(function(account) {
                let status = account.querySelector('.AccountStatus');
                if (status && status.children.length === 1 && status.children[0].tagName === 'A' && status.textContent.trim() === status.children[0].textContent) {
                    account.remove();
                }
            });
        });
    }
}, false);