// From docs.scala-lang.org function styleCode() { if (typeof disableStyleCode != "undefined") { return; } $(".codetabs pre code").parent().each(function() { if (!$(this).hasClass("prettyprint")) { var lang = $(this).parent().data("lang"); if (lang == "python") { lang = "py" } if (lang == "bash") { lang = "bsh" } $(this).addClass("prettyprint lang-"+lang+" linenums"); } }); console.log("runningPrettyPrint()") prettyPrint(); } function codeTabs() { var counter = 0; var langImages = { "scala": "img/scala-sm.png", "python": "img/python-sm.png", "java": "img/java-sm.png" }; $("div.codetabs").each(function() { $(this).addClass("tab-content"); // Insert the tab bar var tabBar = $('
'); $(this).before(tabBar); // Add each code sample to the tab bar: var codeSamples = $(this).children("div"); codeSamples.each(function() { $(this).addClass("tab-pane"); var lang = $(this).data("lang"); var image = $(this).data("image"); var notabs = $(this).data("notabs"); var capitalizedLang = lang.substr(0, 1).toUpperCase() + lang.substr(1); var id = "tab_" + lang + "_" + counter; $(this).attr("id", id); if (image != null && langImages[lang]) { var buttonLabel = "In This Chapter
'); makeCollapsable($('#global-toc'), "", "global-toc", "Show Table of Contents"); //styleCode(); });