What javascript expression is used to change substitutions?

Hi. I can’t find any information what javascript expression or code is used to change substitutions of drawing?
Does anyone know how to get acces to it with scipt editor?
Thank you

Are you aware of this and does it look like something useful to you?


Thanks for reminding about this script. I forgot i can see the code of this script. I got used to plugins with locked code.