Anonbot/views/respond.html

36 lines
1.4 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width, initial-scale=1 maximum-scale=1.0, user-scalable=0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">
<title>Anonbot WL</title>
<link href="../public/style.css" rel="stylesheet">
</head>
<body>
<h2 class="cover-heading">Respond to a post</h2>
<form action="/postcomment" method="post" id="d" class="f">
<input id="key" name="url" type="text" placeholder="Enter the post url">
<br/>
<textarea id="comment" name="comment" type="text" cols="36" rows ="7" placeholder="Comment something..." autofocus></textarea>
</form>
<button type="submit" id="comm" form="d" onclick="postAs('comm');">
<strong>Submit as comment</strong></button>
<button type="submit" id="response" form="d" onclick="postAs('response');">
<strong>Submit as response</strong></button>
<a href="https://www.notion.so/NEW-Responses-065ccb4aa7d2429c9f1f2f9838943654" target="_blank"><p>(What's this?)</p></a>
<script>
function postAs(type) {
document.getElementById(type).disabled = true;
var text = document.getElementById('comment');
text.value = text.value + '::'+type;
document.getElementById('d').submit();
}
</script>
</body>
</html>