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){
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 {
let text = "\n".repeat(labels.length-1);
gen(text);

View file

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