Skip to content

Commit 2f7644b

Browse files
committed
Remember in a cookie that we hide the symbol side bar
1 parent adbf9a9 commit 2f7644b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

data/codebrowser.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,10 @@ $(function () {
11851185
var dfns = document.getElementsByClassName('def');
11861186
if (dfns.length) {
11871187
var dfnsDiv = $('<div id="symbolSideBox"><h3>Definitions</h3><ul></ul></div>');
1188-
dfnsDiv.find('h3').click(function(){$("#symbolSideBox ul").toggle();});
1188+
dfnsDiv.find('h3').click(function() {
1189+
var hidden = !$("#symbolSideBox ul").toggle().is(":visible");
1190+
createCookie('symboxhid', hidden, 5);
1191+
});
11891192
dfnsDiv.attr("style", "top:" + document.getElementById('header').clientHeight + "px;");
11901193
dfnsDiv.on({"mouseup": onMouseClick}, "a");
11911194

@@ -1197,6 +1200,8 @@ $(function () {
11971200
theUl.append(html);
11981201
$('#content').append('<div id="allSideBoxes">');
11991202
$('#allSideBoxes').append(dfnsDiv);
1203+
if (readCookie('symboxhid') === "true")
1204+
$("#symbolSideBox ul").hide()
12001205
}
12011206

12021207

0 commit comments

Comments
 (0)