-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
63 lines (39 loc) · 1.28 KB
/
index.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
let tbody = document.getElementById('tbody')
chrome.runtime.onMessage.addListener(gotMessage);
function gotMessage(message, sender, sendResponse) {
// Received Array Of Cookies From content.js
if (message.reflectedCookies) {
console.log("Thank You we Recieved The Cookies")
let allcookiesreflected = message.reflectedCookies;
let i = 0;
while (allcookiesreflected[i]) {
console.log("this is refelct"+allcookiesreflected[i].name)
tbody.innerHTML += '<h1>'+allcookiesreflected[i].name+'</h1>'
// `
// <tr>
// <td data-title='Provider Name'>
// ${allcookiesreflected[i].name}
// </td>
// <td data-title='E-mail'>
// ${allcookiesreflected[i].value}
// </td>
// <td class='select'>
// <a class='button' href='#'>
// Select
// </a>
// </td>
// </tr> `
i++;
}
}
}
// Requesting Reflected Cookies from the content.js
window.addEventListener('DOMContentLoaded', () => {
let msg = {
run: "true"
};
chrome.tabs.query({active: true, currentWindow: true}, function(tabs){
chrome.tabs.sendMessage(tabs[0].id, msg);
console.log('Thank You We Request The Cookies From content.js')
});
})