Files
my-webtoon/Bomtoon_JS/get_count.js
2025-05-11 18:58:43 +02:00

24 lines
715 B
JavaScript

(() => {
const count = document.querySelectorAll('div[class^="ImageContainer__Container"]').length;
const existing = localStorage.getItem("divCountList") || "";
localStorage.setItem("divCountList", existing + count + "\n");
console.log("✅ Count saved:", count);
})();
(() => {
const data = localStorage.getItem("divCountList") || "";
const blob = new Blob([data], { type: "text/plain" });
const link = document.createElement("a");
link.href = URL.createObjectURL(blob);
link.download = "div_counts.txt";
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
console.log("📦 File downloaded as div_counts.txt");
})();