From 3d0ccfba34d6371b41e877189b78599ae7b2f98a Mon Sep 17 00:00:00 2001 From: altaf-creator Date: Sat, 16 Mar 2024 17:48:01 +0700 Subject: new branch! decided to revive this old project. lessons now support markdown, rebrand? --- scripts/toc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/toc.js') diff --git a/scripts/toc.js b/scripts/toc.js index bfdfe42..107c846 100644 --- a/scripts/toc.js +++ b/scripts/toc.js @@ -1,7 +1,7 @@ // i am a C# developer // trying javascript -window.onload = function() { +function toc() { const tocDiv = document.getElementById("toc"); const content = document.getElementById("main"); const headers = content.querySelectorAll('h1, h2, h3, h4, h5, h6'); @@ -43,4 +43,4 @@ window.onload = function() { } } } -} \ No newline at end of file +} -- cgit v1.2.3