(function () {
const TARGET = "datalix.de";
function normalize(text) {
return (text || "").replace(/\s+/g, " ").trim().toLowerCase();
}
function removeHostnameRow(root) {
const cells = (root || document).querySelectorAll("td");
cells.forEach((cell) => {
if (normalize(cell.textContent).includes(TARGET)) {
const row = cell.closest("tr");
if (row) {
row.remove();
}
}
});
restripeTables();
}
function restripeTables() {
document.querySelectorAll("table tbody").forEach((tbody) => {
const rows = tbody.querySelectorAll("tr");
rows.forEach((row, index) => {
row.classList.remove("bg-white", "bg-gray-50", "dark:bg-gray-800", "dark:bg-gray-900");
if (index % 2 === 0) {
row.classList.add("bg-white", "dark:bg-gray-900");
} else {
row.classList.add("bg-gray-50", "dark:bg-gray-800");
}
});
});
}
function init() {
removeHostnameRow(document);
const observer = new MutationObserver((mutations) => {
for (const mutation of mutations) {
if (mutation.addedNodes.length) {
removeHostnameRow(document);
break;
}
}
});
observer.observe(document.body, { childList: true, subtree: true });
}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", init);
} else {
init();
}
})();