I want to dynamically load some javascript on a page. I have the idea to make a content script that will check some condition for choosing which scripts to load.
My problem is that I don't know how to load a script. I have already tried JQuery getScript() function but it use unsafe-eval call. I have also found chrome.tab.executeScript() but it can't be use in Content scripts.
I have to do it form Content Script because it have to check some contion on the page BEFORE loading scripts. I don't want to load all my scripts each time a page is loaded.
Is it possible ?