INNER CODE UNIT · JavaScript
markTrash
jatinkrmalik/LLMFeeder · web/main.js:182
function markTrash(progress) {
let landed = 0;
trashChips.forEach((chip) => {
const name = chip.getAttribute("data-chip");
const rule = CHIP_AT.find((c) => c.name === name);
const inBin = rule ? progress >= rule.at : false;
chip.classList.toggle("is-in", inBin);
if (inBin) landed += 1;
});
if (trashCount) trashCount.textContent = String(landed);
if (trashBin) {
trashBin.classList.toggle("is-active", progress > 0.02 && progress < 0.5);
trashBin.classList.toggle("is-full", landed >= CHIP_AT.length);
}
}
function setFallbackTokens(progress) {
if (!readout) return;