Skip to content

Commit

Permalink
fix: error
Browse files Browse the repository at this point in the history
  • Loading branch information
prplwtf committed Oct 16, 2024
1 parent f2a53bd commit ce0d6ba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ document.addEventListener("DOMContentLoaded", (async () => {
}, 10);
}))

function Error() {
function WriteaError() {
ModifyAppTitle()
ProgressBar(100)
return App.innerHTML = `An unknown error occured, check your browser console for more information.`
Expand Down
7 changes: 4 additions & 3 deletions src/components/sections/ReadSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ async function ReadSection() {
})
.then(content => {
setTimeout(() => {
document.querySelector('[writea="read.content"]').style.opacity = 0
let ReadContent = document.getElementById('ReadContent')
ReadContent.style.opacity = 0
setTimeout(() => {
content = PreRenderBlogFeatures(content)
let MarkdownContainer = document.getElementById('MarkdownContainer')
MarkdownContainer.innerHTML = marked.parse(content)
hljs.highlightAll(document.getElementById('MarkdownContainer'))
MarkdownContainer.innerHTML = PostRenderBlogFeatures(MarkdownContainer.innerHTML)
document.querySelector('[writea="read.content"]').style.opacity = 1
ReadContent.style.opacity = 1
ProgressBar(100)
}, 225)
}, 200)
Expand Down Expand Up @@ -65,7 +66,7 @@ async function ReadSection() {
</div>
</div>
</div>
<div writea="read.content" class="p-xs-0 p-sm-5 py-5">
<div writea="read.content" id="ReadContent" class="p-xs-0 p-sm-5 py-5">
<div id="MarkdownContainer">
<p class="placeholder-wave">
<span class="opacity-25 placeholder col-12 rounded-pill"></span>
Expand Down
2 changes: 1 addition & 1 deletion src/router/Import.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function Import(url, id, callback) {

script.onerror = function() {
console.error(`Failed to load script with id "${id}"`);
return Error();
return WriteaError();
};

script.src = url;
Expand Down

0 comments on commit ce0d6ba

Please sign in to comment.