This commit is contained in:
Liwanyi 2022-12-20 11:19:07 +08:00
parent 11b33016db
commit b8bb19e6a6

View File

@ -39,7 +39,7 @@ let func = function (GM_addStyle, unsafeWindow, GM_getValue, GM_setValue, GM_xml
let typoCD; let typoCD;
window.addEventListener("hashchange", addBox); window.addEventListener("hashchange", addBox);
let original_fetch = unsafeWindow.fetch; let original_fetch = unsafeWindow.fetch;
unsafeWindow.fetch = async (url, init) => { let new_fetch = async (url, init) => {
let response = await original_fetch(url, init) let response = await original_fetch(url, init)
let respo = response.clone(); let respo = response.clone();
respo.json().then((data) => { respo.json().then((data) => {
@ -282,6 +282,9 @@ let func = function (GM_addStyle, unsafeWindow, GM_getValue, GM_setValue, GM_xml
}); });
return response; return response;
}; };
unsafeWindow.fetch = new_fetch;
window.fetch = new_fetch;
fetch = new_fetch;
function addBox() { function addBox() {
if (!document.querySelector(".hardyCTBox")) { if (!document.querySelector(".hardyCTBox")) {