初始化
This commit is contained in:
37
content/inject.js
Normal file
37
content/inject.js
Normal 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);
|
||||
// }
|
||||
// };
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user