This code is made in JavaScript to be run by Photoshop to do the following described below.
Here is the code of the script a developer wrote to me. What this code does: