Firefox 浏览器附加组件
  • 扩展
  • 主题
    • 适用于 Firefox
    • 字典和语言包
    • 其他浏览器网站
    • 适用于 Android 的附加组件
登录
Criticality Field Highlighter 预览

Criticality Field Highlighter 作者: zminkobinko

Colors criticality (td.customfield_11429) cells based on their criticality number.

0(0 条评价)0(0 条评价)
1 个用户1 个用户
下载 Firefox 并安装扩展
下载文件

扩展元数据

关于此扩展
Made for the volvo vira

source code:

(function () {
"use strict";

// Maps a criticality number to a background color.
const COLOR_MAP = {
300: "#e53935", // red
100: "#ff5722", // red-orange
75: "#ff9800", // orange
50: "#ffeb3b", // yellow
30: "#cddc39", // lime
10: "#4caf50" // green
};

const SELECTOR = "td.customfield_11429";

function colorCell(cell) {
// Extract the first standalone number from the cell, ignoring any
// surrounding markup/labels (e.g. "High (300)").
const match = cell.textContent.match(/\d+/);
if (!match) return;

const color = COLOR_MAP[parseInt(match[0], 10)];
if (!color) return;

cell.style.backgroundColor = color;


}

function colorAll(root) {
const cells =
root.nodeType === Node.ELEMENT_NODE && root.matches?.(SELECTOR)
? [root]
: [];
root.querySelectorAll?.(SELECTOR).forEach((c) => cells.push(c));
cells.forEach(colorCell);
}

// Initial pass.
colorAll(document);

// Re-apply when the page updates dynamically (e.g. AJAX-loaded tables).
const observer = new MutationObserver((mutations) => {
for (const m of mutations) {
m.addedNodes.forEach((node) => {
if (node.nodeType === Node.ELEMENT_NODE) colorAll(node);
});
}
});

observer.observe(document.body || document.documentElement, {
childList: true,
subtree: true
});
})();
评分 0(1 位用户)
登录以评价此扩展
目前尚无评分

已保存星级评分

5
0
4
0
3
0
2
0
1
0
尚无评价
权限与数据

必要权限:

  • 访问您在所有网站的数据

收集的数据:

  • 开发者称此扩展无需收集数据。
详细了解
更多信息
附加组件链接
  • 复制附加组件 ID
版本
1.0.0
大小
8.77 KB
上次更新
2 个月前 (2026年6月22日)
相关分类
  • 外观
许可证
MIT 许可证
版本历史
  • 查看所有版本
添加到收藏集
举报此附加组件
转至 Mozilla 主页

附加组件

  • 关于
  • Firefox 附加组件博客
  • 扩展工坊
  • 开发者中心
  • 开发者政策
  • 社区博客
  • 论坛
  • 报告缺陷
  • 评价指南

下载

  • Download Firefox
  • Windows
  • macOS
  • iOS
  • Android
  • Linux
  • All

最新版本

  • Nightly
  • Beta

商用版 Firefox

  • Enterprise

社区

  • Connect
  • Contribute
  • Developer

关注

  • Instagram
  • YouTube
  • TikTok
  • Bluesky
  • Podcast
  • 隐私
  • Cookie
  • 法律

除非另有注明,否则本网站上的内容可按知识共享 署名-相同方式共享 3.0 或更新版本使用。