Difference between revisions of "Team:Czech Republic/Template:Scripts"

 
(34 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
<html>
 
<html>
<head>
+
 
 
<script>
 
<script>
var innerHTML_collapsed = '<img id="menu_button" onclick="menuToggle()" src="static/index_menu_button.svg">';
+
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
var innerHTML_expanded = '<img id="menu_button" onclick="menuToggle()" src="static/index_menu_button.svg"><ul class="features"><li><a href="/analyzerInfo"><b>Analyzer</b></a></li><li><a href="/gibsonInfo"><b>GAS</b></a></li><li class="last"><a href="/randomizerInfo"><b>Randomizer</b></a></li></ul><ul class="about"><li><a href="/about">About</a></li><li class="last"><a target="_blank" href="http://ccy.zcu.cz">Lab page</a></li></ul><p id="version"><a href="mailto:pelisekv@students.zcu.cz" target="_top">Send Feedback</a><br><br>Team Czech Republic, 2015</p>';
+
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
 +
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
 +
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  
 +
  ga('create', 'UA-23823673-4', 'auto');
 +
  ga('send', 'pageview');
  
function menuToggle()
+
</script>
{
+
 
    if (document.getElementById('panel').className == "panel_expanded")
+
<script>
 +
function toggle_visibility(id) {
 +
      var e = document.getElementById(id);
 +
      if(e.style.display == 'block')
 +
          e.style.display = 'none';
 +
      else
 +
          e.style.display = 'block';
 +
    }
 +
</script>
 +
 
 +
<script>
 +
window.onload = function(){
 +
    var link = document.createElement('link');
 +
    link.type = 'image/x-icon';
 +
    link.rel = 'shortcut icon';
 +
    link.href = 'https://static.igem.org/mediawiki/2015/3/34/Czech_Republic_favicon.png';
 +
    document.getElementsByTagName('head')[0].appendChild(link);
 +
    var paragraphs = document.getElementsByTagName("p");
 +
    var len = paragraphs.length;
 +
    for (var i = 0; i < len; i++)  
 
     {
 
     {
         document.getElementById('panel').className = "panel_collapsed";
+
         var elem = paragraphs[i];
         document.getElementById('panel').innerHTML = innerHTML_collapsed;
+
        if (elem.innerHTML.trim() == '<br>')
 +
        {
 +
            elem.parentNode.removeChild(elem);
 +
            i--;
 +
            len--;
 +
            continue;
 +
         }
 +
        if (elem.innerHTML.trim() == '')
 +
        {
 +
            elem.parentNode.removeChild(elem);
 +
            i--;
 +
            len--;
 +
            continue;
 +
        }
 
     }
 
     }
     else
+
     var brs = document.getElementById("main-div").getElementsByTagName("br");
 +
    var len = brs.length;
 +
    for (var i = 0; i < len; i++)
 
     {
 
     {
         document.getElementById('panel').className = "panel_expanded";
+
         var elem = brs[i];
         document.getElementById('panel').innerHTML = innerHTML_expanded;
+
         elem.parentNode.removeChild(elem);
 +
        i--;
 +
        len--;
 +
        continue;
 
     }
 
     }
 +
    paragraphs[paragraphs.length - 1].parentNode.removeChild(paragraphs[paragraphs.length - 1]);
 +
}
 
</script>
 
</script>
</head>
+
 
 +
<script src="https://2015.igem.org/common/MathJax-2.5-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
 +
 
 
</html>
 
</html>

Latest revision as of 16:24, 15 September 2015