import.jsconst res = await fetch("https://scrapbox.io/files/644c4cfafb7a14001be4ea02.json");
const json = await res.json();
const prev = JSON.parse(localStorage.getItem("projectsLastAccessed"));
// 一番新しいアクセス日時を採用する
const newData = [...Object.keys(json), ...Object.keys(prev)]
.map((key) => [key, Math.max(json[key] ?? 0, prev[key] ?? 0)]);
localStorage.setItem("projectsLastAccessed", JSON.stringify(Object.fromEntries(newData)));
export.jsconst blob = new Blob(
[localStorage.getItem("projectsLastAccessed")],
{ type: "application/json" },
);
const a = document.createElement("a");
a.href = URL.createObjectURL(blob);
a.download = "projectsLastAccessed.json";
document.body.append(a);
a.click();
a.remove();