-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackground.js
More file actions
42 lines (29 loc) · 863 Bytes
/
Copy pathbackground.js
File metadata and controls
42 lines (29 loc) · 863 Bytes
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
// background.js
var data1;
let color = '#3aa757';
var Email
// chrome.runtime.onInstalled.addListener(() => {
// chrome.storage.sync.set({ color });
// console.log(chrome.storage.sync);
// });
chrome.identity.getProfileUserInfo({'accountStatus': 'ANY'},(info) => {
Email = info.email
console.log(info);
console.log('Email: ', Email)
})
chrome.runtime.onMessage.addListener(
async function (request, sender, sendResponse) {
if (sender.tab.url.toString().search('cs.shopee.vn/portal/inhouse/') != -1) {
var Work_ID = sender.tab.id
// console.group('Lắng nghe từ Word')
// console.log('Tin nhắn từ Word', request.value);
// console.log('Work_ID: ', Work_ID)
// console.log('email: ', Email)
// console.groupEnd()
sendResponse({
Work_ID,
Email
})
}
}
)