Doublepostings
Posted: Tue Oct 12, 2010 12:44 pm
I noticed a dramatic increase in the amount of double posts per topic in the last few weeks. Sometimes there were even triple-posts.
I find this annoying. Very annoying. It is annoying because it reflects the lack of thinking before, while and after posting. And it reflects apathy: You can always use the "edit" button to, well, edit your post if you think you should add something.
Since apparently a human solution to this problem is not possible, I created a technical one:
A script (in javascript) that will pop up a dialog whenever you are about to commit a double-, triple-, or - heaven forbid - a quadruple-post:
It would have to be added to the forum header, and would only work if the user has javascript enabled. But since nowadays there is almost no way to enjoy surfing the internet while disabling javascipt, this shouldn't be a problem.
What do you think?
I find this annoying. Very annoying. It is annoying because it reflects the lack of thinking before, while and after posting. And it reflects apathy: You can always use the "edit" button to, well, edit your post if you think you should add something.
Since apparently a human solution to this problem is not possible, I created a technical one:
A script (in javascript) that will pop up a dialog whenever you are about to commit a double-, triple-, or - heaven forbid - a quadruple-post:
Code: Select all
function getElementsByTagAndClass(tag, cls) {
var tags = document.getElementsByTagName(tag);
var ret = [];
for (var i = 0; i < tags.length; ++i) {
if (tags[i].className.indexOf(cls) > -1)
ret.push(tags[i]);
}
return ret;
}
// get own name
var logoutStr = getElementsByTagAndClass("li", "icon-logout")[0];
var user = logoutStr.firstChild.title.replace(/^Logout \[\s+/, "").replace(/\s+\]$/, "");
// get author list
var posts = getElementsByTagAndClass("div", "post ");
var authors = []
for (var i = 0; i < posts.length; ++i) {
var author = posts[i].childNodes[1].childNodes[2].childNodes[5].childNodes[2].firstChild.innerHTML; // yeah, i know...
authors.push(author);
}
var beforebeforelast = authors[authors.length - 3];
var beforelast = authors[authors.length - 2];
var last = authors[authors.length - 1];
// nag function
function checkDoublePost() {
if (last == user) {
if (beforelast == user) {
if (beforebeforelast == user) {
alert("Quadruplepost?! NO!");
return false;
}
return confirm("Triple post? Really?");
}
return confirm("Are you sure you want to double post?\nYou can always edit your post.");
}
return true;
}
// add question popup to reply and quote links
var links = [];
var reply = getElementsByTagAndClass("div", "reply-icon");
for (var i = 0; i < reply.length; ++i)
links.push(reply[i].firstChild);
var quote = getElementsByTagAndClass("li", "quote-icon");
for (var i = 0; i < quote.length; ++i)
links.push(quote[i].firstChild);
for (var i = 0; i < links.length; ++i)
links[i].onclick = checkDoublePost;
What do you think?