PageSourceSearch

https://ant2.net/_templates/ant2net07/assets/js/count.js

js ant2.net collected 2026-10-04 20:18:01 UTC 2,169 bytes, 59 lines download raw bytes

1async function fetchData() {
2    const url = "https://staging0001.info/oem_count/"; 
3    try {
4        const response = await fetch(url, { method: "GET", mode: "cors" });
5        if (!response.ok) { 
6            throw new Error(`HTTPエラー! ステータス: ${response.status}`); 
7        }
8        const data = await response.json();
9
10        console.log("API Response:", data); // デバッグ用
11
12        // 各要素に取得データを表示
13        const oemCountElement = document.getElementById("oemCount");
14        if (oemCountElement) {
15            oemCountElement.textContent = data.oemCount || "データなし";
16        }
17
18        const userCountElement = document.getElementById("userCount");
19        if (userCountElement) {
20            userCountElement.textContent = data.userCount || "データなし";
21        }
22
23        const userCount1Element = document.getElementById("userCount1");
24        if (userCount1Element) {
25            userCount1Element.textContent = data.userCount1 || "データなし";
26        }
27
28        const templateCountElement = document.getElementById("templateCount");
29        if (templateCountElement) {
30            templateCountElement.textContent = data.templateCount || "データなし";
31        }
32
33        const contentPartCountElement = document.getElementById("contentPartCount");
34        if (contentPartCountElement) {
35            contentPartCountElement.textContent = data.contentPartCount || "データなし";
36        }
37
38    } catch (error) {
39        console.error("データ取得エラー:", error);
40        // エラー時に取得失敗を表示
41        const elements = [
42            "oemCount",
43            "userCount",
44            "userCount1",
45            "templateCount",
46            "contentPartCount"
47        ];
48        elements.forEach(id => {
49            const element = document.getElementById(id);
50            if (element) {
51                element.textContent = "取得失敗";
52            }
53        });
54    }
55}
56// ページ読み込み時にデータ取得
57document.addEventListener("DOMContentLoaded", function () {
58    fetchData();
59});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.