cs371-common.js 1.1 KB

123456789101112131415161718192021222324
  1. // Common code for styling all CS371 web pages
  2. if (location.href.indexOf('?') == -1) {
  3. // Force a reload by making a bogus query.
  4. var i = ((location.href.indexOf('#') + 1) || (location.href.length + 1)) - 1;
  5. location = location.href.substring(0, i) + '?' + location.href.substring(i);
  6. }
  7. markdeepOptions = {tocStyle: 'long'};
  8. document.write("<link href='https://fonts.googleapis.com/css?family=Roboto:400,300,100,100italic,300italic,400italic,700' rel='stylesheet' type='text/css'>" +
  9. "<link rel='stylesheet' type='text/css' href='cs371.css'>");
  10. // Conceal list items that use a '+', except when viewed locally
  11. if (/^file:\/{3}/i.test(window.location.href)) {
  12. document.write('<style>li.plus { color: #D88; }</style>');
  13. } else {
  14. document.write('<style>li.plus { display: none; }</style>');
  15. }
  16. document.write('<!-- Markdeep: --><style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src="markdeep.js"></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>');