Favicon MV3 example (#721)
This commit is contained in:
Родитель
4da98eada4
Коммит
c2439aa243
|
@ -0,0 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="content.js"></script>
|
|
@ -0,0 +1,6 @@
|
|||
window.onload = e => {
|
||||
const img = document.createElement('img');
|
||||
const url = '_favicon/?page_url=https://www.google.com&size=64';
|
||||
img.src = chrome.runtime.getURL(url);
|
||||
document.body.appendChild(img);
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "Favicon",
|
||||
"version": "1",
|
||||
"manifest_version": 3,
|
||||
"permissions": ["favicon"],
|
||||
"content_scripts": [{
|
||||
"matches": ["<all_urls>"],
|
||||
"js": ["content.js"],
|
||||
"run_at": "document_idle"
|
||||
}],
|
||||
"web_accessible_resources": [{
|
||||
"resources": [ "_favicon/*" ],
|
||||
"matches": ["<all_urls>"],
|
||||
"extension_ids": [ "*" ]
|
||||
}],
|
||||
"action": { "default_popup": "content.html" }
|
||||
}
|
Загрузка…
Ссылка в новой задаче