Skip to content

Commit 06930ae

Browse files
committed
Remove TOC hide/show feature
It's only used on narrow screens, since we now show TOC on the side on wide screens. It's also is half-broken and has been for at least several months and no one noticed, so I doubt the feature is in high demand. By removing it we can get rid of Cookies jquery plugin and the associated notice about our site using cookies. .oO( mmm.... coookies )
1 parent 54fb4b3 commit 06930ae

File tree

3 files changed

+1
-187
lines changed

3 files changed

+1
-187
lines changed

html/js/jquery.cookie.js

Lines changed: 0 additions & 139 deletions
This file was deleted.

html/js/main.js

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
$(function(){
22
setup_search_box();
33
setup_auto_title_anchors();
4-
setup_collapsible_TOC();
54
setup_debug_mode();
65
$(window).resize(setup_search_box);
76
});
@@ -28,44 +27,6 @@ function setup_auto_title_anchors() {
2827
});
2928
}
3029

31-
function setup_collapsible_TOC() {
32-
var state;
33-
if ( ! $('nav.indexgroup') ) { return; }
34-
35-
// fix for jumpy .slideDown() effect
36-
$('nav.indexgroup > ol').each( function(){
37-
$(this).css( 'height', $(this).height() );
38-
});
39-
40-
state = Cookies.get('toc_state') || 'shown';
41-
if ( state == 'hidden' ) {
42-
$('nav.indexgroup > ol').hide();
43-
}
44-
45-
$('nav.indexgroup').find('#TOC_Title')
46-
.append(
47-
'<a id="TOC_toggle_button" href="#">['
48-
+ ( state == 'hidden' ? 'show' : 'hide')
49-
+ ']</a></h2>'
50-
)
51-
.find('#TOC_toggle_button')
52-
.click(function() {
53-
var el = $(this);
54-
if (el.text() == '[hide]') {
55-
Cookies.set('toc_state', 'hidden');
56-
el.parents('nav').find('tbody').hide();
57-
el.text('[show]');
58-
}
59-
else {
60-
Cookies.set('toc_state', 'shown');
61-
el.parents('nav').find('tbody').show();
62-
el.text('[hide]');
63-
}
64-
65-
return false;
66-
});
67-
}
68-
6930
document.addEventListener("keyup", function(evt){
7031
if(evt.key == "Escape"){$('#query').focus()}
7132
});

template/footer.html

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,10 @@
1313
<!--External Link Image by Zapyon, CCA-SA 4.0. Derived from Wikimedia Foundation https://commons.wikimedia.org/wiki/File:External-link-04-bold-12x12.svg -->
1414

1515
</p>
16-
<p>
17-
<small>
18-
This site uses HTTP Cookies to save your browsing preferences. If that's
19-
an issue, please <a href="https://www.google.com/search?q=block+website+from+using+cookie">
20-
configure your browser to block them</a>.
21-
</small>
22-
</p>
2316
</footer>
2417

2518
<script type="text/javascript" src="/js/jquery-3.1.1.min.js?v=1"></script>
2619
<script type="text/javascript" src="/js/jquery-ui.min.js?v=1"></script>
2720
<script type="text/javascript" src="/js/sift4-common.js?v=1"></script>
2821
<script type="text/javascript" src="/js/search.js?v=2"></script>
29-
<script type="text/javascript" src="/js/jquery.cookie.js?v=1"></script>
30-
<script type="text/javascript" src="/js/main.js?v=1"></script>
22+
<script type="text/javascript" src="/js/main.js?v=2"></script>

0 commit comments

Comments
 (0)