To run JS in an extension, it's recommended that all the code be packaged with your extension. This is to prevent the possibility of user's browsers becoming compromised. This just requires downloading the JS file, packaging it with your extension, and updating your extension once newer version becomes available if so desired.
See here for the full documentation, including how to whitelist certain domains to use scripts from there: https://developer.chrome.com/extensions/contentSecurityPolicy#resourceLoading