mirror of
https://github.com/tomoko-dev9/nntpchan.git
synced 2026-03-28 17:32:35 +01:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9405848c07 | ||
|
|
758a2c6bbb | ||
|
|
b3f104a80a | ||
|
|
8608d222c3 | ||
|
|
fcca345ba1 | ||
|
|
bc81c8e251 |
11
contrib/configs/nginx/nntpchan
Normal file
11
contrib/configs/nginx/nntpchan
Normal file
@@ -0,0 +1,11 @@
|
||||
# using srndv2 behind nginx with a prefix
|
||||
# make sure to set prefix=/nntpchan/ for section frontend in srnd.ini
|
||||
server {
|
||||
listen 80;
|
||||
location /nntpchan/(.*) {
|
||||
client_max_body_size 50M;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_pass http://[::1]:18000/$1;
|
||||
}
|
||||
}
|
||||
16
contrib/live/index.html
Normal file
16
contrib/live/index.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<html>
|
||||
<head>
|
||||
<title> nntpchan liveposting </title>
|
||||
<link rel="stylesheet" src="live.css" />
|
||||
<script type="text/javascript" src="live.js">
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<p>nntpchan liveposting is done entirly via javascript and websockets</P>
|
||||
<p>this frontend will not work without javascript enabled</p>
|
||||
</noscript>
|
||||
<div onload="nntpchan_load_ui(this)">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
83
contrib/live/live.js
Normal file
83
contrib/live/live.js
Normal file
@@ -0,0 +1,83 @@
|
||||
|
||||
function create_captcha_pane() {
|
||||
var elem = document.createElement("div");
|
||||
elem.setAttribute("class", "nntpchan_captcha_slash");
|
||||
|
||||
}
|
||||
|
||||
// create the base ui
|
||||
// pass in a function that does posting
|
||||
// return the model
|
||||
function create_ui(elem) {
|
||||
|
||||
var pane = document.createElement("div");
|
||||
|
||||
|
||||
var output = document.createElement("div");
|
||||
output.setAttribute("class", "nntpchan_output");
|
||||
|
||||
var output_elem = document.createElemen("div");
|
||||
output_elem.setAttribute("class", "nntpchan_output_root");
|
||||
output.appendChild(output_elem);
|
||||
|
||||
pane.appendChild(output);
|
||||
|
||||
var input = document.createElement("div");
|
||||
input.setAttribute("class", "nntpchan_input");
|
||||
|
||||
var input_elem = document.createElement("textarea");
|
||||
input_elem.setAttribute("class", "nntpchan_textarea");
|
||||
input.appendChild(input_elem);
|
||||
|
||||
var submit_elem = document.createElement("input");
|
||||
submit_elem.setAttrbute("type", "button");
|
||||
input.appendChild(submit_elem);
|
||||
|
||||
pane.appendChild(input);
|
||||
|
||||
|
||||
elem.appendChild(pane);
|
||||
|
||||
var captcha_elem = create_captcha_pane();
|
||||
|
||||
elem.appendChild(captcha_elem);
|
||||
|
||||
return {
|
||||
input: input_elem,
|
||||
submit: submit_elem,
|
||||
output: output_elem,
|
||||
captcha: captcha_elem
|
||||
}
|
||||
}
|
||||
|
||||
// load ui elements and start stuff up
|
||||
function nntpchan_load_ui(elem) {
|
||||
// check for websockets
|
||||
if (!("WebSocket" in window)) {
|
||||
elem.value = "websockets are needed for nntpchan liveposting";
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: make configurable url
|
||||
var url = "ws://" + location.hostname + ":18080/ws";
|
||||
|
||||
var socket = new WebSocket(url);
|
||||
|
||||
var send = function(obj) {
|
||||
socket.send(JSON.stringify(obj));
|
||||
}
|
||||
|
||||
var ui = create_ui(elem);
|
||||
ui.submit.addEventListener("click", function(ev) {
|
||||
|
||||
});
|
||||
|
||||
socket.onopen = function() {
|
||||
|
||||
}
|
||||
|
||||
socket.onmessage = function() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,10 +27,19 @@
|
||||
<div>Question: How can I remove content from nntpchan completely? </div>
|
||||
<div>‾\(._.)/‾ I don't know. You probably can't unless every server agrees to remove the content, even then, nothing prevents someone from reposting it. You can't delete what you post on the internet.</div>
|
||||
</p>
|
||||
<p>
|
||||
<div>Question: Do you allow child porn? </div>
|
||||
<div>No, fuck off and die in a fire. All infringing posts are nuked.</div>
|
||||
</p>
|
||||
<hr />
|
||||
<p>
|
||||
<div>Question: Do you allow XYZ content? </div>
|
||||
<div>If it violates USA Law or causes problems with my host, no. Otherwise, yes. <b>All posts on this site are the responsibility of the individual poster and not the administration of this server</b>.</div>
|
||||
<div>If it violates USA Law or causes problems with my host, no. Otherwise, probably.</div>
|
||||
</p>
|
||||
<hr />
|
||||
<p>
|
||||
<div>Question: Someone posted something I don't like but it's not illegal</div>
|
||||
<div>That is not my problem. All posts on this site are the responsibility of the individual poster and not the administration of this server</div>
|
||||
</p>
|
||||
<hr />
|
||||
<p>
|
||||
@@ -39,13 +48,13 @@
|
||||
</p>
|
||||
<hr />
|
||||
<p>
|
||||
<div>Please send any questions to ampernand [|at\] gmail {dot} com with subject starting with "nntpchan question" </div>
|
||||
<div>Please send any gripes/questions/inqueries/suggestions/complaints to ampernand [|at\] gmail {dot} com with subject starting with "nntpchan question" </div>
|
||||
</p>
|
||||
<hr />
|
||||
</div>
|
||||
<audio autoplay="" loop="">
|
||||
<source src="/static/about.mp3" type="audio/mpeg">
|
||||
<embed src="/static/about.mp3">
|
||||
<audio autoplay="autoplay" loop="loop">
|
||||
<source src="about.mp3" type="audio/mpeg">
|
||||
<embed src="about.mp3">
|
||||
</audio>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
function createBoard() {
|
||||
var form = document.getElementById("postform");
|
||||
var e = document.getElementById("boardname");
|
||||
form.action = form.action + e.value;
|
||||
var board = e.value;
|
||||
if ( ! board.startsWith("overchan.") ) {
|
||||
board = "overchan." + board;
|
||||
}
|
||||
form.action = form.action + board;
|
||||
form.submit();
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<h2>View the <a href="ukko.html">overboard</a></h2>
|
||||
<h3>Read the <a href="{{prefix}}static/faq.html">FAQ</a></h3>
|
||||
<h3>Join the <a href="https://qchat.rizon.net/?channels=#nntpchan">IRC</a></h3>
|
||||
<h3>Create a <a href="{{prefix}}new/">new board</a></h3>
|
||||
<h3>Fork on github: <a href="https://github.com/majestrate/nntpchan/">frontend</a> and <a href="https://github.com/majestrate/srndv2/">core</a></h3>
|
||||
<h4>We've Had {{totalposts}} Posts Since August 01 2015 </h4>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user