Yeah, the Adobe provided plugins are really just JavaScript functions that run within the context of the s object... @bjoern__koth took that code, and with a few tweaks made it a function that could be run anywhere.
Personally, I find a lot of the plugins a little "bloaty", and they try to do a l...