I have created a JS script which has more optional settings.
So, somewhere near the beginning of the file I have something like this:
var doThat = true;
var playThat = false;
...
This script will be used by users and not by developers so they may not know how to edit a JavaScript file. How can I create a kind of admin-panel which would allow to change some variables in a JavaScript file.
I was thinking about creating an interface which will contain radio buttons to choose those values, now the problem is: how do I actually save those changes in the .js
file? Should I use PHP to edit the js file directly or is there some better way?