forked from rachdi/projet_client_taleez
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
37 lines (27 loc) · 1.08 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
chrome.runtime.onMessage.addListener(
function(request, sender, sendResponse) {
var headings = document.evaluate("//*[@id="ember3887"]/div[3]/div[1]/h1", document, null, XPathResult.ANY_TYPE, null);
/* Search the document for all h2 elements.
* The result will likely be an unordered node iterator. */
var thisHeading = headings.iterateNext();
var name = "";
while (thisHeading) {
name += thisHeading.textContent + "\n";
thisHeading = headings.iterateNext();
// document.getElementById('job').innerHTML=alertText;
}
console.log("votre nom est :"+name);
var headings = document.evaluate("//*[@id="ember3843"]/div[3]/div[1]/h2", document, null, XPathResult.ANY_TYPE, null);
/* Search the document for all h2 elements.
* The result will likely be an unordered node iterator. */
var thisHeading = headings.iterateNext();
var job = "";
while (thisHeading) {
job += thisHeading.textContent + "\n";
thisHeading = headings.iterateNext();
// document.getElementById('job').innerHTML=alertText;
}
console.log("votre travaille :"+job);
var reponse={name,job};
sendResponse(reponse);
});