From e77161833ec583124d8633066992355e8dfd8f8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 19 Mar 2019 16:38:47 +0100 Subject: [PATCH] Updated JS script to remove original contents --- web/script.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/web/script.js b/web/script.js index a44fb20..06fae25 100644 --- a/web/script.js +++ b/web/script.js @@ -12,6 +12,7 @@ function parseMd() { aDiv.after(nodes); insertLinks() d3.selectAll("code").each(function() { hljs.highlightBlock(this); }); + removeOrigToc() addToc() }); } @@ -23,6 +24,13 @@ function insertLinks() { }) } +function removeOrigToc() { + headerContents = $('#contents') + contentsList = headerContents.next() + headerContents.remove() + contentsList.remove() +} + function addToc() { headerMain = $('#main') nodes = $.parseHTML(TOC) @@ -34,7 +42,7 @@ var TOC = '
' + '
ToC = {\n' +
 '    \'1. Collections\': [List, Dict, Set, Range, Enumerate, Namedtuple, Iterator, Generator],\n' +
 '    \'2. Types\':       [Type, String, Regex, Format, Numbers, Combinatorics, Datetimeᴺᴱᵂ],\n' +
-'    \'3. Syntax\':      [Args, Splat, Inline, Closure, Decorator, Class, Enum, Exceptions],\n' +
+'    \'3. Syntax\':      [Arguments, Splat, Inline, Closure, Decorator, Class, Enum, Exceptions],\n' +
 '    \'4. System\':      [Print, Input, Command_Line_Arguments, Open, Pathᴺᴱᵂ, Command_Execution],\n' +
 '    \'5. Data\':        [CSV, JSON, Pickle, SQLite, Bytes, Struct, Array, MemoryView, Deque],\n' +
 '    \'6. Advanced\':    [Threading, Introspection, Metaprograming, Operator, Eval, Coroutine],\n' +