This plugin is designed to simplify encoding and decoding text on your webpage using rot13, for example to make it easier to obscure or decode spoilers or other text in a blog post, game or application.
Download the production version or the development version.
In your web page:
<script src="jquery.js"></script>
<script src="dist/jquery.rot13.min.js"></script>
<script>
jQuery(function($) {
var str = $.rot13(str); // rot13 encodes and returns the input string
$('p').rot13(); // rot13 encodes the text of every <p> element on the page
});
</script>
$('p').rot13(); // rot13 encodes the text of every <p> element on the page
var str = $.rot13(str); // rot13 encodes and returns the input string
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.
Also, please don't edit files in the "dist" subdirectory as they are generated via grunt. You'll find source code in the "src" subdirectory!
Copyright (c) 2012–2018 K. Adam White
Licensed under the MIT license.