<body>
<textarea name="styled-textarea" class="textarea" id="styled"> </textarea>
<div id="shover">
Your words mean a lot. Be careful.
</div>
<form id="usual" class="norm">
<input id="sendButton" type="submit" value="Submit Your Comment!">
</form>
<form id="trigger" class="noshow" onsubmit="return confirm('Your words could deeply hurt someone. Are you sure you want to post?');">
<input id="sendButton" type="submit" value="Submit Your Comment!">
</form>
</body>
$(document).ready(function() {
var triggerWords = ["stupid",
"ugly",
"fat",
"kill",
"dumb",
"idiot",
"moron",
"no future",
"nerd",
"smelly",
"stinks",
"stink",
"fatso",
"freak",
"weirdo",
"crazy",
"ass",
"asshole",
"bitch",
"abortion",
"disgusting",
"loser",
"lame",
"failure",
"unlovable",
"shit",
"fuck",
"worthless",
"douchebag",
"douche",
"I hate you",
"retard",
"retarded",
"pervert",
"overdramatic",
"prick",
"hater",
"hate",
"disgrace",
"obese",
"lazy",
"unloved",
"geek",
"unwanted",
"emo",
"annoying",
"untalented",
"whore",
"obnoxious",
"slut",
"homo",
"useless",
"psycho",
"pathetic",
"selfish",
"monster",
"coward",
"naive",
"gullible",
"crybaby",
"unqualified",
"hopeless",
"sleazy",
];
$(document).on('keyup', 'textarea', function() {
for (var i = 0; i < triggerWords.length; i++) {
if ($(this).val().toLowerCase().indexOf(triggerWords[i]) != -1) {
document.getElementById("styled").className = "mystyle";
document.getElementById("shover").className = "mason";
const messages = ['<img src="https://lh3.googleusercontent.com/TzOBj6xt9unc8n41fMyUZ46FG4MRXBK6wkdOtzmKJPoLa9gBYNwZYQkRB8fsboqM1LHh3ahxOLOlyKsH1zG1qmGHgbS6IK-yZtv6Duo6_thwIKEVRY7BZNr2JJzAkYviyKp_q7SPWnp1"width="200px" class="floater" onclick="javascript:eraseText();">Words mean a lot. Their echoes can brighten someone\'s day. Or they can make a bad day worse. Consider the person behind the screen.', '<img src="https://lh3.googleusercontent.com/TzOBj6xt9unc8n41fMyUZ46FG4MRXBK6wkdOtzmKJPoLa9gBYNwZYQkRB8fsboqM1LHh3ahxOLOlyKsH1zG1qmGHgbS6IK-yZtv6Duo6_thwIKEVRY7BZNr2JJzAkYviyKp_q7SPWnp1"width="200px" class="floater" onclick="javascript:eraseText();">Your words can be a force for happiness or dejection. Choose carefully.', 'Be...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.