chromeworker/chromeproxy/base.js
2020-11-24 15:16:37 +08:00

34 lines
714 B
JavaScript

var Host = "http://localhost:7123"
var GetTaskUrl = `${Host}/task/get`;
var FinishTaskUrl = `${Host}/task/content`;
var ErrorTaskUrl = `${Host}/task/error`;
var WorkerNumber = 1;
function UpdateHost(host) {
Host = host
GetTaskUrl = `${Host}/task/get`
FinishTaskUrl = `${Host}/task/content`
ErrorTaskUrl = `${Host}/task/error`
}
const BackgroundMsgType = {
NOTWANT: 'notwant',
CONTENT: 'content',
GETTASK: 'gettask',
TIMEOUT: 'timeout',
ERROR: 'error',
OK: 'ok',
};
// const InjectMsgType = {
// FETCH: 'fetch',
// WAIT: 'wait',
// ERROR: 'error',
// NOTASK: 'notask', // 没有任务
// CAPTURE: "capture", // 捕获内容
// OK: 'ok',
// };