DhilipkumarC Ответов: 0

Как получить динамические значения всплывающего окна расширения chrome и создать новое окно с привязанными значениями этого всплывающего окна ?


I am using my chrome extension which will extract the html content of page I visit. and it will have that extracted content in its default popup page. so that I can save it in desktop as a html page. 

But my problem is, the popup window gets closed and stops working when I clicked out of that extension. So I decided to create that extension popup as new window. So that It wont gets closed until I close that.

Here I need your Solution, Because the created window is giving only the plain/default html of the Url I gave. [For Example : I'm giving the extension popup url as the url to create as a new window. but i need the binded html of extension popup to bind in that newly created window.

Kindly give me solutions.


Что я уже пробовал:

[Манифест. json]
{
"manifest_version": 2,
"версия": "1.0",
"browser_action": {
"default_icon": "новый.ПНГ",
"default_popup": "ParsingExtension.html"
}
}

В скрипте, упомянутом в этом всплывающем окне по умолчанию, будет получено содержимое веб-страницы и сохранено это содержимое.
В этом сценарии я использую

хром.окна.создать({
URL-Адрес : "Popup.html",
ширина: "500",
высота : "800",
тип: "всплывающее окно"
});
Так что он создаст новое окно, но просто даст пустой html-код по умолчанию, а не привязанное всплывающее окно расширения.

0 Ответов