Archived
1
0

Merge branch 'master' into devel

Conflicts:
	contrib/static/site.css
This commit is contained in:
jeff 2015-10-02 15:41:44 -04:00
commit 6194db1941
7 changed files with 96 additions and 4 deletions

BIN
contrib/static/about.mp3 Normal file

Binary file not shown.

View File

@ -43,5 +43,9 @@
</p> </p>
<hr /> <hr />
</div> </div>
<audio autoplay="" loop="">
<source src="/static/about.mp3" type="audio/mpeg">
<embed src="/static/about.mp3">
</audio>
</body> </body>
</html> </html>

BIN
contrib/static/fieri.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 KiB

View File

@ -42,6 +42,34 @@ function nntpchan_unban() {
}) })
} }
function get_board_target() {
var e = document.getElementById("nntpchan_board_target");
return e.value;
}
function get_key_target() {
var e = document.getElementById("nntpchan_key_target");
return e.value;
}
function nntpchan_key_del() {
nntpchan_admin("pubkey.del", {
pubkey: get_key_target()
});
}
function nntpchan_key_add() {
nntpchan_admin("pubkey.add", {
pubkey: get_key_target()
});
}
function nntpchan_admin_board(method) {
nntpchan_admin(method, {
newsgroup: get_board_target()
})
}
function nntpchan_admin(method, param) { function nntpchan_admin(method, param) {
nntpchan_mod({ nntpchan_mod({
name:"admin", name:"admin",
@ -54,7 +82,9 @@ function nntpchan_admin(method, param) {
} else { } else {
return "nothing happened?"; return "nothing happened?";
} }
} },
method: ( param && "POST" ) || "GET",
data: param
}) })
} }
@ -145,7 +175,13 @@ function nntpchan_mod(mod_action) {
if (mod_action.name) { if (mod_action.name) {
var url = mod_action.name + "/" + target; var url = mod_action.name + "/" + target;
ajax.open(mod_action.method || "GET", url); ajax.open(mod_action.method || "GET", url);
var data = mod_action.data;
if (data) {
ajax.setRequestHeader("Content-type","text/json");
ajax.send(JSON.stringify(data));
} else {
ajax.send(); ajax.send();
}
} else { } else {
alert("mod action has no name"); alert("mod action has no name");
} }

View File

@ -43,6 +43,10 @@ textarea {
padding: 10px 10px; padding: 10px 10px;
} }
pre > p {
display: block-inline;
}
.reply, th, .ukko_thread_header { .reply, th, .ukko_thread_header {
background: #202331; background: #202331;
} }
@ -243,3 +247,7 @@ html {
width: 50%; width: 50%;
padding: 10px; padding: 10px;
} }
#captcha_img {
background: grey;
}

View File

@ -19,7 +19,7 @@
<h1> {{frontend}} on nntpchan </h1> <h1> {{frontend}} on nntpchan </h1>
<h2>View the <a href="ukko.html">overboard</a></h2> <h2>View the <a href="ukko.html">overboard</a></h2>
<h3>Read the <a href="{{prefix}}static/faq.html">FAQ</a></h3> <h3>Read the <a href="{{prefix}}static/faq.html">FAQ</a></h3>
<h3>Join the <a href="https://i2p.rocks/irc/?channels=overchan&nick=nameless">IRC</a></h3> <h3>Join the <a href="https://qchat.rizon.net/?channels=#nntpchan">IRC</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> <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> <h4>We've Had {{totalposts}} Posts Since August 01 2015 </h4>
</div> </div>

View File

@ -25,8 +25,52 @@
<button onclick="nntpchan_unban()">unban (ip)</button> <button onclick="nntpchan_unban()">unban (ip)</button>
</div> </div>
</div> </div>
<hr />
<div> <div>
<button onclick="nntpchan_admin('template.reload', {})">reload all templates</button> <div> key actions </div>
<div>
<label for="nntpchan_board_target">pubkey:</label>
<input type="text" id="nntpchan_key_target" />
</div>
<div>
<button onclick="nntpchan_key_add()">add key</button>
<button onclick="nntpchan_key_del()">remove key</button>
</div>
</div>
<hr />
<div>
<div> board actions </div>
<div>
<label for="nntpchan_board_target">board name:</label>
<input type="text" id="nntpchan_board_target" />
</div>
<div>
<button onclick="nntpchan_admin_board('frontend.regen')">regenerate</button>
</div>
<div>
<button onclick="nntpchan_admin_board('frontend.ban')">ban</button>
<button onclick="nntpchan_admin_board('frontend.unban')">unban</button>
</div>
<div>
<button onclick="nntpchan_admin_board('frontend.nuke')">nuke</button>
</div>
</div>
<hr />
<div>
<div>
lightweight actions
</div>
<div>
<button onclick="nntpchan_admin('template.reload')">reload all templates</button>
</div>
</div>
<hr />
<div>
<label>very load heavy actions, use with care</label>
<div>
<button onclick="nntpchan_admin('frontend.regen')">regenerate all pages</button>
<button onclick="nntpchan_admin('thumbnail.regen', {threads:1})">regenerate all thumbnails</button>
</div>
</div> </div>
<div id="nntpchan_mod_result"></div> <div id="nntpchan_mod_result"></div>
<noscript> <noscript>