/[svn]/doc/tmpl/js/crd.js
ViewVC logotype

Diff of /doc/tmpl/js/crd.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3272 by schoenebeck, Sat Jun 3 15:38:32 2017 UTC revision 3273 by schoenebeck, Sun Jun 4 15:59:26 2017 UTC
# Line 75  function crdUpdateTOCStatus() { Line 75  function crdUpdateTOCStatus() {
75  function crdToggleTOC() {  function crdToggleTOC() {
76      $("html").toggleClass("no-toc");      $("html").toggleClass("no-toc");
77      if (typeof(Storage) !== "undefined") {      if (typeof(Storage) !== "undefined") {
78          sessionStorage.setItem("show-toc", $("html").hasClass("no-toc") ? "no" : "yes");          try {
79                sessionStorage.setItem("show-toc", $("html").hasClass("no-toc") ? "no" : "yes");
80            } catch (e) {}
81      }      }
82      crdUpdateTOCStatus();      crdUpdateTOCStatus();
83  }  }
# Line 156  $(function() { Line 158  $(function() {
158      });      });
159      var showToc = null;      var showToc = null;
160      if (typeof(Storage) !== "undefined") {      if (typeof(Storage) !== "undefined") {
161          var s = sessionStorage.getItem("show-toc");          try {
162          if (s)              var s = sessionStorage.getItem("show-toc");
163              showToc = s != "no";              if (s)
164                    showToc = s != "no";
165            } catch (e) {}
166      }      }
167      if (!$("body aside") || !$("body aside").length)      if (!$("body aside") || !$("body aside").length)
168          showToc = false;          showToc = false;

Legend:
Removed from v.3272  
changed lines
  Added in v.3273

  ViewVC Help
Powered by ViewVC