Alterar Texto da Tabela

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

当前为 2024-06-25 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

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

(function() {
    'use strict';

    // 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!';
            }
        });
    }

    // 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 });
})();