Javascript: Create compoundPath AND keep the name

The free javascript “CompoundPath.jsx” creates a compound path with preservation of the name in Adobe Illustrator 2022 and also runs with older versions of Illustrator. The normal command in Adobe Illustrator “Object > Compound Path” unfortunately automatically gives the object a new name, so the user has to change this again. This is especially annoying when designing fonts with Fontself Maker, as the names of the objects become the names of the letters (glyphs). The Javascript “CompoundPath.jsx” presented here receives the name of the topmost object and thus saves a lot of time.