customize api

This commit is contained in:
Gabe Yuan
2023-09-06 14:57:02 +08:00
parent f772fa000c
commit c7c5866131
10 changed files with 232 additions and 231 deletions

View File

@@ -177,6 +177,10 @@ export const fetchData = async (
* @returns
*/
export const fetchPolyfill = async (input, { isBg = false, ...opts } = {}) => {
if (!input.trim()) {
throw new Error("URL is empty");
}
// 插件
if (isExt && !isBg) {
const res = await sendBgMsg(MSG_FETCH, { input, opts });