chromeworker/chromeproxy/content/inject.js

27 lines
400 B
JavaScript
Raw Normal View History

var href = window.location.href;
2020-11-24 07:16:37 +00:00
if(href.startsWith(Host)) {
setInterval(function(){
GetTask();
}, 1);
} else {
setTimeout(function(){
chrome.runtime.sendMessage({ type: BackgroundMsgType.CLOSETAB })
}, 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-16 11:04:53 +00:00