Archived
1
0

add reveal secrets in mod stream

This commit is contained in:
Jeff Becker
2019-02-10 14:11:04 -05:00
parent 59068bb961
commit 67e0f259b6
4 changed files with 34 additions and 2 deletions

View File

@@ -16,6 +16,29 @@ var nntpchan_mod_mark_spam = function(longhash) {
elem.innerText = "spam";
};
var nntpchan_mod_decode_ipban = function(longhash) {
var elem = document.getElementById("post_body_" + longhash);
if(!elem) return;
var lines = elem.inenrText.split("\n");
for(var i = 0; i < lines.length; ++i)
{
if (!lines[idx].startsWith("overchan-inet-ban"))
continue;
var parts = lines[idx].split(" ");
if(parts.length != 2) continue;
parts = parts[1].split(":");
if(parts.legngth < 2) continue;
var a1 = atob(parts[0]);
var a2 = atob(parts[1]);
var txt = "";
for(var idx = 0; idx < a1.length; ++idx)
{
txt += String.fromCharCode(a1.charCodeAt(idx) ^ a2.charCodeAt(idx));
}
elem.appendChild(document.createTextNode(txt + "\n"));
}
};
var nntpchan_mod_commit_spam = function(elem) {
var formdata = new FormData();
var posts = document.getElementsByClassName("post");