⭐️⭐️3/25 SuperD’STATION 39飯塚店 でちゃう!編集部取材【取材対象:マイジャグラーⅤ】結果報告
編集部取材[スロット対象機種アリ]
2025.03.29
タイトルとURLをコピーしました
(() => {
document.addEventListener("DOMContentLoaded", () => {
// Category 738 only (support both class patterns)
const isTarget =
document.body.classList.contains("category-id-738") ||
document.body.classList.contains("categoryid-738");
if (!isTarget) return;
// 1) Wrap tables with horizontal scroll container
document.querySelectorAll("article table").forEach((table) => {
if (table.closest(".sx-heatmap-scroll")) return;
const wrap = document.createElement("div");
wrap.className = "sx-heatmap-scroll";
table.parentNode.insertBefore(wrap, table);
wrap.appendChild(table);
});
// 2) Detect (A)-(E) at end of cell text, add class, optionally remove marker from display
const reLevel = /\(([A-E])\)\s*$/;
const REMOVE_LEVEL_MARKER_FROM_TEXT = true; // set false if you want to keep "(A)" visible
document.querySelectorAll(".sx-heatmap-scroll td").forEach((td) => {
const raw = (td.textContent || "").replace(/\u00a0/g, " ");
const text = raw.replace(/\s+/g, " ").trim();
// reset level classes (safe for re-run)
td.classList.remove("sx-hm-A", "sx-hm-B", "sx-hm-C", "sx-hm-D", "sx-hm-E");
const m = text.match(reLevel);
if (m) {
const level = m[1];
td.classList.add("sx-hm-" + level);
if (REMOVE_LEVEL_MARKER_FROM_TEXT) {
td.textContent = text.replace(reLevel, "").trim();
}
}
});
// 3) Mark empty/filled cells to control borders precisely
document.querySelectorAll(".sx-heatmap-scroll td, .sx-heatmap-scroll th").forEach((cell) => {
const txt = (cell.textContent || "")
.replace(/\u00a0/g, " ")
.replace(/\s+/g, " ")
.trim();
cell.classList.remove("sx-hm-empty", "sx-hm-filled");
cell.classList.add(txt.length ? "sx-hm-filled" : "sx-hm-empty");
});
});
})();