I created a chrome extension to replace "textA" with "textB" and it's working, but I'm having issues loading photos on some pages. Looks like it's replacing "textA" in the photo link as well as on the page text.
My code:
{
"name": "name",
"version": "1.0",
"permissions": [
"tabs", "<all_urls>"
],
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["content.js"],
"run_at": "document_end"
}
],
"manifest_version": 2
}
javascript
document.body.innerHTML = document.body.innerHTML.replace(/textA/g, "textB");