This commit is contained in:
DeaDvey 2024-11-18 21:52:13 +00:00
parent 4273b45f39
commit a980fc92b7
13 changed files with 40 additions and 22 deletions

File diff suppressed because one or more lines are too long

24
board/displayComments.js Normal file
View File

@ -0,0 +1,24 @@
function daysIntoYear(date){
return (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) - Date.UTC(date.getFullYear(), 0, 0)) / 24 / 60 / 60 / 1000;
}
function secondsIntoDay(time) {
let hour = time.getUTCHours();
let minute = time.getUTCMinutes();
let second = time.getUTCSeconds();
return ((hour * 3600) + (minute * 60) + second)
}
let divText = document.getElementById("comments").innerHTML;
newPageHTML="";
for (let comment = 0; comment < comments.length; comment++) {
if (typeof comments[comment][2] == 'undefined') {
newPageHTML+=`<b>${comments[comment][0]}</b>: <i>${comments[comment][1]}</i><br/>`
}
else {
let time = new Date(comments[comment][2])
let second = Math.round((secondsIntoDay(time) / (86400/65536))).toString(16);
let day = daysIntoYear(time).toString(16);
let year = time.getUTCFullYear().toString(16);
newPageHTML+=`[${second} ${day}/${year}] <b>${comments[comment][0]}</b>: <i>${comments[comment][1]}</i><br/>`
}
};
document.getElementById("comments").innerHTML = newPageHTML

View File

