修复异常

This commit is contained in:
2023-08-15 21:09:19 +08:00
parent 2d12360655
commit ac6182d56f
2 changed files with 9 additions and 10 deletions

View File

@@ -1,8 +1,15 @@
/**
* 获取Anti-Content
*/
export const getAntiContent = message => {
message.type = "genAnti"
return new Promise((resolve) => {
chrome.runtime.sendMessage(message, resolve)
})
}
/**
利用chrome的fetch来避免跨域
**/
import {getAntiContent} from "@/api/chromeApi";
chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
if (request.type == 'api') {
new Promise((resolve) => {