From 3702b06a9060b83b01dd24c116e085dc1dd7c9f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 26 Mar 2019 22:36:21 +0100 Subject: [PATCH] Script.js cleanup --- web/script.js | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/web/script.js b/web/script.js index 553f6e8..c03b717 100644 --- a/web/script.js +++ b/web/script.js @@ -5,9 +5,6 @@ $(document).ready(function() { function parseMd() { var GITHUB = 'https://raw.githubusercontent.com/gto76/python-cheatsheet/master/README.md'; jQuery.get(GITHUB, function(text) { - // console.log(text) - // text = removeMdToc(text); - // console.log(text) var converter = new showdown.Converter(); html = converter.makeHtml(text); aDiv = $('#main_container'); @@ -20,23 +17,6 @@ function parseMd() { }); } -function removeMdToc(text) { - var out = []; - lines = text.match(/[^\r\n]+/g); - insideContents = false; - for (line of lines) { - if (line.trim() === 'Contents') { - insideContents = true; - } else if (line.trim() === 'Main') { - insideContents = false; - } - if (!insideContents) { - out.push(line); - } - } - return out.join('\n'); -} - function removeOrigToc() { headerContents = $('#contents') contentsList = headerContents.next()