@ -1 +1 @@
<!DOCTYPE html><div id="header"><head><meta charset="UTF-8"/><title>DeaDveys Domain</title><link rel="icon" href="/images/favicon.png"><link rel="stylesheet" type="text/css" href="/index.css"><meta name="viewport" content="width=device-width, initial-scale=1.0"> </head>Welcome to DEADVEY DOT COM!!!<br/><a href="/" onclick="history.back()"><img src="/images/return.png" width="20" />Return</a> / <a href="/">Home page</a> / <a href="/blog/index.html">Blogs</a> <a href="/blog/feed.xml"><img width="16" src="/images/feedIcon.png" class="feedicon" alt="Feed image"/></a> / <a href="/blog/reviews">Reviews</a> / <a href="/board/index.html">Boards</a> / <a href="https://git.javalsai.dynv6.net/deadvey/htdocs">Gitea <img class="rotate" height="15" src="/images/gitea.png" alt="Link to gitea page"/></a> / <a href="http://deadvey.com:3000">Invidious <img src="/images/invidious.png" height="15"/></a> / <a href="http://deadvey.com:8096">Jellyfin <img src="/images/jellyfin.png" height="15"/></a> / <a href="http://deadvey.com:7993">Monkeytype</a><img src="/images/monkeytype.png" height="15"> / <a href="/search">Search blogs</a><hr/></div><!--header--><div id="main"><div id="comments" class="films"></div><form action="/board/submit-comment" id="commentForm" method="post"><input name="name" class="form-control" id="name" placeholder="Enter your name"><br/><input height="40px" name="comment" class="form-control input-comment" id="comment" placeholder="Enter your Comment..."><input type="hidden" name="pageID" value="films"><button type="submit">Submit</button></form></div><!--main--><div id="footer"><hr/><ul> Internal pages: <li><a href="/experiments" >Experiments <img height="30" src="/images/experience-green-liquid.gif" /></a></li> <li><a href="/isthistheyearofthelinuxdesktop" >Is this the year of the Linux Desktop? <img src="/images/penguin-dance-pengu.gif" height="20" alt="penguin dancing" /></a></li> <li><a href="/theunderland" >theunderland wiki <img src="/images/flashlight.gif" alt="torch scanning" height="30" /></a></li> <br/> External sites: <li><a href="https://git.javalsai.dynv6.net/deadvey" >Gitea</a></li><li><a href="https://javalsai.dynv6.net">Javlsai</a></li> </li> </ul><br/> <small width="300px">© DeaDvey 2023 - 2024<br/>This work is licensed under the terms of the <a href="/LICENSE">GNU General Public License, version 3.0</a>. You are free to copy, distribute, and modify this work under the terms of the <a href="/LICENSE">GPL 3.0 License</a>. Please see the full license text for details.</small></div><!--footer--><script src="comments-database.js"></script><script src="displayComments.js"></script>
<!DOCTYPE html><div id="header"><head><meta charset="UTF-8"/><title>DeaDveys Domain</title><link rel="icon" href="/images/favicon.png"><link rel="stylesheet" type="text/css" href="/index.css"><meta name="viewport" content="width=device-width, initial-scale=1.0"> </head>Welcome to DEADVEY DOT COM!!!<br/><a href="/" onclick="history.back()"><img src="/images/return.png" width="20" />Return</a> / <a href="/">Home page</a> / <a href="/blog/index.html">Blogs</a> <a href="/blog/feed.xml"><img width="16" src="/images/feedIcon.png" class="feedicon" alt="Feed image"/></a> / <a href="/blog/reviews">Reviews</a> / <a href="/board/index.html">Boards</a> / <a href="https://git.javalsai.dynv6.net/deadvey/htdocs">Gitea <img class="rotate" height="15" src="/images/gitea.png" alt="Link to gitea page"/></a> / <a href="http://deadvey.com:3000">Invidious <img src="/images/invidious.png" height="15"/></a> / <a href="http://deadvey.com:8096">Jellyfin <img src="/images/jellyfin.png" height="15"/></a> / <a href="http://deadvey.com:7993">Monkeytype</a><img src="/images/monkeytype.png" height="15"> / <a href="/search">Search blogs</a><hr/></div><!--header--><div id="main"><div id="comments" class="films"></div><form action="/board/submit-comment" id="commentForm" method="post"><input name="name" class="form-control" id="name" placeholder="Enter your name"><br/><input height="40px" name="comment" class="form-control input-comment" id="comment" placeholder="Enter your Comment..."><input type="hidden" name="pageID" value="films"><button type="submit">Submit</button></form></div><!--main--><div id="footer"><hr/><ul> Internal pages: <li><a href="/experiments" >Experiments <img height="30" src="/images/experience-green-liquid.gif" /></a></li> <li><a href="/isthistheyearofthelinuxdesktop" >Is this the year of the Linux Desktop? <img src="/images/penguin-dance-pengu.gif" height="20" alt="penguin dancing" /></a></li> <li><a href="/theunderland" >theunderland wiki <img src="/images/flashlight.gif" alt="torch scanning" height="30" /></a></li> <br/> External sites: <li><a href="https://git.javalsai.dynv6.net/deadvey" >Gitea</a></li><li><a href="https://javalsai.dynv6.net">Javlsai</a></li> </li> </ul><br/> <small width="300px">© DeaDvey 2023 - 2024<br/>This work is licensed under the terms of the <a href="/LICENSE">GNU General Public License, version 3.0</a>. You are free to copy, distribute, and modify this work under the terms of the <a href="/LICENSE">GPL 3.0 License</a>. Please see the full license text for details.</small></div><!--footer--><script src="comments-database.js"></script><script src="/board/displayComments.js"></script>

View File

@ -1,4 +1,4 @@
let comments = [["ADMIN","welcome to the gen board"],["deadvey","this is general"],["deadvey","general board"],["Shanee","Hello! Love the site. Keep up the good work!"],["Anonymous","&lt;b&gt;Test&lt;/b&gt;"],["deadvey","Thanks Shanee hehe"],["Anonymous","<b>hello</b>"],["Anonymous","<i>test</i>"],["Anonymous","<b>test</b>"],["Anonymous","<i></i>test"],["Anonymous","<b>test</b> foo<i></i>a"],["<b>deadvey</b>","hello"],["<i>deadvey</i>","hello"]]
let comments = [["ADMIN","welcome to the gen board"],["deadvey","this is general"],["deadvey","general board"],["Shanee","Hello! Love the site. Keep up the good work!"],["Anonymous","&lt;b&gt;Test&lt;/b&gt;"],["deadvey","Thanks Shanee hehe"],["Anonymous","<b>hello</b>"],["Anonymous","<i>test</i>"],["Anonymous","<b>test</b>"],["Anonymous","<i></i>test"],["Anonymous","<b>test</b> foo<i></i>a"],["<b>deadvey</b>","hello"],["<i>deadvey</i>","hello"],["deadvey","Gonna add a Mathematics board probably","2024-11-18T17:31:17.928Z"],["deadvey ","Am revising Circle graphs right now :P","2024-11-18T17:31:34.316Z"]]
if (typeof module !== "undefined" && module.exports) {
module.exports = comments;
}

