{
"update_url": "https://clients2.google.com/service/update2/crx",
"name": "Name Project",
"version": "123",
"manifest_version": 3,
"permissions": [
"storage", "activeTab", "scripting", "nativeMessaging","tabs","webRequest"
],
"host_permissions": [
"*://*.site.ru/*"
],
"icons": {
"16": "img/16.png",
"48": "img/48.png",
"128": "img/128.png"
},
"options_ui": {
"page": "options.html",
"open_in_tab": false
},
"content_scripts": [{
"matches": [
"*://*.site.ru/*"
],
"js": [
"injects.js"
],
"all_frames": true,
"run_at": "document_idle"
}],
"web_accessible_resources": [
{
"resources": [
"script1.js",
"script2.js",
"script3.js",
"script4.js",
"script5.js"
],
"matches": ["*://*.site.ru/*"]
}
]
}
function inj(url){
let injectJS = document.createElement('script');
injectJS.setAttribute('charset', 'utf-8');
injectJS.type='text/javascript';
injectJS.src=chrome.runtime.getURL(url);
document.head.appendChild(injectJS);
}
inj("script1.js");
inj("script2.js");
inj("script3.js");
inj("script4.js");
inj("script5.js");
window.location.pathname