chromeworker/chromeproxy/base.js

34 lines
714 B
JavaScript
Raw Normal View History

2020-11-16 11:04:53 +00:00
var Host = "http://localhost:7123"
var GetTaskUrl = `${Host}/task/get`;
var FinishTaskUrl = `${Host}/task/content`;
var ErrorTaskUrl = `${Host}/task/error`;
2020-11-24 07:16:37 +00:00
var WorkerNumber = 1;
2020-11-23 10:50:25 +00:00
2020-11-20 10:24:42 +00:00
function UpdateHost(host) {
Host = host
GetTaskUrl = `${Host}/task/get`
FinishTaskUrl = `${Host}/task/content`
ErrorTaskUrl = `${Host}/task/error`
}
const BackgroundMsgType = {
2020-11-18 11:49:46 +00:00
NOTWANT: 'notwant',
2020-11-16 11:04:53 +00:00
CONTENT: 'content',
GETTASK: 'gettask',
2020-11-16 11:04:53 +00:00
TIMEOUT: 'timeout',
ERROR: 'error',
2020-11-18 11:49:46 +00:00
OK: 'ok',
};
2020-11-24 07:16:37 +00:00
// const InjectMsgType = {
// FETCH: 'fetch',
// WAIT: 'wait',
// ERROR: 'error',
// NOTASK: 'notask', // 没有任务
// CAPTURE: "capture", // 捕获内容
// OK: 'ok',
// };