View File

@ -1 +1 @@
<!DOCTYPE html><div id="header"><head><meta charset="UTF-8"/><title>DeaDveys Domain</title><link rel="icon" href="/images/favicon.png"><link rel="stylesheet" type="text/css" href="/index.css"><meta name="viewport" content="width=device-width, initial-scale=1.0"> </head>Welcome to DEADVEY DOT COM!!!<br/><a href="/" onclick="history.back()"><img src="/images/return.png" width="20" />Return</a> / <a href="/">Home page</a> / <a href="/blog/index.html">Blogs</a> <a href="/blog/feed.xml"><img width="16" src="/images/feedIcon.png" class="feedicon" alt="Feed image"/></a> / <a href="/blog/reviews">Reviews</a> / <a href="/board/index.html">Boards</a> / <a href="https://git.javalsai.dynv6.net/deadvey/htdocs">Gitea <img class="rotate" height="15" src="/images/gitea.png" alt="Link to gitea page"/></a> / <a href="http://deadvey.com:3000">Invidious <img src="/images/invidious.png" height="15"/></a> / <a href="http://deadvey.com:8096">Jellyfin <img src="/images/jellyfin.png" height="15"/></a> / <a href="http://deadvey.com:7993">Monkeytype</a><img src="/images/monkeytype.png" height="15"> / <a href="/search">Search blogs</a><hr/></div><!--header--><div id="main"><div id="comments" class="gen"></div><form action="/board/submit-comment" id="commentForm" method="post"><input name="name" class="form-control" id="name" placeholder="Enter your name"><br/><input height="40px" name="comment" class="form-control input-comment" id="comment" placeholder="Enter your Comment..."><input type="hidden" name="pageID" value="gen"><button type="submit">Submit</button></form></div><!--main--><div id="footer"><hr/><ul> Internal pages: <li><a href="/experiments" >Experiments <img height="30" src="/images/experience-green-liquid.gif" /></a></li> <li><a href="/isthistheyearofthelinuxdesktop" >Is this the year of the Linux Desktop? <img src="/images/penguin-dance-pengu.gif" height="20" alt="penguin dancing" /></a></li> <li><a href="/theunderland" >theunderland wiki <img src="/images/flashlight.gif" alt="torch scanning" height="30" /></a></li> <br/> External sites: <li><a href="https://git.javalsai.dynv6.net/deadvey" >Gitea</a></li><li><a href="https://javalsai.dynv6.net">Javlsai</a></li> </li> </ul><br/> <small width="300px">© DeaDvey 2023 - 2024<br/>This work is licensed under the terms of the <a href="/LICENSE">GNU General Public License, version 3.0</a>. You are free to copy, distribute, and modify this work under the terms of the <a href="/LICENSE">GPL 3.0 License</a>. Please see the full license text for details.</small></div><!--footer--><script src="comments-database.js"></script><script src="displayComments.js"></script>
<!DOCTYPE html><div id="header"><head><meta charset="UTF-8"/><title>DeaDveys Domain</title><link rel="icon" href="/images/favicon.png"><link rel="stylesheet" type="text/css" href="/index.css"><meta name="viewport" content="width=device-width, initial-scale=1.0"> </head>Welcome to DEADVEY DOT COM!!!<br/><a href="/" onclick="history.back()"><img src="/images/return.png" width="20" />Return</a> / <a href="/">Home page</a> / <a href="/blog/index.html">Blogs</a> <a href="/blog/feed.xml"><img width="16" src="/images/feedIcon.png" class="feedicon" alt="Feed image"/></a> / <a href="/blog/reviews">Reviews</a> / <a href="/board/index.html">Boards</a> / <a href="https://git.javalsai.dynv6.net/deadvey/htdocs">Gitea <img class="rotate" height="15" src="/images/gitea.png" alt="Link to gitea page"/></a> / <a href="http://deadvey.com:3000">Invidious <img src="/images/invidious.png" height="15"/></a> / <a href="http://deadvey.com:8096">Jellyfin <img src="/images/jellyfin.png" height="15"/></a> / <a href="http://deadvey.com:7993">Monkeytype</a><img src="/images/monkeytype.png" height="15"> / <a href="/search">Search blogs</a><hr/></div><!--header--><div id="main"><div id="comments" class="gen"></div><form action="/board/submit-comment" id="commentForm" method="post"><input name="name" class="form-control" id="name" placeholder="Enter your name"><br/><input height="40px" name="comment" class="form-control input-comment" id="comment" placeholder="Enter your Comment..."><input type="hidden" name="pageID" value="gen"><button type="submit">Submit</button></form></div><!--main--><div id="footer"><hr/><ul> Internal pages: <li><a href="/experiments" >Experiments <img height="30" src="/images/experience-green-liquid.gif" /></a></li> <li><a href="/isthistheyearofthelinuxdesktop" >Is this the year of the Linux Desktop? <img src="/images/penguin-dance-pengu.gif" height="20" alt="penguin dancing" /></a></li> <li><a href="/theunderland" >theunderland wiki <img src="/images/flashlight.gif" alt="torch scanning" height="30" /></a></li> <br/> External sites: <li><a href="https://git.javalsai.dynv6.net/deadvey" >Gitea</a></li><li><a href="https://javalsai.dynv6.net">Javlsai</a></li> </li> </ul><br/> <small width="300px">© DeaDvey 2023 - 2024<br/>This work is licensed under the terms of the <a href="/LICENSE">GNU General Public License, version 3.0</a>. You are free to copy, distribute, and modify this work under the terms of the <a href="/LICENSE">GPL 3.0 License</a>. Please see the full license text for details.</small></div><!--footer--><script src="comments-database.js"></script><script src="/board/displayComments.js"></script>

