您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
17/03/2022 14:30:41
// ==UserScript== // @name Suprimir colunas com transbordamento de conteúdo - e-desk.com.br // @namespace Violentmonkey Scripts // @match https://nebrasil.e-desk.com.br/Portal/ListaSolicitacao.aspx // @grant none // @version 1.1 // @author Ramiro Fróes Ferrão <[email protected]> // @description 17/03/2022 14:30:41 // @license MIT // ==/UserScript== // Detalhamento trabalho existe? function suprimirDetalhamentoTrabalho() { var dtExiste = Array.from(window.document.querySelectorAll('th.rgHeader a')).some(th => th.text == 'Detalhamento Trabalho'); if (dtExiste) { // Percorre cada linha — ou tr, referente a cada chamado da fila — da tabela Array.from(window.document.getElementsByClassName('rgRow')).forEach(row => { // Procura por maior td dentro de linha (tr) da tabela var td = Array.from(row.getElementsByTagName('td')).reduce((a, b) => a.textContent.length > b.textContent.length ? a : b); if (td.offsetWidth > 500 || td.offsetHeight > 50) { td.title = td.textContent; td.style.cssText += 'white-space: nowrap; text-overflow: ellipsis;' } }); } } suprimirDetalhamentoTrabalho(); var divSolicitacoes = window.document.getElementById('cph1_uppS'); var observer = new MutationObserver(function(mutationsList, observer) { suprimirDetalhamentoTrabalho(); }); observer.observe(divSolicitacoes, {characterData: false, childList: true, attributes: false});