Manifest to V3, removed extension build and private key

This commit is contained in:
2022-09-03 23:12:40 +03:00
parent 8b4f8f19f7
commit 35d5f2cab3
4 changed files with 25 additions and 41 deletions

View File

@@ -1,9 +1,6 @@
{
"background": {
"scripts": ["background.js"]
},
"browser_action": {
"default_popup": "settings.html"
"service_worker": "background.js"
},
"content_scripts": [
{
@@ -14,21 +11,36 @@
"*://*.twitch.tv/*.htm",
"*://*.twitch.tv/*.htm?*"
],
"js": ["run.js"],
"matches": ["*://*.twitch.tv/*"]
"js": [
"run.js"
],
"matches": [
"*://*.twitch.tv/*"
]
}
],
"description": "Add notes to twitch users (only visible to you)",
"externally_connectable": {
"matches": ["*://*.twitch.tv/*"]
"matches": [
"*://*.twitch.tv/*"
]
},
"homepage_url": "https://rdarius.lt/projects/chrome-extensions/twitch-notes",
"icons": {
"128": "icon.png"
},
"manifest_version": 2,
"manifest_version": 3,
"name": "Twitch Notes",
"permissions": ["*://*.twitch.tv/*"],
"version": "0.0.0.1",
"web_accessible_resources": ["twitch-notes.js", "twitch-notes.css"]
"web_accessible_resources": [
{
"resources": [
"twitch-notes.js",
"twitch-notes.css"
],
"matches": [
"*://*.twitch.tv/*"
]
}
]
}

View File

@@ -161,7 +161,7 @@
)[0];
} while (!buttonContainer || giveUpAt < Date.now());
// createSettingsButton(buttonContainer);
createSettingsButton(buttonContainer);
// Options for the observer (which mutations to observe)
const config = { attributes: true, childList: true, subtree: true };
@@ -183,10 +183,10 @@
const username = n.attributes["data-a-user"].value;
if (username) {
let noteButton = usernameContainer.querySelector(".twitchnote");
let noteButton = usernameContainer.querySelector(".twitch-note");
if (!noteButton) {
const twitchNote = document.createElement("span");
twitchNote.classList.add("twitchnote");
twitchNote.classList.add("twitch-note");
twitchNote.style.cursor = "pointer";
twitchNote.addEventListener("click", () => {
openTwitchNote(username);