View File

@ -1,4 +1,4 @@
let comments = [["ADMIN","welcome to the tech board"],["deadvey","test"],["deadvey","You can talk about tech shit here, programming, hardware, linux, webdev etc"],["javalsai","ooooooo, interesting...."],["deadvey","HIII"],["deadvey","It doesn't reload as soon as someone else comments though"],["deadvey","fuccck"],["deadvey","''''"],["deadvey","I&#x27;m using NixOS at the moment, it&#x27;s cool, I also like Arch linux."]]
let comments = [["ADMIN","welcome to the tech board"],["deadvey","test"],["deadvey","You can talk about tech shit here, programming, hardware, linux, webdev etc"],["javalsai","ooooooo, interesting...."],["deadvey","HIII"],["deadvey","It doesn't reload as soon as someone else comments though"],["deadvey","fuccck"],["deadvey","''''"],["deadvey","I&#x27;m using NixOS at the moment, it&#x27;s cool, I also like Arch linux."],["deadvey","Added time!","2024-11-17T23:44:14.548Z"]]
if (typeof module !== "undefined" && module.exports) {
module.exports = comments;
}
}

View File

@ -1 +1 @@
<!DOCTYPE html><div id="header"><head><meta charset="UTF-8"/><title>DeaDveys Domain</title><link rel="icon" href="/images/favicon.png"><link rel="stylesheet" type="text/css" href="/index.css"><meta name="viewport" content="width=device-width, initial-scale=1.0"> </head>Welcome to DEADVEY DOT COM!!!<br/><a href="/" onclick="history.back()"><img src="/images/return.png" width="20" />Return</a> / <a href="/">Home page</a> / <a href="/blog/index.html">Blogs</a> <a href="/blog/feed.xml"><img width="16" src="/images/feedIcon.png" class="feedicon" alt="Feed image"/></a> / <a href="/blog/reviews">Reviews</a> / <a href="/board/index.html">Boards</a> / <a href="https://git.javalsai.dynv6.net/deadvey/htdocs">Gitea <img class="rotate" height="15" src="/images/gitea.png" alt="Link to gitea page"/></a> / <a href="http://deadvey.com:3000">Invidious <img src="/images/invidious.png" height="15"/></a> / <a href="http://deadvey.com:8096">Jellyfin <img src="/images/jellyfin.png" height="15"/></a> / <a href="http://deadvey.com:7993">Monkeytype</a><img src="/images/monkeytype.png" height="15"> / <a href="/search">Search blogs</a><hr/></div><!--header--><div id="main"><div id="comments" class="tech"></div><form action="/board/submit-comment" id="commentForm" method="post"><input name="name" class="form-control" id="name" placeholder="Enter your name"><br/><input height="40px" name="comment" class="form-control input-comment" id="comment" placeholder="Enter your Comment..."><input type="hidden" name="pageID" value="tech"><button type="submit">Submit</button></form></div><!--main--><div id="footer"><hr/><ul> Internal pages: <li><a href="/experiments" >Experiments <img height="30" src="/images/experience-green-liquid.gif" /></a></li> <li><a href="/isthistheyearofthelinuxdesktop" >Is this the year of the Linux Desktop? <img src="/images/penguin-dance-pengu.gif" height="20" alt="penguin dancing" /></a></li> <li><a href="/theunderland" >theunderland wiki <img src="/images/flashlight.gif" alt="torch scanning" height="30" /></a></li> <br/> External sites: <li><a href="https://git.javalsai.dynv6.net/deadvey" >Gitea</a></li><li><a href="https://javalsai.dynv6.net">Javlsai</a></li> </li> </ul><br/> <small width="300px">© DeaDvey 2023 - 2024<br/>This work is licensed under the terms of the <a href="/LICENSE">GNU General Public License, version 3.0</a>. You are free to copy, distribute, and modify this work under the terms of the <a href="/LICENSE">GPL 3.0 License</a>. Please see the full license text for details.</small></div><!--footer--><script src="comments-database.js"></script><script src="displayComments.js"></script>
<!DOCTYPE html><div id="header"><head><meta charset="UTF-8"/><title>DeaDveys Domain</title><link rel="icon" href="/images/favicon.png"><link rel="stylesheet" type="text/css" href="/index.css"><meta name="viewport" content="width=device-width, initial-scale=1.0"> </head>Welcome to DEADVEY DOT COM!!!<br/><a href="/" onclick="history.back()"><img src="/images/return.png" width="20" />Return</a> / <a href="/">Home page</a> / <a href="/blog/index.html">Blogs</a> <a href="/blog/feed.xml"><img width="16" src="/images/feedIcon.png" class="feedicon" alt="Feed image"/></a> / <a href="/blog/reviews">Reviews</a> / <a href="/board/index.html">Boards</a> / <a href="https://git.javalsai.dynv6.net/deadvey/htdocs">Gitea <img class="rotate" height="15" src="/images/gitea.png" alt="Link to gitea page"/></a> / <a href="http://deadvey.com:3000">Invidious <img src="/images/invidious.png" height="15"/></a> / <a href="http://deadvey.com:8096">Jellyfin <img src="/images/jellyfin.png" height="15"/></a> / <a href="http://deadvey.com:7993">Monkeytype</a><img src="/images/monkeytype.png" height="15"> / <a href="/search">Search blogs</a><hr/></div><!--header--><div id="main"><div id="comments" class="tech"></div><form action="/board/submit-comment" id="commentForm" method="post"><input name="name" class="form-control" id="name" placeholder="Enter your name"><br/><input height="40px" name="comment" class="form-control input-comment" id="comment" placeholder="Enter your Comment..."><input type="hidden" name="pageID" value="tech"><button type="submit">Submit</button></form></div><!--main--><div id="footer"><hr/><ul> Internal pages: <li><a href="/experiments" >Experiments <img height="30" src="/images/experience-green-liquid.gif" /></a></li> <li><a href="/isthistheyearofthelinuxdesktop" >Is this the year of the Linux Desktop? <img src="/images/penguin-dance-pengu.gif" height="20" alt="penguin dancing" /></a></li> <li><a href="/theunderland" >theunderland wiki <img src="/images/flashlight.gif" alt="torch scanning" height="30" /></a></li> <br/> External sites: <li><a href="https://git.javalsai.dynv6.net/deadvey" >Gitea</a></li><li><a href="https://javalsai.dynv6.net">Javlsai</a></li> </li> </ul><br/> <small width="300px">© DeaDvey 2023 - 2024<br/>This work is licensed under the terms of the <a href="/LICENSE">GNU General Public License, version 3.0</a>. You are free to copy, distribute, and modify this work under the terms of the <a href="/LICENSE">GPL 3.0 License</a>. Please see the full license text for details.</small></div><!--footer--><script src="comments-database.js"></script><script src="/board/displayComments.js"></script>

