I made a simple Chrome extension some time ago. It replaces some words, one for the other. It worked until it changed the “manifest_version”: 2 to 3. An example of an error is the inability to access the YouTube.com.
Here’s the code for the manifest.json:
{
"manifest_version": 3,
"name": "Change words",
"version": "1.0",
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["content.js"]
}
]
}
Code for content.js:
document.body.innerHTML = document.body.innerHTML.replace(/word01/g, "word02");
document.body.innerHTML = document.body.innerHTML.replace(/word03/g, "word04");
document.body.innerHTML = document.body.innerHTML.replace(/word05/g, "word06");
Thank you everyone.
I tried to run a Chrome extension that replaces some words with others, but it stopped working after changing the “manifest_version 2” to “manifest_version 3”. I expected the extension to work as before, but it resulted in an error, specifically the inability to access the YouTube site.