User:76561197995296537/common.js

From He is Coming Official Wiki
Revision as of 14:13, 15 May 2026 by A pro windows media player (talk | contribs) (Created page with "document.addEventListener("DOMContentLoaded", function () { const search = document.getElementById("itemSearch"); if (!search) return; search.addEventListener("keyup", function () { const filter = search.value.toLowerCase(); const rows = document.querySelectorAll("#itemTable tr"); rows.forEach((row, index) => { if (index === 0) return; const text = row.textContent.toLowerCase(); row.style.di...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
document.addEventListener("DOMContentLoaded", function () {

    const search = document.getElementById("itemSearch");

    if (!search) return;

    search.addEventListener("keyup", function () {

        const filter = search.value.toLowerCase();

        const rows = document.querySelectorAll("#itemTable tr");

        rows.forEach((row, index) => {

            if (index === 0) return;

            const text = row.textContent.toLowerCase();

            row.style.display =
                text.includes(filter)
                ? ""
                : "none";

        });

    });

});