site

Website's source files.
Log | Files | Refs | LICENSE

main.js (1557B)


      1 /*
      2 @licstart  The following is the entire license notice for the
      3 JavaScript code in this tag.
      4 
      5 Copyright (C) 2012-2020 Free Software Foundation, Inc.
      6 
      7 The JavaScript code in this tag is free software: you can
      8 redistribute it and/or modify it under the terms of the GNU
      9 General Public License (GNU GPL) as published by the Free Software
     10 Foundation, either version 3 of the License, or (at your option)
     11 any later version.  The code is distributed WITHOUT ANY WARRANTY;
     12 without even the implied warranty of MERCHANTABILITY or FITNESS
     13 FOR A PARTICULAR PURPOSE.  See the GNU GPL for more details.
     14 
     15 As additional permission under GNU GPL version 3 section 7, you
     16 may distribute non-source (e.g., minimized or compacted) forms of
     17 that code without the copy of the GNU GPL normally required by
     18 section 4, provided you include this license notice and a URL
     19 through which recipients can access the Corresponding Source.
     20 
     21 
     22 @licend  The above is the entire license notice
     23 for the JavaScript code in this tag.
     24 */
     25 <!--/*--><![CDATA[/*><!--*/
     26  function CodeHighlightOn(elem, id)
     27  {
     28    var target = document.getElementById(id);
     29    if(null != target) {
     30      elem.cacheClassElem = elem.className;
     31      elem.cacheClassTarget = target.className;
     32      target.className = "code-highlighted";
     33      elem.className   = "code-highlighted";
     34    }
     35  }
     36  function CodeHighlightOff(elem, id)
     37  {
     38    var target = document.getElementById(id);
     39    if(elem.cacheClassElem)
     40      elem.className = elem.cacheClassElem;
     41    if(elem.cacheClassTarget)
     42      target.className = elem.cacheClassTarget;
     43  }
     44