初始化

This commit is contained in:
2021-04-26 18:42:12 +08:00
commit a7f0eabbc7
13 changed files with 243 additions and 0 deletions

37
content/inject.js Normal file
View File

@@ -0,0 +1,37 @@
// var href = window.location.href;
setInterval(function name() {
chrome.runtime.sendMessage({say: "Hello"})
fetch("http://localhost:12203/api").then((response)=>{
console.log(response);
console.log(response.json())
})
}, 10000)
// if(href.startsWith(Host)) {
// setInterval(function(){
// GetTask();
// }, 1);
// } else {
// setTimeout(function(){
// chrome.runtime.sendMessage({ type: BackgroundMsgType.CLOSETAB })
// }, 15000)
// }
// function GetTask() {
// try {
// chrome.runtime.sendMessage({ type: BackgroundMsgType.GETTASK }, function(){});
// } catch (error) {
// console.log(error);
// }
// };