This is a temporary workaround on the client side to successfully register on this forum. Just run this code in the developer console after selecting the form element.
Congratulations! I had a look into the original code also, but I did not manage to finish the analysis.
PS: for clarification I used Firefox browser menu MoreTools/WebDeveloperTools.
About your text "the developer console", maybe you could give more detailed instructions about finding the object ID, the place where to insert your code in the existing code, etc.