Alterar Texto da Tabela

Altera "Atendente" para "VC" e "Solicitante" para "VERIFICAR".

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Alterar Texto da Tabela
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Altera "Atendente" para "VC" e "Solicitante" para "VERIFICAR".
// @author       MaxwGPT
// @match        https://nebrasil.e-desk.com.br/Portal/ListaSolicitacao.aspx*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Estilo para cor vermelha
    const redTextStyle = 'color: red;';


    // Função para alterar o texto da tabela
    function alterarTextoTabela() {
        // Seleciona todas as células da tabela
        let cells = document.querySelectorAll('td');

        // Percorre todas as células
        cells.forEach(function(cell) {
            // Altera "Atendente" para "VC"
            if (cell.textContent.trim() === 'Atendente') {
                cell.textContent = 'VC';
            }

            // Altera "Solicitante" para "Cliente"
            if (cell.textContent.trim() === 'Solicitante') {
                cell.textContent = 'VERIFICAR!';
                cell.style.cssText = redTextStyle;
            }
        });
    }

    // Aguarda o carregamento completo da página antes de executar a função
    window.addEventListener('load', alterarTextoTabela);

    // Observa mudanças na página (caso a tabela seja carregada dinamicamente)
    const observer = new MutationObserver(alterarTextoTabela);
    observer.observe(document.body, { childList: true, subtree: true });
})();