import { CBOR } from "https://js.sabae.cc/CBOR.js";
import { Bin } from "https://js.sabae.cc/Bin.js";
import { shuffle } from "https://js.sabae.cc/shuffle.js";
import { shuffleChildren } from "https://js.sabae.cc/shuffleChildren.js";
onload = async () => {
const bin = await Bin.fetch("https://pcn-club.github.io/pcn_kids_procon/procon2022/procon2022list.cbor");
const data = CBOR.decode(bin);
shuffle(data);
for (const d of data) {
const div = document.createElement("div");
div.style.backgroundImage = "url(" + Bin.toSrc(d.data) + ")";
const title = document.createElement("div");
title.textContent = d.id + ". " + d.title;
div.appendChild(title);
list.appendChild(div);
}
btnshuffle.onclick = () => shuffleChildren(list);
};
pcn-club/pcn_kids_procon
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
PCNこどもプロコンオープンデータ
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published