X-Git-Url: https://git.r.bdr.sh/rbdr/lyricli.rb/blobdiff_plain/823e558b5cd2ec219d0fc7226c54f2ee7ad807d2..92c7bc006fd44f4dcd29ebaad7ee16c18aa099fc:/doc/js/app.js?ds=sidebyside
diff --git a/doc/js/app.js b/doc/js/app.js
index 3bbd61e..c150289 100644
--- a/doc/js/app.js
+++ b/doc/js/app.js
@@ -103,28 +103,34 @@ function keyboardShortcuts() {
function summaryToggle() {
$('.summary_toggle').click(function() {
- localStorage.summaryCollapsed = $(this).text();
- $(this).text($(this).text() == "collapse" ? "expand" : "collapse");
- var next = $(this).parent().parent().nextAll('ul.summary').first();
- if (next.hasClass('compact')) {
- next.toggle();
- next.nextAll('ul.summary').first().toggle();
- }
- else if (next.hasClass('summary')) {
- var list = $('
');
- list.html(next.html());
- list.find('.summary_desc, .note').remove();
- list.find('a').each(function() {
- $(this).html($(this).find('strong').html());
- $(this).parent().html($(this)[0].outerHTML);
- });
- next.before(list);
- next.toggle();
+ if (localStorage) {
+ localStorage.summaryCollapsed = $(this).text();
}
+ $('.summary_toggle').each(function() {
+ $(this).text($(this).text() == "collapse" ? "expand" : "collapse");
+ var next = $(this).parent().parent().nextAll('ul.summary').first();
+ if (next.hasClass('compact')) {
+ next.toggle();
+ next.nextAll('ul.summary').first().toggle();
+ }
+ else if (next.hasClass('summary')) {
+ var list = $('');
+ list.html(next.html());
+ list.find('.summary_desc, .note').remove();
+ list.find('a').each(function() {
+ $(this).html($(this).find('strong').html());
+ $(this).parent().html($(this)[0].outerHTML);
+ });
+ next.before(list);
+ next.toggle();
+ }
+ });
return false;
});
if (localStorage) {
- if (localStorage.summaryCollapsed == "collapse") $('.summary_toggle').click();
+ if (localStorage.summaryCollapsed == "collapse") {
+ $('.summary_toggle').first().click();
+ }
else localStorage.summaryCollapsed = "expand";
}
}