I would like to create Google Chrome extension. Its job is to replace a word with another on all websites.
I have the following manifest.json file:
{
"name": "My extension",
"version": "1.0",
"background_page": "background.html",
"permissions": [
"tabs", "http://*/*"
],
"content_scripts": [
{
"matches": ["http://*/*"],
"js": ["myscript.js"],
"run_at": "document_end"
}
]
}
and the javascript in myscript.js is:
< script type="text/javascript" >
document.body.innerHTML = document.body.innerHTML.replace("uno", "dos");
< /script >
However this does not function.. and I cannot find a way to debug the content script, only the background.html
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…