Answer the question
In order to leave comments, you need to log in
Pass received data to extension "page"?
<!doctype html>
<html>
<head>
<title>Test</title>
<script type="text/javascript" src="jquery.js"></script>
</head>
<body>
<h1 style="width:200px; text-align:center;">Test</h1>
<div id="data"></div>
</body>
</html>
{
"manifest_version": 2,
"name": "Test",
"description": "Тест расширения",
"version": "1.1",
"icons": {
"128": "128.png"
},
"browser_action": {
"default_popup": "index.html"
},
"permissions": [
//"tabs",
"activeTab"
],
"content_scripts": [
{
//"matches": ["http://*/*"],
"matches": ["https://www.yandex.ru/"],
"css": ["style.css"],
"js": ["jquery.js","popup.js"]
}
]
}
$(document).ready(function() {
$("#какой-то iD").text(); // допустим получаю текст из тега на yandex.ru
});
div
with id="data"
?
Answer the question
In order to leave comments, you need to log in
https://developer.chrome.com/extensions/messaging#...
Examples: https://stackoverflow.com/questions/12265403/passi...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question