aboutsummaryrefslogtreecommitdiff
path: root/static/main.html
diff options
context:
space:
mode:
Diffstat (limited to 'static/main.html')
-rw-r--r--static/main.html31
1 files changed, 0 insertions, 31 deletions
diff --git a/static/main.html b/static/main.html
index af9947f..70e3c23 100644
--- a/static/main.html
+++ b/static/main.html
@@ -8,37 +8,6 @@
<meta property="og:locale" content="en_US" />
<meta property="og:type" content="website" />
<link rel="icon" type="image/png" href="/static/favicon.png">
- <script>
- window.addEventListener('DOMContentLoaded', function(){
- var np = document.getElementById("new-post")
- if(np){
- np.setAttribute("onsubmit", "validatePost(this);return false;")
- }
- var np = document.getElementById("reply-post")
- if(np){
- np.setAttribute("onsubmit", "validatePost(this);return false;")
- }
- var np = document.getElementById("report-post")
- if(np){
- np.setAttribute("onsubmit", "validatePost(this);return false;")
- }
- })
- function validatePost(form)
- {
- var data = new FormData(form)
- fetch(form.action, {
- method: "POST",
- body: data
- }).then((r) => {
- if(r.redirected){
- document.location = r.url
- } else {
- r.text().then((t) => {alert(t)})
- }
- })
- return false
- }
- </script>
<style>
a, a:link, a:visited, a:hover, a:active {
text-decoration: none