脚本打包
Some checks failed
build / Build (push) Failing after 6s
test / Run tests (push) Failing after 8s
Some checks failed
build / Build (push) Failing after 6s
test / Run tests (push) Failing after 8s
This commit is contained in:
@ -21,8 +21,8 @@ export default class GMApi {
|
||||
readyState: <any>xhr.readyState,
|
||||
status: xhr.status,
|
||||
statusText: xhr.statusText,
|
||||
// header由service_worker处理
|
||||
// responseHeaders: xhr.getAllResponseHeaders().replace(removeXCat, ""),
|
||||
// header由service_worker处理,但是存在特殊域名(例如:edge.microsoft.com)无法获取的情况,在这里增加一个默认值
|
||||
responseHeaders: xhr.getAllResponseHeaders(),
|
||||
responseType: details.responseType,
|
||||
};
|
||||
if (xhr.readyState === 4) {
|
||||
|
@ -168,7 +168,7 @@ export default class GMApi {
|
||||
"headersReceived:" + requestId,
|
||||
(details: chrome.webRequest.WebResponseHeadersDetails) => {
|
||||
details.responseHeaders?.forEach((header) => {
|
||||
responseHeader += header.name + ": " + header.value + "\n";
|
||||
responseHeader += header.name + ": " + header.value + "\r\n";
|
||||
});
|
||||
this.gmXhrHeadersReceived.removeAllListeners("headersReceived:" + requestId);
|
||||
}
|
||||
@ -178,7 +178,9 @@ export default class GMApi {
|
||||
offscreenCon.onMessage((msg: { action: string; data: any }) => {
|
||||
// 发送到content
|
||||
// 替换msg.data.responseHeaders
|
||||
msg.data.responseHeaders = responseHeader;
|
||||
if (responseHeader) {
|
||||
msg.data.responseHeaders = responseHeader;
|
||||
}
|
||||
con.getConnect().sendMessage(msg);
|
||||
});
|
||||
}
|
||||
|
@ -194,8 +194,6 @@ export class RuntimeService {
|
||||
})
|
||||
);
|
||||
|
||||
console.log("pageLoad", enableScript);
|
||||
|
||||
this.mq.emit("pageLoad", {
|
||||
tabId: chromeSender.tab?.id,
|
||||
frameId: chromeSender.frameId,
|
||||
|
@ -57,7 +57,6 @@ export class ValueService {
|
||||
valueModel.data[key] = value;
|
||||
await this.valueDAO.save(storageName, valueModel);
|
||||
}
|
||||
console.log(valueModel);
|
||||
return true;
|
||||
});
|
||||
const sendData: ValueUpdateData = {
|
||||
|
Reference in New Issue
Block a user