From d942833b06d88163e836516dac5a88efbce382d7 Mon Sep 17 00:00:00 2001 From: Jacob Kiers Date: Fri, 12 May 2023 15:55:55 +0000 Subject: [PATCH] Update with tech changes. --- public/index.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/public/index.html b/public/index.html index d027008..012d8ea 100644 --- a/public/index.html +++ b/public/index.html @@ -72,7 +72,12 @@ async function fetchChunk(id, hash) async function fetchData(domain) { - const json = await fetch(`${dohServer}${domain}`) + const json = await fetch(`${dohServer}${domain}`, { + method: "GET", + headers: { + "Accept": "application/dns-json" + } + }) .then(response => response.json()); const raw_data = json.Answer[0].data; const data = raw_data.replaceAll(/[\s\"]/g, ''); @@ -142,7 +147,7 @@ async function handleMarkdown(content) }); if (typeof content.metaData.title !== "undefined") document.title = content.metaData.title; - document.getElementById("post").innerHTML = marked(content.content); + document.getElementById("post").innerHTML = marked.parse(content.content); let title = document.createElement("h1"); title.innerHTML = content.metaData.title; document.getElementById("post").prepend(title)