I am trying to make a Chrome extension. And I can't change the text in div. Can you help me please? I can't find what's wrong here.
manifest.json:
{
"name": "Test",
"version": "0.0.1",
"description": "Test app",
"permissions": [ "background", "tts", "storage" ],
"background": { "scripts": ["my.js"] },
"browser_action": {
"default_popup": "my.html"
},
"manifest_version": 2
}
my.js:
function StartUp(){
var data ="dater";
document.getElementById("page").innerHTML = data;
}
my.html:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test app</title>
<script src="my.js"></script>
</head>
<body>
<div id="page" onclick="StartUp()">
hello
</div>
</body>
</html>
`.
– Marwelln Nov 25 '17 at 13:54