Fixing script elsewhere
This commit is contained in:
parent
6bfac464fa
commit
0cb1ae6197
1 changed files with 5 additions and 3 deletions
|
|
@ -1,8 +1,10 @@
|
||||||
(function () {
|
(function () {
|
||||||
|
// Check if required elements exist
|
||||||
|
const blogPostsDataElement = document.getElementById("blog-posts-data");
|
||||||
|
if (!blogPostsDataElement) return;
|
||||||
|
|
||||||
// Parse the blog posts data
|
// Parse the blog posts data
|
||||||
const postsData = JSON.parse(
|
const postsData = JSON.parse(blogPostsDataElement.textContent);
|
||||||
document.getElementById("blog-posts-data").textContent,
|
|
||||||
);
|
|
||||||
const weeksContainer = document.getElementById("weeks-container");
|
const weeksContainer = document.getElementById("weeks-container");
|
||||||
const infoDiv = document.getElementById("post-graph-info");
|
const infoDiv = document.getElementById("post-graph-info");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue