I've got a chrome extension with an object that looks like this:
someFunctions = { 'a': function() { doStuff(); }, 'b': function() { doOtherStuff(); } } Currently, my extension needs to be updated every single time someFunctions requires a new function. This can be incredibly frustrating as my extension has jumped from 2 functions inside someFunctions to 21, each time requiring a new update.
I would like to instead load this object externally from my domain, so my extension would not require any new updates to fix potential bugs or small mishaps. What is the best way to go about doing this? I would like to avoid adding my domain to the permissions list in the manifest or increasing permissions in the extension at all - I don't need to load an entire .js - just some functions.
I would like to avoid restructuring the code into some weird JSON Object and am against using eval().