fix config.js completely

This commit is contained in:
James Feng Cao 2023-04-12 13:16:15 +08:00
parent 032723db19
commit 2704b2f1cc
2 changed files with 14 additions and 6 deletions

View File

@ -38,7 +38,13 @@ function gen(text) {
} }
if(d.body){ if(d.body){
gen(d.body.innerHTML); var r=new XMLHttpRequest;
r.onload=function(){
var t=r.responseText;
gen(t);
}
r.open("GET",location.href,!0);
r.send(null);
}else { }else {
let text = "\n".repeat(labels.length-1); let text = "\n".repeat(labels.length-1);
gen(text); gen(text);

View File

@ -38,11 +38,13 @@ function gen(text) {
} }
if(d.body){ if(d.body){
fetch(location.href) var r=new XMLHttpRequest;
.then(res => res.text()) r.onload=function(){
.then(text => { var t=r.responseText;
gen(text); gen(t);
}); }
r.open("GET",location.href,!0);
r.send(null);
}else { }else {
let text = "\n".repeat(labels.length-1); let text = "\n".repeat(labels.length-1);
gen(text); gen(text);