feat: add more extensions manifest key options (#39599)

feat: add more manifest key options
This commit is contained in:
Shelley Vohr 2023-08-28 16:02:22 +02:00 committed by GitHub
parent f2f83a73fc
commit f369b144d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 132 additions and 1 deletions

View file

@ -0,0 +1,9 @@
{
"name": "malformed",
"version": "0.1",
"manifest_version": 3,
"description": "Extension with invalid host_permissions",
"host_permissions": [
"malformed_host"
]
}

View file

@ -0,0 +1,6 @@
/* global chrome */
chrome.runtime.onMessage.addListener((_request, _sender, sendResponse) => {
chrome.tabs.query({}).then(sendResponse);
return true;
});

View file

@ -0,0 +1,11 @@
/* global chrome */
chrome.runtime.onMessage.addListener((request, _sender, sendResponse) => {
sendResponse(request);
});
window.addEventListener('message', () => {
chrome.runtime.sendMessage({ method: 'query' }, response => {
console.log(JSON.stringify(response));
});
}, false);

View file

@ -0,0 +1,14 @@
{
"name": "privileged-tab-info",
"version": "0.1",
"manifest_version": 3,
"content_scripts": [{
"matches": [ "<all_urls>"],
"js": ["main.js"],
"run_at": "document_start"
}],
"host_permissions": ["http://*/*"],
"background": {
"service_worker": "background.js"
}
}