No need to change or mess with any addons. If what you have works, just make a separate addon with the code and all addons will see it. You may have to name the addon with a ! in front to make sure it loads first. Those functions are global objects, so addons will see your change.
To make it even simpler, go to
https://addon.bool.no, paste your code, and unzip it like any other addon.