Javascript browser palindrome editing app