Skip to content

Commit e2a3488

Browse files
committed
SPARK-1135: fix broken anchors in docs
A recent PR that added Java vs Scala tabs for streaming also inadvertently added some bad code to a document.ready handler, breaking our other handler that manages scrolling to anchors correctly with the floating top bar. As a result the section title ended up always being hidden below the top bar. This removes the unnecessary JavaScript code.
1 parent c852201 commit e2a3488

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

docs/js/main.js

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,3 @@
1-
2-
// From docs.scala-lang.org
3-
function styleCode() {
4-
if (typeof disableStyleCode != "undefined") {
5-
return;
6-
}
7-
$(".codetabs pre code").parent().each(function() {
8-
if (!$(this).hasClass("prettyprint")) {
9-
var lang = $(this).parent().data("lang");
10-
if (lang == "python") {
11-
lang = "py"
12-
}
13-
if (lang == "bash") {
14-
lang = "bsh"
15-
}
16-
$(this).addClass("prettyprint lang-"+lang+" linenums");
17-
}
18-
});
19-
console.log("runningPrettyPrint()")
20-
prettyPrint();
21-
}
22-
23-
241
function codeTabs() {
252
var counter = 0;
263
var langImages = {
@@ -97,11 +74,7 @@ function viewSolution() {
9774
}
9875

9976

100-
$(document).ready(function() {
77+
$(function() {
10178
codeTabs();
10279
viewSolution();
103-
$('#chapter-toc').toc({exclude: '', context: '.container'});
104-
$('#chapter-toc').prepend('<p class="chapter-toc-header">In This Chapter</p>');
105-
makeCollapsable($('#global-toc'), "", "global-toc", "Show Table of Contents");
106-
//styleCode();
10780
});

0 commit comments

Comments
 (0)