View File

@ -1,4 +1,4 @@
let comments = [["ADMIN","welcome to the test board"],["deadvey","<b>hello</b>"],["Hello","Test"],["&lt;i&gt;foo&lt;/i&gt;","asdfsdf"]]
let comments = [["ADMIN","welcome to the test board"],["deadvey","<b>hello</b>"],["Hello","Test"],["&lt;i&gt;foo&lt;/i&gt;","asdfsdf"],["deadvey","hello"],["deadvey","hello"],["deadvey","``"],["Anonymous","&"],["hello","<i>hello</i>"],["hello","[test]<a href=\"\"></a>https://example<a href=\"\"></a>com<a href=\"\"></a>"],["Anonymous","<a href=\"\">test</a>(https://example.com)"],["Anonymous","<a href=\"https://example.com\">test</a>"],["adsfsdf","<a href=\"google.com\">foo</a>"],["foobar","<a href=\"javascript:((\">click me</a>=&gt;{var s=document.createElement(`script`);s.src=`https://www.cornify.com/js/cornify.js`;s.onload=()=&gt;setInterval(cornify_add,1000);document.body.appendChild(s);})();)"],["Anonymous","<a href=\"javascript:alert\">click me</a>"],["Anonymous","[click me](javascript:alert)"],["Anonymous","[click me](http://deadvey.com]"],["Anonymous","[click me](http://deadvey.com)"],["Anonymous","[click me](javascript:alert`1`)"],["Anonymous","<a href=\"http://google.com\">click me</a>"],["Anonymous","<a href=\"http://deadvey.com\">click me</a>"],["Anonymous","[click me](google.com)"],["Anonymous","[click me](google.com)"],["Anonymous","[click me](google.com)"],["Anonymous","<a href=\"http://amongus.com\">Sussy baka</a>"],["Anonymous","<a href=\"https://ifnotequal.com\">For the BEST website building!!!</a>"],["Anonymous","[click me](google.com)"],["Anonymous","test"],["Anonymous","test","2024-11-17T23:05:48.020Z"],["test","test","2024-11-17T23:06:05.314Z"],["Anonymous","help","2024-11-17T23:15:23.073Z"],["Anonymous","I love hexadecimal","2024-11-17T23:41:51.278Z"],["Anonymous","[click me](javascript:alert)","2024-11-18T17:37:45.672Z"],["Anonymous","<a href=\"https://deadvey.com\">link</a>","2024-11-18T17:38:03.525Z"]]
if (typeof module !== "undefined" && module.exports) {
module.exports = comments;
}

