I would like to implement a scripting language to assist in partially automating certain tasks on a public wiki. I cannot install anything such as Google Caja on the server or modify the wiki software itself, but I can install JavaScript code for client-side execution. Because my intent is to allow ordinary users to create and post scripts, using JavaScript itself is insecure and could lead to account compromises.
Does such a scripting language implementation exist, or if not, is it relatively easy to create? My focus is on ease of text processing, Ajax requests, and implementation.
Here is an example task a script would need to perform, taken from Wikipedia's procedure for requesting article deletion:
- Ask the user for the name of a wiki page and a good reason to delete it.
- Get that page's source code, add a deletion notice to the top, and save the new text.
- Create a new page (its name based on the first page's name) that includes the reason for deletion.
- Get the list of users who edited the page and notify the first one (again, by editing a specific page) that the page he created is about to be deleted.