forked from TechieBoy/Volatile
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontentScript.js
More file actions
19 lines (16 loc) · 826 Bytes
/
contentScript.js
File metadata and controls
19 lines (16 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
console.log("Injecting Unaadhar!")
var s = document.createElement('script');
s.textContent = "var extensionId = " + JSON.stringify(chrome.runtime.id);
(document.head || document.documentElement).appendChild(s);
s = document.createElement('script');
s.src = chrome.extension.getURL('js/unaadhar.js');
(document.head || document.documentElement).appendChild(s);
chrome.runtime.onMessage.addListener(async function (request, sender, sendResponse) {
if (request.frombg != undefined) {
console.log(request);
var s = document.createElement('script');
console.log(JSON.stringify(request));
s.textContent = "if(typeof recv_user_data == undefined){let recv_user_data; } recv_user_data =" + JSON.stringify(request)+";";
(document.head || document.documentElement).appendChild(s);
}
});