Fix 304 caching errors
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
f0100ceaf1
commit
710f58b034
@ -0,0 +1,5 @@
|
||||
2
|
||||
First!
|
||||
Sig2022-08-01T15:32:36.648104Z[Etc/UTC];MAGENTA
|
||||
Second!<br/>
|
||||
Sig2022-08-01T16:00:26.660317Z[Etc/UTC];RED
|
@ -17,15 +17,15 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="contentBody">
|
||||
<h2>Directory Listing for /</h2><div class="folderlisting"><a href="/.." class="icon">📁</a><a href="/..">.. </a><a href="/.." class="nounderline">(Previous Directory)</a></div><div class="folderlisting"><a href="/articles" class="icon">📁</a><a href="/articles">articles</a> 2022-08-01T15:25:23.920536Z gitpod 4096</div>
|
||||
<div class="folderlisting"><a href="/images" class="icon">📁</a><a href="/images">images</a> 2022-08-01T15:25:23.916536Z gitpod 77</div>
|
||||
<div class="filelisting"><a href="/codeBackground" class="icon">🗎</a><a href="/codeBackground">codeBackground</a> 2022-08-01T15:25:23.800536Z gitpod 2635</div>
|
||||
<div class="filelisting"><a href="/otherpage.html" class="icon">🗎</a><a href="/otherpage.html">otherpage.html</a> 2022-08-01T15:25:23.836536Z gitpod 88370</div>
|
||||
<div class="filelisting"><a href="/reset.css" class="icon">🗎</a><a href="/reset.css">reset.css</a> 2022-08-01T15:25:23.808536Z gitpod 1092</div>
|
||||
<div class="filelisting"><a href="/testfile.html" class="icon">🗎</a><a href="/testfile.html">testfile.html</a> 2022-08-01T15:25:23.836536Z gitpod 1627</div>
|
||||
<div class="filelisting"><a href="/uploadform.html" class="icon">🗎</a><a href="/uploadform.html">uploadform.html</a> 2022-08-01T15:25:23.836536Z gitpod 1707</div>
|
||||
<div class="filelisting"><a href="/sig.css" class="icon">🗎</a><a href="/sig.css">sig.css</a> 2022-08-01T15:25:23.824536Z gitpod 10595</div>
|
||||
<div class="filelisting"><a href="/error.html" class="icon">🗎</a><a href="/error.html">error.html</a> 2022-08-01T15:25:23.840536Z gitpod 1672</div>
|
||||
<h2>Directory Listing for /</h2><div class="folderlisting"><a href="/.." class="icon">📁</a><a href="/..">.. </a><a href="/.." class="nounderline">(Previous Directory)</a></div><div class="folderlisting"><a href="/articles" class="icon">📁</a><a href="/articles">articles</a> 2022-08-01T15:59:35.330694Z gitpod 4096</div>
|
||||
<div class="folderlisting"><a href="/images" class="icon">📁</a><a href="/images">images</a> 2022-08-01T15:59:35.326694Z gitpod 77</div>
|
||||
<div class="filelisting"><a href="/codeBackground" class="icon">🗎</a><a href="/codeBackground">codeBackground</a> 2022-08-01T15:59:35.214694Z gitpod 2635</div>
|
||||
<div class="filelisting"><a href="/otherpage.html" class="icon">🗎</a><a href="/otherpage.html">otherpage.html</a> 2022-08-01T15:59:35.258694Z gitpod 88370</div>
|
||||
<div class="filelisting"><a href="/reset.css" class="icon">🗎</a><a href="/reset.css">reset.css</a> 2022-08-01T15:59:35.218694Z gitpod 1092</div>
|
||||
<div class="filelisting"><a href="/testfile.html" class="icon">🗎</a><a href="/testfile.html">testfile.html</a> 2022-08-01T15:59:35.262694Z gitpod 1627</div>
|
||||
<div class="filelisting"><a href="/uploadform.html" class="icon">🗎</a><a href="/uploadform.html">uploadform.html</a> 2022-08-01T15:59:35.262694Z gitpod 1707</div>
|
||||
<div class="filelisting"><a href="/sig.css" class="icon">🗎</a><a href="/sig.css">sig.css</a> 2022-08-01T15:59:35.246694Z gitpod 10595</div>
|
||||
<div class="filelisting"><a href="/error.html" class="icon">🗎</a><a href="/error.html">error.html</a> 2022-08-01T15:59:35.262694Z gitpod 1672</div>
|
||||
|
||||
</div> <!--End Content Body-->
|
||||
<div class="codeForeground" id="codeForeground"></div>
|
||||
|
@ -17,13 +17,13 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="contentBody">
|
||||
<h2>Directory Listing for /articles/</h2><div class="folderlisting"><a href="/articles/.." class="icon">📁</a><a href="/articles/..">.. </a><a href="/articles/.." class="nounderline">(Previous Directory)</a></div><div class="folderlisting"><a href="/articles/test articles" class="icon">📁</a><a href="/articles/test articles">test articles</a> 2022-08-01T15:25:23.848536Z gitpod 147</div>
|
||||
<div class="filelisting"><a href="/articles/Love Live! Custom Arcade Controller.article" class="icon">🗎</a><a href="/articles/Love Live! Custom Arcade Controller.article">Love Live! Custom Arcade Controller.article</a> 2022-08-01T15:25:23.320536Z gitpod 497</div>
|
||||
<div class="filelisting"><a href="/articles/curabitur vel tempus ex.article" class="icon">🗎</a><a href="/articles/curabitur vel tempus ex.article">curabitur vel tempus ex.article</a> 2022-08-01T15:25:23.356536Z gitpod 730</div>
|
||||
<div class="filelisting"><a href="/articles/sigplace1.article" class="icon">🗎</a><a href="/articles/sigplace1.article">sigplace1.article</a> 2022-08-01T15:25:23.796536Z gitpod 80858</div>
|
||||
<div class="filelisting"><a href="/articles/Love Live! Custom Arcade Controller.article.html" class="icon">🗎</a><a href="/articles/Love Live! Custom Arcade Controller.article.html">Love Live! Custom Arcade Controller.article.html</a> 2022-08-01T15:25:23.852536Z gitpod 8268</div>
|
||||
<div class="filelisting"><a href="/articles/curabitur vel tempus ex.article.html" class="icon">🗎</a><a href="/articles/curabitur vel tempus ex.article.html">curabitur vel tempus ex.article.html</a> 2022-08-01T15:25:23.900536Z gitpod 8477</div>
|
||||
<div class="filelisting"><a href="/articles/sigplace1.article.html" class="icon">🗎</a><a href="/articles/sigplace1.article.html">sigplace1.article.html</a> 2022-08-01T15:25:23.904536Z gitpod 88577</div>
|
||||
<h2>Directory Listing for /articles/</h2><div class="folderlisting"><a href="/articles/.." class="icon">📁</a><a href="/articles/..">.. </a><a href="/articles/.." class="nounderline">(Previous Directory)</a></div><div class="folderlisting"><a href="/articles/test articles" class="icon">📁</a><a href="/articles/test articles">test articles</a> 2022-08-01T15:59:35.278694Z gitpod 147</div>
|
||||
<div class="filelisting"><a href="/articles/Love Live! Custom Arcade Controller.article" class="icon">🗎</a><a href="/articles/Love Live! Custom Arcade Controller.article">Love Live! Custom Arcade Controller.article</a> 2022-08-01T15:59:34.742695Z gitpod 497</div>
|
||||
<div class="filelisting"><a href="/articles/curabitur vel tempus ex.article" class="icon">🗎</a><a href="/articles/curabitur vel tempus ex.article">curabitur vel tempus ex.article</a> 2022-08-01T15:59:34.770695Z gitpod 730</div>
|
||||
<div class="filelisting"><a href="/articles/sigplace1.article" class="icon">🗎</a><a href="/articles/sigplace1.article">sigplace1.article</a> 2022-08-01T15:59:35.210694Z gitpod 80858</div>
|
||||
<div class="filelisting"><a href="/articles/Love Live! Custom Arcade Controller.article.html" class="icon">🗎</a><a href="/articles/Love Live! Custom Arcade Controller.article.html">Love Live! Custom Arcade Controller.article.html</a> 2022-08-01T15:59:35.278694Z gitpod 8626</div>
|
||||
<div class="filelisting"><a href="/articles/curabitur vel tempus ex.article.html" class="icon">🗎</a><a href="/articles/curabitur vel tempus ex.article.html">curabitur vel tempus ex.article.html</a> 2022-08-01T15:59:35.306694Z gitpod 8835</div>
|
||||
<div class="filelisting"><a href="/articles/sigplace1.article.html" class="icon">🗎</a><a href="/articles/sigplace1.article.html">sigplace1.article.html</a> 2022-08-01T15:59:35.318694Z gitpod 88935</div>
|
||||
|
||||
</div> <!--End Content Body-->
|
||||
<div class="codeForeground" id="codeForeground"></div>
|
||||
|
@ -67,6 +67,12 @@ For over a year since I first got into <u>Love Live! School Idol Festival ~after
|
||||
document.getElementById("msg").disabled=false;
|
||||
fetchComments()
|
||||
})
|
||||
.catch((err)=>{
|
||||
document.getElementById("submit").disabled=
|
||||
document.getElementById("name").disabled=
|
||||
document.getElementById("col").disabled=
|
||||
document.getElementById("msg").disabled=false;
|
||||
})
|
||||
}
|
||||
function insert(c1,c2) {
|
||||
if (document.getElementById("msg").selectionStart==document.getElementById("msg").selectionEnd) {
|
||||
@ -124,17 +130,19 @@ For over a year since I first got into <u>Love Live! School Idol Festival ~after
|
||||
fetch("/COMMENTS?article=Love Live! Custom Arcade Controller.comment").then((data)=>data.text())
|
||||
.then((data)=>{
|
||||
data=data.split("\n");
|
||||
document.getElementById("comments").innerHTML="";
|
||||
document.getElementById("commentCounter").innerText=data[0]
|
||||
for (var i=data.length-3;i>=1;i-=2) {
|
||||
if (data[i].trim().length>0&&data[i+1].trim().length>0) {
|
||||
document.getElementById("comments").innerHTML+="<div id=\"msg"+((i+1)/2)+"\" class=\"commentDisplayer\"><div class=\"commentData\">"+decodeURIComponent(data[i])+"</div><br>"
|
||||
data2=data[i+1].split(";");
|
||||
document.getElementById("msg"+((i+1)/2)).style.borderColor=data2[1]
|
||||
document.getElementById("comments").innerHTML+="<div class=\"commentInfo\"><sup>- "+decodeURIComponent(data2[0])+"</sup></div></div><br>"
|
||||
if (!isNaN(Number(data[0]))) {
|
||||
document.getElementById("comments").innerHTML="";
|
||||
document.getElementById("commentCounter").innerText=data[0]
|
||||
for (var i=data.length-3;i>=1;i-=2) {
|
||||
if (data[i].trim().length>0&&data[i+1].trim().length>0) {
|
||||
document.getElementById("comments").innerHTML+="<div id=\"msg"+((i+1)/2)+"\" class=\"commentDisplayer\"><div class=\"commentData\">"+decodeURIComponent(data[i])+"</div><br>"
|
||||
data2=data[i+1].split(";");
|
||||
document.getElementById("msg"+((i+1)/2)).style.borderColor=data2[1]
|
||||
document.getElementById("comments").innerHTML+="<div class=\"commentInfo\"><sup>- "+decodeURIComponent(data2[0])+"</sup></div></div><br>"
|
||||
}
|
||||
}
|
||||
document.getElementById("commentContainer").style.visibility="visible"
|
||||
}
|
||||
document.getElementById("commentContainer").style.visibility="visible"
|
||||
})
|
||||
}
|
||||
fetchComments()
|
||||
|
@ -71,6 +71,12 @@ Curabitur vel tempus ex. Duis cursus sapien nisl, ut pulvinar dui porttitor ut.
|
||||
document.getElementById("msg").disabled=false;
|
||||
fetchComments()
|
||||
})
|
||||
.catch((err)=>{
|
||||
document.getElementById("submit").disabled=
|
||||
document.getElementById("name").disabled=
|
||||
document.getElementById("col").disabled=
|
||||
document.getElementById("msg").disabled=false;
|
||||
})
|
||||
}
|
||||
function insert(c1,c2) {
|
||||
if (document.getElementById("msg").selectionStart==document.getElementById("msg").selectionEnd) {
|
||||
@ -128,17 +134,19 @@ Curabitur vel tempus ex. Duis cursus sapien nisl, ut pulvinar dui porttitor ut.
|
||||
fetch("/COMMENTS?article=curabitur vel tempus ex.comment").then((data)=>data.text())
|
||||
.then((data)=>{
|
||||
data=data.split("\n");
|
||||
document.getElementById("comments").innerHTML="";
|
||||
document.getElementById("commentCounter").innerText=data[0]
|
||||
for (var i=data.length-3;i>=1;i-=2) {
|
||||
if (data[i].trim().length>0&&data[i+1].trim().length>0) {
|
||||
document.getElementById("comments").innerHTML+="<div id=\"msg"+((i+1)/2)+"\" class=\"commentDisplayer\"><div class=\"commentData\">"+decodeURIComponent(data[i])+"</div><br>"
|
||||
data2=data[i+1].split(";");
|
||||
document.getElementById("msg"+((i+1)/2)).style.borderColor=data2[1]
|
||||
document.getElementById("comments").innerHTML+="<div class=\"commentInfo\"><sup>- "+decodeURIComponent(data2[0])+"</sup></div></div><br>"
|
||||
if (!isNaN(Number(data[0]))) {
|
||||
document.getElementById("comments").innerHTML="";
|
||||
document.getElementById("commentCounter").innerText=data[0]
|
||||
for (var i=data.length-3;i>=1;i-=2) {
|
||||
if (data[i].trim().length>0&&data[i+1].trim().length>0) {
|
||||
document.getElementById("comments").innerHTML+="<div id=\"msg"+((i+1)/2)+"\" class=\"commentDisplayer\"><div class=\"commentData\">"+decodeURIComponent(data[i])+"</div><br>"
|
||||
data2=data[i+1].split(";");
|
||||
document.getElementById("msg"+((i+1)/2)).style.borderColor=data2[1]
|
||||
document.getElementById("comments").innerHTML+="<div class=\"commentInfo\"><sup>- "+decodeURIComponent(data2[0])+"</sup></div></div><br>"
|
||||
}
|
||||
}
|
||||
document.getElementById("commentContainer").style.visibility="visible"
|
||||
}
|
||||
document.getElementById("commentContainer").style.visibility="visible"
|
||||
})
|
||||
}
|
||||
fetchComments()
|
||||
|
@ -546,6 +546,12 @@ Here we demonstrate the love live logo. But wait, it's literally like in the mid
|
||||
document.getElementById("msg").disabled=false;
|
||||
fetchComments()
|
||||
})
|
||||
.catch((err)=>{
|
||||
document.getElementById("submit").disabled=
|
||||
document.getElementById("name").disabled=
|
||||
document.getElementById("col").disabled=
|
||||
document.getElementById("msg").disabled=false;
|
||||
})
|
||||
}
|
||||
function insert(c1,c2) {
|
||||
if (document.getElementById("msg").selectionStart==document.getElementById("msg").selectionEnd) {
|
||||
@ -603,17 +609,19 @@ Here we demonstrate the love live logo. But wait, it's literally like in the mid
|
||||
fetch("/COMMENTS?article=sigplace1.comment").then((data)=>data.text())
|
||||
.then((data)=>{
|
||||
data=data.split("\n");
|
||||
document.getElementById("comments").innerHTML="";
|
||||
document.getElementById("commentCounter").innerText=data[0]
|
||||
for (var i=data.length-3;i>=1;i-=2) {
|
||||
if (data[i].trim().length>0&&data[i+1].trim().length>0) {
|
||||
document.getElementById("comments").innerHTML+="<div id=\"msg"+((i+1)/2)+"\" class=\"commentDisplayer\"><div class=\"commentData\">"+decodeURIComponent(data[i])+"</div><br>"
|
||||
data2=data[i+1].split(";");
|
||||
document.getElementById("msg"+((i+1)/2)).style.borderColor=data2[1]
|
||||
document.getElementById("comments").innerHTML+="<div class=\"commentInfo\"><sup>- "+decodeURIComponent(data2[0])+"</sup></div></div><br>"
|
||||
if (!isNaN(Number(data[0]))) {
|
||||
document.getElementById("comments").innerHTML="";
|
||||
document.getElementById("commentCounter").innerText=data[0]
|
||||
for (var i=data.length-3;i>=1;i-=2) {
|
||||
if (data[i].trim().length>0&&data[i+1].trim().length>0) {
|
||||
document.getElementById("comments").innerHTML+="<div id=\"msg"+((i+1)/2)+"\" class=\"commentDisplayer\"><div class=\"commentData\">"+decodeURIComponent(data[i])+"</div><br>"
|
||||
data2=data[i+1].split(";");
|
||||
document.getElementById("msg"+((i+1)/2)).style.borderColor=data2[1]
|
||||
document.getElementById("comments").innerHTML+="<div class=\"commentInfo\"><sup>- "+decodeURIComponent(data2[0])+"</sup></div></div><br>"
|
||||
}
|
||||
}
|
||||
document.getElementById("commentContainer").style.visibility="visible"
|
||||
}
|
||||
document.getElementById("commentContainer").style.visibility="visible"
|
||||
})
|
||||
}
|
||||
fetchComments()
|
||||
|
@ -17,12 +17,12 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="contentBody">
|
||||
<h2>Directory Listing for /articles/test articles/</h2><div class="folderlisting"><a href="/articles/test articles/.." class="icon">📁</a><a href="/articles/test articles/..">.. </a><a href="/articles/test articles/.." class="nounderline">(Previous Directory)</a></div><div class="filelisting"><a href="/articles/test articles/test1.article" class="icon">🗎</a><a href="/articles/test articles/test1.article">test1.article</a> 2022-08-01T15:25:23.312536Z gitpod 1085</div>
|
||||
<div class="filelisting"><a href="/articles/test articles/test2.article" class="icon">🗎</a><a href="/articles/test articles/test2.article">test2.article</a> 2022-08-01T15:25:23.316536Z gitpod 781</div>
|
||||
<div class="filelisting"><a href="/articles/test articles/test3.article" class="icon">🗎</a><a href="/articles/test articles/test3.article">test3.article</a> 2022-08-01T15:25:23.316536Z gitpod 994</div>
|
||||
<div class="filelisting"><a href="/articles/test articles/test1.article.html" class="icon">🗎</a><a href="/articles/test articles/test1.article.html">test1.article.html</a> 2022-08-01T15:25:23.844536Z gitpod 8796</div>
|
||||
<div class="filelisting"><a href="/articles/test articles/test2.article.html" class="icon">🗎</a><a href="/articles/test articles/test2.article.html">test2.article.html</a> 2022-08-01T15:25:23.848536Z gitpod 8492</div>
|
||||
<div class="filelisting"><a href="/articles/test articles/test3.article.html" class="icon">🗎</a><a href="/articles/test articles/test3.article.html">test3.article.html</a> 2022-08-01T15:25:23.848536Z gitpod 8705</div>
|
||||
<h2>Directory Listing for /articles/test articles/</h2><div class="folderlisting"><a href="/articles/test articles/.." class="icon">📁</a><a href="/articles/test articles/..">.. </a><a href="/articles/test articles/.." class="nounderline">(Previous Directory)</a></div><div class="filelisting"><a href="/articles/test articles/test1.article" class="icon">🗎</a><a href="/articles/test articles/test1.article">test1.article</a> 2022-08-01T15:59:34.738695Z gitpod 1085</div>
|
||||
<div class="filelisting"><a href="/articles/test articles/test2.article" class="icon">🗎</a><a href="/articles/test articles/test2.article">test2.article</a> 2022-08-01T15:59:34.738695Z gitpod 781</div>
|
||||
<div class="filelisting"><a href="/articles/test articles/test3.article" class="icon">🗎</a><a href="/articles/test articles/test3.article">test3.article</a> 2022-08-01T15:59:34.742695Z gitpod 994</div>
|
||||
<div class="filelisting"><a href="/articles/test articles/test1.article.html" class="icon">🗎</a><a href="/articles/test articles/test1.article.html">test1.article.html</a> 2022-08-01T15:59:35.266694Z gitpod 9154</div>
|
||||
<div class="filelisting"><a href="/articles/test articles/test2.article.html" class="icon">🗎</a><a href="/articles/test articles/test2.article.html">test2.article.html</a> 2022-08-01T15:59:35.274694Z gitpod 8850</div>
|
||||
<div class="filelisting"><a href="/articles/test articles/test3.article.html" class="icon">🗎</a><a href="/articles/test articles/test3.article.html">test3.article.html</a> 2022-08-01T15:59:35.278694Z gitpod 9063</div>
|
||||
|
||||
</div> <!--End Content Body-->
|
||||
<div class="codeForeground" id="codeForeground"></div>
|
||||
|
@ -65,6 +65,12 @@
|
||||
document.getElementById("msg").disabled=false;
|
||||
fetchComments()
|
||||
})
|
||||
.catch((err)=>{
|
||||
document.getElementById("submit").disabled=
|
||||
document.getElementById("name").disabled=
|
||||
document.getElementById("col").disabled=
|
||||
document.getElementById("msg").disabled=false;
|
||||
})
|
||||
}
|
||||
function insert(c1,c2) {
|
||||
if (document.getElementById("msg").selectionStart==document.getElementById("msg").selectionEnd) {
|
||||
@ -122,17 +128,19 @@
|
||||
fetch("/COMMENTS?article=test1.comment").then((data)=>data.text())
|
||||
.then((data)=>{
|
||||
data=data.split("\n");
|
||||
document.getElementById("comments").innerHTML="";
|
||||
document.getElementById("commentCounter").innerText=data[0]
|
||||
for (var i=data.length-3;i>=1;i-=2) {
|
||||
if (data[i].trim().length>0&&data[i+1].trim().length>0) {
|
||||
document.getElementById("comments").innerHTML+="<div id=\"msg"+((i+1)/2)+"\" class=\"commentDisplayer\"><div class=\"commentData\">"+decodeURIComponent(data[i])+"</div><br>"
|
||||
data2=data[i+1].split(";");
|
||||
document.getElementById("msg"+((i+1)/2)).style.borderColor=data2[1]
|
||||
document.getElementById("comments").innerHTML+="<div class=\"commentInfo\"><sup>- "+decodeURIComponent(data2[0])+"</sup></div></div><br>"
|
||||
if (!isNaN(Number(data[0]))) {
|
||||
document.getElementById("comments").innerHTML="";
|
||||
document.getElementById("commentCounter").innerText=data[0]
|
||||
for (var i=data.length-3;i>=1;i-=2) {
|
||||
if (data[i].trim().length>0&&data[i+1].trim().length>0) {
|
||||
document.getElementById("comments").innerHTML+="<div id=\"msg"+((i+1)/2)+"\" class=\"commentDisplayer\"><div class=\"commentData\">"+decodeURIComponent(data[i])+"</div><br>"
|
||||
data2=data[i+1].split(";");
|
||||
document.getElementById("msg"+((i+1)/2)).style.borderColor=data2[1]
|
||||
document.getElementById("comments").innerHTML+="<div class=\"commentInfo\"><sup>- "+decodeURIComponent(data2[0])+"</sup></div></div><br>"
|
||||
}
|
||||
}
|
||||
document.getElementById("commentContainer").style.visibility="visible"
|
||||
}
|
||||
document.getElementById("commentContainer").style.visibility="visible"
|
||||
})
|
||||
}
|
||||
fetchComments()
|
||||
|
@ -65,6 +65,12 @@
|
||||
document.getElementById("msg").disabled=false;
|
||||
fetchComments()
|
||||
})
|
||||
.catch((err)=>{
|
||||
document.getElementById("submit").disabled=
|
||||
document.getElementById("name").disabled=
|
||||
document.getElementById("col").disabled=
|
||||
document.getElementById("msg").disabled=false;
|
||||
})
|
||||
}
|
||||
function insert(c1,c2) {
|
||||
if (document.getElementById("msg").selectionStart==document.getElementById("msg").selectionEnd) {
|
||||
@ -122,17 +128,19 @@
|
||||
fetch("/COMMENTS?article=test2.comment").then((data)=>data.text())
|
||||
.then((data)=>{
|
||||
data=data.split("\n");
|
||||
document.getElementById("comments").innerHTML="";
|
||||
document.getElementById("commentCounter").innerText=data[0]
|
||||
for (var i=data.length-3;i>=1;i-=2) {
|
||||
if (data[i].trim().length>0&&data[i+1].trim().length>0) {
|
||||
document.getElementById("comments").innerHTML+="<div id=\"msg"+((i+1)/2)+"\" class=\"commentDisplayer\"><div class=\"commentData\">"+decodeURIComponent(data[i])+"</div><br>"
|
||||
data2=data[i+1].split(";");
|
||||
document.getElementById("msg"+((i+1)/2)).style.borderColor=data2[1]
|
||||
document.getElementById("comments").innerHTML+="<div class=\"commentInfo\"><sup>- "+decodeURIComponent(data2[0])+"</sup></div></div><br>"
|
||||
if (!isNaN(Number(data[0]))) {
|
||||
document.getElementById("comments").innerHTML="";
|
||||
document.getElementById("commentCounter").innerText=data[0]
|
||||
for (var i=data.length-3;i>=1;i-=2) {
|
||||
if (data[i].trim().length>0&&data[i+1].trim().length>0) {
|
||||
document.getElementById("comments").innerHTML+="<div id=\"msg"+((i+1)/2)+"\" class=\"commentDisplayer\"><div class=\"commentData\">"+decodeURIComponent(data[i])+"</div><br>"
|
||||
data2=data[i+1].split(";");
|
||||
document.getElementById("msg"+((i+1)/2)).style.borderColor=data2[1]
|
||||
document.getElementById("comments").innerHTML+="<div class=\"commentInfo\"><sup>- "+decodeURIComponent(data2[0])+"</sup></div></div><br>"
|
||||
}
|
||||
}
|
||||
document.getElementById("commentContainer").style.visibility="visible"
|
||||
}
|
||||
document.getElementById("commentContainer").style.visibility="visible"
|
||||
})
|
||||
}
|
||||
fetchComments()
|
||||
|
@ -65,6 +65,12 @@
|
||||
document.getElementById("msg").disabled=false;
|
||||
fetchComments()
|
||||
})
|
||||
.catch((err)=>{
|
||||
document.getElementById("submit").disabled=
|
||||
document.getElementById("name").disabled=
|
||||
document.getElementById("col").disabled=
|
||||
document.getElementById("msg").disabled=false;
|
||||
})
|
||||
}
|
||||
function insert(c1,c2) {
|
||||
if (document.getElementById("msg").selectionStart==document.getElementById("msg").selectionEnd) {
|
||||
@ -122,17 +128,19 @@
|
||||
fetch("/COMMENTS?article=test3.comment").then((data)=>data.text())
|
||||
.then((data)=>{
|
||||
data=data.split("\n");
|
||||
document.getElementById("comments").innerHTML="";
|
||||
document.getElementById("commentCounter").innerText=data[0]
|
||||
for (var i=data.length-3;i>=1;i-=2) {
|
||||
if (data[i].trim().length>0&&data[i+1].trim().length>0) {
|
||||
document.getElementById("comments").innerHTML+="<div id=\"msg"+((i+1)/2)+"\" class=\"commentDisplayer\"><div class=\"commentData\">"+decodeURIComponent(data[i])+"</div><br>"
|
||||
data2=data[i+1].split(";");
|
||||
document.getElementById("msg"+((i+1)/2)).style.borderColor=data2[1]
|
||||
document.getElementById("comments").innerHTML+="<div class=\"commentInfo\"><sup>- "+decodeURIComponent(data2[0])+"</sup></div></div><br>"
|
||||
if (!isNaN(Number(data[0]))) {
|
||||
document.getElementById("comments").innerHTML="";
|
||||
document.getElementById("commentCounter").innerText=data[0]
|
||||
for (var i=data.length-3;i>=1;i-=2) {
|
||||
if (data[i].trim().length>0&&data[i+1].trim().length>0) {
|
||||
document.getElementById("comments").innerHTML+="<div id=\"msg"+((i+1)/2)+"\" class=\"commentDisplayer\"><div class=\"commentData\">"+decodeURIComponent(data[i])+"</div><br>"
|
||||
data2=data[i+1].split(";");
|
||||
document.getElementById("msg"+((i+1)/2)).style.borderColor=data2[1]
|
||||
document.getElementById("comments").innerHTML+="<div class=\"commentInfo\"><sup>- "+decodeURIComponent(data2[0])+"</sup></div></div><br>"
|
||||
}
|
||||
}
|
||||
document.getElementById("commentContainer").style.visibility="visible"
|
||||
}
|
||||
document.getElementById("commentContainer").style.visibility="visible"
|
||||
})
|
||||
}
|
||||
fetchComments()
|
||||
|
@ -12,6 +12,7 @@
|
||||
String filename=null;
|
||||
OutputStream stream = null;
|
||||
requestLine=in.readLine(); //Read the first line, this should be our request.
|
||||
System.out.println(requestLine);
|
||||
if (requestLine!=null) {
|
||||
String[] splitter = requestLine.split(Pattern.quote(" "));
|
||||
boolean ISPOST = splitter[0].equals("POST");
|
||||
@ -37,4 +38,3 @@
|
||||
System.out.println(line);
|
||||
}
|
||||
} else {
|
||||
File myFile = new File(new File(sigPlace.OUTDIR,sigPlace.UPLOADSDIR),filename);
|
||||
|
@ -21,6 +21,12 @@
|
||||
document.getElementById("msg").disabled=false;
|
||||
fetchComments()
|
||||
})
|
||||
.catch((err)=>{
|
||||
document.getElementById("submit").disabled=
|
||||
document.getElementById("name").disabled=
|
||||
document.getElementById("col").disabled=
|
||||
document.getElementById("msg").disabled=false;
|
||||
})
|
||||
}
|
||||
function insert(c1,c2) {
|
||||
if (document.getElementById("msg").selectionStart==document.getElementById("msg").selectionEnd) {
|
||||
@ -78,17 +84,19 @@
|
||||
fetch("/COMMENTS?article=$ARTICLE.comment").then((data)=>data.text())
|
||||
.then((data)=>{
|
||||
data=data.split("\n");
|
||||
document.getElementById("comments").innerHTML="";
|
||||
document.getElementById("commentCounter").innerText=data[0]
|
||||
for (var i=data.length-3;i>=1;i-=2) {
|
||||
if (data[i].trim().length>0&&data[i+1].trim().length>0) {
|
||||
document.getElementById("comments").innerHTML+="<div id=\"msg"+((i+1)/2)+"\" class=\"commentDisplayer\"><div class=\"commentData\">"+decodeURIComponent(data[i])+"</div><br>"
|
||||
data2=data[i+1].split(";");
|
||||
document.getElementById("msg"+((i+1)/2)).style.borderColor=data2[1]
|
||||
document.getElementById("comments").innerHTML+="<div class=\"commentInfo\"><sup>- "+decodeURIComponent(data2[0])+"</sup></div></div><br>"
|
||||
if (!isNaN(Number(data[0]))) {
|
||||
document.getElementById("comments").innerHTML="";
|
||||
document.getElementById("commentCounter").innerText=data[0]
|
||||
for (var i=data.length-3;i>=1;i-=2) {
|
||||
if (data[i].trim().length>0&&data[i+1].trim().length>0) {
|
||||
document.getElementById("comments").innerHTML+="<div id=\"msg"+((i+1)/2)+"\" class=\"commentDisplayer\"><div class=\"commentData\">"+decodeURIComponent(data[i])+"</div><br>"
|
||||
data2=data[i+1].split(";");
|
||||
document.getElementById("msg"+((i+1)/2)).style.borderColor=data2[1]
|
||||
document.getElementById("comments").innerHTML+="<div class=\"commentInfo\"><sup>- "+decodeURIComponent(data2[0])+"</sup></div></div><br>"
|
||||
}
|
||||
}
|
||||
document.getElementById("commentContainer").style.visibility="visible"
|
||||
}
|
||||
document.getElementById("commentContainer").style.visibility="visible"
|
||||
})
|
||||
}
|
||||
fetchComments()
|
||||
|
@ -462,16 +462,16 @@ public class sigServer {
|
||||
}
|
||||
System.out.println("Sent "+file+" to client "+client+".");
|
||||
} else {
|
||||
System.out.println("Did not find "+file+". Sending an error instead.");
|
||||
file=Paths.get(sigPlace.OUTDIR,"error.html");
|
||||
CreateRawRequest(clientOutput,statusCode,statusMsg,Files.probeContentType(file),Files.readAllBytes(file),Files.getLastModifiedTime(file));
|
||||
CreateRawRequest(clientOutput,"404",statusMsg,Files.probeContentType(file),Files.readAllBytes(file),Files.getLastModifiedTime(file));
|
||||
String contentType = Files.probeContentType(file);
|
||||
if (contentType!=null&&contentType.equals("text/html")) {
|
||||
clientOutput.write(("<div class=\"generateTime\">Webpage generated in "+(System.currentTimeMillis()-startTime)+"ms</div>\r\n").getBytes());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
file=Paths.get(sigPlace.OUTDIR,"error.html");
|
||||
CreateRawRequest(clientOutput,"404",statusMsg,Files.probeContentType(file),Files.readAllBytes(file),Files.getLastModifiedTime(file));
|
||||
CreateRawRequest(clientOutput,statusCode,statusMsg,Files.probeContentType(file),Files.readAllBytes(file),Files.getLastModifiedTime(file));
|
||||
String contentType = Files.probeContentType(file);
|
||||
if (contentType!=null&&contentType.equals("text/html")) {
|
||||
clientOutput.write(("<div class=\"generateTime\">Webpage generated in "+(System.currentTimeMillis()-startTime)+"ms</div>\r\n").getBytes());
|
||||
|
Loading…
x
Reference in New Issue
Block a user