Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
computerblade-official committed Jan 4, 2025
1 parent e2cb459 commit bdb65ed
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ async function getPostData(id) {
const posts = await resp.json();
const p = posts.map(post => parse(post.content));
const mp = JSON.parse(JSON.stringify(p));
id -= 1;
const lines = mp[id].split('\n');
postTitleTag.innerHTML = lines[0].replace('#', '').trim();
postImgTag.src = lines[1].replace('Image: ', '').trim();
Expand Down

0 comments on commit bdb65ed

Please sign in to comment.