Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


Post Checker Script filter_list
Author
Message
Post Checker Script #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;

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]
[Image: I67RpWB.png]
Aim: auth@basedgod.co


[Image: first_animat_by_authworks-d6v9j2u.gif]

Reply

RE: Forum Freebies | Post checker script. #2
Nice userscript, Anonymous. Cheers!

I've moved this to The Lounge as it suits this section better. Smile

Reply

RE: Forum Freebies | Post checker script. #3
(10-15-2013, 02:44 PM)Sinister Wrote: Nice userscript, Anonymous. Cheers!

I've moved this to The Lounge as it suits this section better. Smile

Thanks, hope you like it!
Aim: auth@basedgod.co


[Image: first_animat_by_authworks-d6v9j2u.gif]

Reply

RE: Post Checker Script #4
Just tested this. Works nicely. Thanks again, Anonymous. Appreciated.

Reply

RE: Post Checker Script #5
Glad you like it Sinister!
Aim: auth@basedgod.co


[Image: first_animat_by_authworks-d6v9j2u.gif]

Reply

RE: Post Checker Script #6
Thanks, just added it and it works great!

Reply







Users browsing this thread: 1 Guest(s)