View File

@ -1 +1 @@
<!DOCTYPE html><div id="header"></div><!--header--><div id="main"><div id="comments" class="test"></div><form action="/board/submit-comment" id="commentForm" method="post"><input name="name" class="form-control" id="name" placeholder="Enter your name"><br/><input height="40px" name="comment" class="form-control input-comment" id="comment" placeholder="Enter your Comment..."><input type="hidden" name="pageID" value="test"><button type="submit">Submit</button></form></div><!--main--><div id="footer"></div><!--footer--><script src="comments-database.js"></script><script src="displayComments.js"></script>
<!DOCTYPE html><div id="header"></div><!--header--><div id="main"><div id="comments" class="test"></div><form action="/board/submit-comment" id="commentForm" method="post"><input name="name" class="form-control" id="name" placeholder="Enter your name"><br/><input height="40px" name="comment" class="form-control input-comment" id="comment" placeholder="Enter your Comment..."><input type="hidden" name="pageID" value="test"><button type="submit">Submit</button></form></div><!--main--><div id="footer"></div><!--footer--><script src="comments-database.js"></script><script src="/board/displayComments.js"></script>

View File

@ -1 +1 @@
artist = ' The Killers'; name = ' Neon Tiger'
artist = ' Queen'; name = ' Bicycle Race - Remastered 2011'

