I
I
Ivan Ivanov2016-03-21 17:52:16
Google Chrome
Ivan Ivanov, 2016-03-21 17:52:16

How to parse DOM of pages from popup window in chrome extensions?

The goal is to make an extension that, for example, will show the number of indexed site pages in Yandex. By clicking on the extension icon, a request should be sent to Yandex, the received response should be processed by the browser until the correct DOM is received (i.e., the code that will be after script processing is needed), and after that the number of pages will be pulled out of the DOM. As far as I understand, just a request like $.get will not return the finished DOM, only the server's response, right? So how then to be? Can you tell me the manual at least for creating such extensions?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Ukolov, 2016-03-21
@alexey-m-ukolov

You need to parse in a content script that has access to the DOM, and from popup only request data from it.

D
Dimonchik, 2016-03-21
@dimonchik2013

find an analogue and gut it, the code is all open

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question