I get the title in the content script or in the background, but how can I send it or get it in a popup window that opens with my own script - can I not get the title of the page in it (do I need the h1 of the page on which this popup extension is opened)?
UPD: In the popup window, I want to transfer the title to the server, but in the same script I cannot get it with the standard script, I also undefined in localStorage, although on the whole page I saved the title in localStorage by another script (which is content.js) .
The manifest device is as follows:
{
"manifest_version": 2,
"version": "0.1",
"name": "Name",
"description": "Description",
"content_scripts": [
{
"matches": ["*: // * / *"],
"css": ["ctyle.css"],
"js": ["content.js"],
"run_at": "document_end"
}
],
"background": {
"scripts": ["background.js"]
},
"icons": {
"16": "icon-16.png",
"48": "icon-48.png",
"128": "icon-128.png"
},
"permissions": [
"tabs",
"desired site / *",
"storage"
],
"browser_action": {
"default_title": "Name",
"default_icon": "icon-32.png",
"default_popup": "popup.html"
}
}