TODO: create tab
This commit is contained in:
parent
fd8a3f2b24
commit
32fcc9deb3
|
@ -1,7 +1,10 @@
|
|||
console.log("background");
|
||||
|
||||
chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
|
||||
console.log(request, sender)
|
||||
chrome.runtime.onMessage.addListener(function (msg, sender, sendResponse) {
|
||||
console.log(msg, sender)
|
||||
if(msg.name === "boss") { // boss
|
||||
chrome.tabs.cre // 创建一个tab 然后注入脚本
|
||||
}
|
||||
// sendResponse({});
|
||||
|
||||
});
|
||||
|
|
|
@ -16,7 +16,7 @@ if( window.location.href === "http://localhost:12203/start") {
|
|||
// }
|
||||
chrome.runtime.sendMessage(JSON.parse(evt.data))
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
ws.onclose = function(evt) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user