Pressing a button a second time should undo the change. You can "encrypt" a sentence multiple ways. For the most part, order doesn't matter, except flip should be last, and unflip first.
Javascript was copied from multiple places, "view source" for credits.