PageSourceSearch

https://www.quangtri.gov.vn/combo?browserId=chrome&minifierType=js…portlet%2Fsummary%2Fview.js&t=1789118758000

js quangtri.gov.vn collected 2026-10-01 11:45:11 UTC 2,316 bytes, 80 lines download raw bytes

1(function () {
2  function init(root) {
3    if (!root || root.__inited) return;
4    root.__inited = true;
5
6    const ns = root.dataset.ns;                 // ví dụ: _gov_quang..._
7	const detailURL = root.dataset.detailUrl;
8    if (!detailURL) {
9      console.error("Missing detailURL");
10      return;
11    }
12
13    const wrapper = root.querySelector(".ds-cau-hoi-wrapper");
14    const modal = root.querySelector(".kien-nghi-modal");
15
16    if (!wrapper || !modal) {
17      console.error("Missing wrapper or modal");
18      return;
19    }
20
21    const closeModal = () => {
22      modal.style.display = "none";
23    };
24
25    modal.querySelector(".modal-overlay")?.addEventListener("click", closeModal);
26    modal.querySelector(".modal-close")?.addEventListener("click", closeModal);
27
28    async function openDetail(recordId) {
29      const urlObj = new URL(detailURL, window.location.origin);
30      urlObj.searchParams.set(ns + "recordId", recordId);
31
32      const res = await fetch(urlObj.toString(), {
33        method: "GET",
34        headers: { Accept: "application/json" }
35      });
36
37      if (!res.ok) throw new Error("HTTP " + res.status);
38
39      const data = await res.json();
40
41      modal.querySelector(".ho-ten .value").textContent = data.hoTen || "";
42      modal.querySelector(".dia-chi .value").textContent = data.diaChi || "";
43      modal.querySelector(".tieu-de .value").textContent = data.tieuDe || "";
44      modal.querySelector(".noi-dung .value").innerHTML = data.noiDung || "";
45      modal.querySelector(".linh-vuc .value").textContent = data.linhVuc || "";
46      modal.querySelector(".tra-loi .value").innerHTML = data.traLoi || "";
47
48      modal.style.display = "flex";
49    }
50
51    wrapper.addEventListener("click", async (e) => {
52      const link = e.target.closest(".y-kien-item");
53      if (!link) return;
54
55      e.preventDefault();
56
57      const recordId = link.dataset.recordId;
58		if (!recordId) return;
59
60      try {
61        await openDetail(recordId);
62      } catch (err) {
63        console.error("Không mở được modal:", err);
64      }
65    });
66  }
67
68  function boot() {
69    document.querySelectorAll(".kien-nghi-root").forEach(init);
70  }
71
72  if (document.readyState === "loading") {
73    document.addEventListener("DOMContentLoaded", boot);
74  } else {
75    boot();
76  }
77
78  Liferay.on("endNavigate", boot);
79})();
80

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.