A small plugin to warn people when using swear words.
#Motivation:
Plugin has inbuilt very small list (you can add more) of swear words/sentences so if anyone types something containing these words, it will give them a warning.
Using plugin is pretty much forward:
$('textarea, input').hurt(
{
swearWords: ['fuck off', 'kill yourself', 'mother fucker', 'hate you', 'go to hell', 'leave me alone',
'you are dead'], #array of words/sentences if found, plugin will warn
errorMessage: 'Kind of language you are using can actually <b>HURT</b> someone. Please reconsider.' #message to show
classOnElement: 'hurt' #class will be added to input text or textarea where user is typing
onEvent: 'focusout' #or keyup, keydown
errorTemplate: '<div class="text-warning">errorMessage</div>'
}
);