Fork me on GitHub

TypeNinja

For people annoyed of someone watching your screen while you type.
Use typeninja, Just confuse and make them go mad.
   
Plugin by Arun David.

Example Usage

Download and include the jQuery library and the typeninja plugin in your web page.

<script src="jquery-1.10.2.min.js"></script>
<script src="jquery.typeninja.js"></script>
                
Now create a textarea and and use the below code to make it typeninja,

<textarea id="mytext"></textarea>
<script>
$(document).ready(function(){
	$('#mytext').typeninja().focus();
});
</script>
                

Usage options

$('#mytext').typeninja() This function is used to write some code to be executed when the given element is becoming visible to user when scrolling. i.e. coming into the visible part of the browser viewport.
$('#mytext').typeninjaToggle() Same like showFunction but for the event of the element going out of the visible part of the screen.
$('#mytext').typeninjaEncode() By default, Even when the small part of the element enters/exists the visibile part, the respective function is being called. But if you make wholeVisible to true, When the whole part of the element comes into the visibil area only the function triggers.
$('#mytext').typeninjaDecode() To manually specify the distance after how much px it is into the screen, it should trigger the event. Nagative value to trigger the function for the distance before it is being displayed.
$('#mytext').typeninjaEncodeText() Same like showShift but for hiding the element.
$('#mytext').typeninjaDecodeText() Same like showShift but for hiding the element.
$('#mytext').typeninjaStatus() Same like showShift but for hiding the element.

Beware

You might have already noticied that this crap of code is just replacing the charecters you are typing with the next charecter in the ASCII code table. This plugin is to secure you from the person sitting nearby, not from the data thieves. If you endup here from the search for JavaScript encryption, This is not the place for you. Don't ever think of using it as a security measure in your website now. Maybe a later version with a more customized encoding will do the trick.