use less saturated color highlighter color scheme

This commit is contained in:
MrOtherGuy
2021-05-29 18:15:14 +03:00
parent 894a7d9f9a
commit 7b725ccc58
2 changed files with 19 additions and 17 deletions

View File

@@ -35,10 +35,10 @@ function fetchWithType(url){
}
if(ext === "json"){
response.json()
.then(r=>resolve(r))
.then(resolve)
}else{
response.text()
.then(r=>resolve(r))
.then(resolve)
}
},except => reject(except))
@@ -457,13 +457,15 @@ async function handleSearchQuery(){
return
}
const codeBlock = document.querySelector("pre");
let composedText = "";
for(let file of files){
composedText += await fetchWithType(`chrome/${file}`);
composedText += "\n";
}
Highlighter.parse(codeBlock,composedText)
const codeBlock = document.querySelector("pre");
const promises = files.map(file=>fetchWithType(`chrome/${file}`).catch(e=>""));
Promise.all(promises)
.then(responses => {
Highlighter.parse(codeBlock,responses.join("\n\n/*************************************/\n\n"))
});
}
}