Firefox Browser Add-ons
  • Extensions
  • Themes
    • for Firefox
    • Dictionaries & Language Packs
    • Other Browser Sites
    • Add-ons for Android
Log in
Preview of Criticality Field Highlighter

Criticality Field Highlighter by zminkobinko

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

0 (0 reviews)0 (0 reviews)
Download Firefox and get the extension
Download file

Extension Metadata

About this extension
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
});
})();
Rated 0 by 0 reviewers
Sign in to rate this extension
There are no ratings yet

Star rating saved

5
0
4
0
3
0
2
0
1
0
No reviews yet
Permissions and data

Required permissions:

  • Access your data for all websites

Data collection:

  • The developer says this extension doesn't require data collection.
Learn more
More information
Add-on Links
  • Copy add-on ID
Version
1.0.0
Size
8.77 KB
Last updated
7 days ago (Jun 22, 2026)
Related Categories
  • Appearance
License
MIT License
Version History
  • See all versions
Add to collection
Report this add-on
Go to Mozilla’s homepage

Add-ons

  • About
  • Firefox Add-ons Blog
  • Extension Workshop
  • Developer Hub
  • Developer Policies
  • Community Blog
  • Forum
  • Report a bug
  • Review Guide

Download

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

Latest Builds

  • Nightly
  • Beta

Firefox for Business

  • Enterprise

Community

  • Connect
  • Contribute
  • Developer

Follow

  • Instagram
  • YouTube
  • TikTok
  • Bluesky
  • Podcast
  • Privacy
  • Cookies
  • Legal

Except where otherwise noted, content on this site is licensed under the Creative Commons Attribution Share-Alike License v3.0 or any later version.