chromeworker/chromeproxy/base.js

31 lines
610 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-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',
};
const InjectMsgType = {
FETCH: 'fetch',
WAIT: 'wait',
ERROR: 'error',
2020-11-18 11:49:46 +00:00
NOTASK: 'notask',
OK: 'ok',
};