Post Checker Script 10-15-2013, 02:42 PM
#1
Hey,
Hey, this checks if your post is long enough.
It will tell you if the post has enough characters.
You will need greasemonkey for firefox, or tampermonkey for chrome.
Code;
Screenshots;
![[Image: 3r4a.png]](http://img209.imageshack.us/img209/3738/3r4a.png)
Hey, this checks if your post is long enough.
It will tell you if the post has enough characters.
You will need greasemonkey for firefox, or tampermonkey for chrome.
Code;
Quote:// ==UserScript==
// @Name ForumFreebies Post Checker
// @namespace ForumFreebies Post Checker
// @description Checks if post is ok, made by Anonymous.
// @include http://forumfreebies.net/*
// @include http://www.forumfreebies.net/*
// @version 2.0
// ==/UserScript==
regex = /here.*?>/;
revised = "here.<br /> <div id='letscount'>0<br /><span style='color:red'>Too Low!</span></div>";
document.getElementById('quickreply_e').innerHTML= document.getElementById('quickreply_e').innerHTML.replace(regex,revised);
addButtonListener();
function addButtonListener(){
var texts = document.getElementById("message");
texts.addEventListener('keyup',doCountNow,true);
texts.addEventListener('keydown',doCountNow,true);
}
function doCountNow(){
var field = parseInt(document.getElementById('message').value.length);
var minlimit = 10;
var maxlimit = 16777215;
// if (field > maxlimit) {
// document.getElementById('message').value = document.getElementById('message').value.substring(0, maxlimit);
// } else {
// document.getElementById('letscount').innerHTML = maxlimit - document.getElementById('message').value.length;
// }
if (field < minlimit) {
document.getElementById('letscount').innerHTML = field+'<br /><span style="color:red">Not long enough.</span>'
}
else if (field > maxlimit) {
document.getElementById('letscount').innerHTML = field+'<br /><span style="color:red">Too long.</span>'
}
else {
document.getElementById('letscount').innerHTML = field+'<br /><span style="color:green">Yes, you can post this.</span>'
}
}
Screenshots;
![[Image: 3r4a.png]](http://img209.imageshack.us/img209/3738/3r4a.png)




![[Image: first_animat_by_authworks-d6v9j2u.gif]](http://fc02.deviantart.net/fs70/f/2013/328/6/8/first_animat_by_authworks-d6v9j2u.gif)
![[+]](https://sinister.li/images/modern/collapse_collapsed.png)




