Поместите их в файл manifest.json
:
....
"content_scripts": [
{
"matches": ["*://*/*"],
"js": ["a1.js", "contentscript.js"]
}
],
....
Сначала будет загружено
a1.js
, затем contentscript.js
.
Пример:
// a1.js
function x() { return 100; }
alert(typeof y); // undefined, because `contentscript.js` is not loaded yet
setTimeout( function(){alert(typeof y;)}, 1000 ); // function
// contentscript.js
function y() {
alert(x()); // Shows 100
}