I’m making a little page for an IRL event. The event involves a game that works like this:
1. Attendee finds a codeword IRL
2. Attendee goes to my website and enters the codeword
3. If they enter a valid codeword, they score a point for their team
I’ve got it set up so that there’s a wordpress page with a form, and the form activates a script that knows all the valid codewords. If the codeword is valid, the user gets a point. If it’s not valid, the user gets a message saying to try again.
My trouble is, anyone could click “View Page Source”, scroll through the script and look up *all* the codewords immediately. That would ruin the game. So I want the script to be in a separate file (like CodewordSearch.js or whatever), and the frontend just loads that script without revealing its contents.
Is there a way to do this? I have to do it in WordPress because the game is based on a pre-existing site that already uses WordPress.
[ad_2]