2020-11-23 11:41:17 +00:00
|
|
|
var href = window.location.href;
|
2020-11-24 07:16:37 +00:00
|
|
|
if(href.startsWith(Host)) {
|
|
|
|
setInterval(function(){
|
|
|
|
GetTask();
|
|
|
|
}, 1);
|
2020-11-25 04:23:46 +00:00
|
|
|
} else {
|
|
|
|
setTimeout(function(){
|
2020-11-25 08:34:15 +00:00
|
|
|
chrome.runtime.sendMessage({ type: BackgroundMsgType.CLOSETAB })
|
2020-11-25 04:23:46 +00:00
|
|
|
}, 15000)
|
2020-11-16 11:04:53 +00:00
|
|
|
}
|
|
|
|
|
2020-11-24 07:16:37 +00:00
|
|
|
function GetTask() {
|
2020-11-23 10:50:25 +00:00
|
|
|
try {
|
2020-11-24 07:16:37 +00:00
|
|
|
chrome.runtime.sendMessage({ type: BackgroundMsgType.GETTASK }, function(){});
|
2020-11-23 10:50:25 +00:00
|
|
|
} catch (error) {
|
|
|
|
console.log(error);
|
2020-11-18 11:49:46 +00:00
|
|
|
}
|
2020-11-24 07:16:37 +00:00
|
|
|
};
|
2020-11-23 10:50:25 +00:00
|
|
|
|
2020-11-17 11:42:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-16 11:04:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|