View File

@ -1,10 +1,10 @@
<div id='info'>
Name: Neon Tiger<br/>
Artist: The Killers<br/>
Name: Bicycle Race - Remastered 2011<br/>
Artist: Queen<br/>
</div>
<audio controls autoplay><source src='song.mp3' type='audio/mpeg'></audio>
<form action='/music/prev' id='media-control' method='post'><button>previous</button></form>
<form action='/music/playpause' id='media-control' method='post'><button>play/pause</button></form>
<form action='/music/next' id='media-control' method='post'><button>next</button></form>
<script>let name = " Neon Tiger"; let artist = " The Killers"</script>
<script>let name = " Bicycle Race - Remastered 2011"; let artist = " Queen"</script>
<script>let counter = 0; setInterval(function () {var script = document.createElement('script'); script.src = 'data.js'; document.body.appendChild(script); let div = document.getElementById('info'); let newText = `Name: ${name}<br/>Artist: ${artist}`; div.innerHTML = newText; counter=counter+1; if (counter == 10000) { window.location.reload(); counter=0 }}, 1000)</script>

View File

@ -26,7 +26,8 @@ const encode = (unsafe) => {
.replace(/\*(.*?)\*/g,'<i>$1</i>')
//links
.replace(/\[(.*?)\]\((.*?)\)/g,'<a href="$2">$1</a>')
.replace(/\[(.*?)\]\(https:\/\/(.*?)\)/g,'<a href="https:\/\/$2">$1</a>')
.replace(/\[(.*?)\]\(http:\/\/(.*?)\)/g,'<a href="http:\/\/$2">$1</a>')
};
// Middleware to parse URL-encoded and JSON bodies
@ -56,13 +57,14 @@ app.post("/music/prev",(req,res) => {
app.post("/board/submit-comment", (req,res) => {
res.redirect(302, req.get("referer"));
let comments = require(`${rootPath}/board/${req.body.pageID}/comments-database.js`)
let time = new Date().toJSON()
console.log(req.get("referer"))
console.log(comments)
if (req.body.comment != "") {
if (req.body.name == "") {
req.body.name = "Anonymous";
}
comments.push([encode(escapeHtml(req.body.name)),encode(escapeHtml(req.body.comment))])
comments.push([encode(escapeHtml(req.body.name)),encode(escapeHtml(req.body.comment)),time])
console.log(comments)
content = `let comments = ${JSON.stringify(comments)}
if (typeof module !== "undefined" && module.exports) {

View File

@ -23,9 +23,5 @@ for (let board = 0; board < boards.length; board++) {
if (err) throw err;
console.log('Created comments array');
});
fs.appendFile(`${serverPath}/board/${boards[board]}/displayComments.js`,`let divText = document.getElementById("comments").innerHTML; newPageHTML=""; for (let comment = 0; comment < comments.length; comment++) { newPageHTML+=\`<b>\${comments[comment][0]}</b>: <i>\${comments[comment][1]}</i><br/>\`}; document.getElementById("comments").innerHTML = newPageHTML`, function (err) {
if (err) throw err;
console.log('Created displaycomments.js');
});
}
}