From f94b3cf6e340d0721ace3c146acc3aff92ae009c Mon Sep 17 00:00:00 2001 From: hippoz Date: Sun, 4 Oct 2020 22:54:10 +0300 Subject: [PATCH] add no-cors --- res/lib/A.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/res/lib/A.js b/res/lib/A.js index 02ea200..4c5b158 100644 --- a/res/lib/A.js +++ b/res/lib/A.js @@ -46,7 +46,9 @@ A._Collection.prototype.html = function (html) { }; A._Collection.prototype.load = async function (url) { - const res = await fetch(url); + const res = await fetch(url, { + mode: 'no-cors' + }); if (!res.ok) { console.error(`load(${url}) failed with code ${res.status}`); return;