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

 
(31 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
<html>
 
<html>
<head>
 
  
 
<script>
 
<script>
Line 13: Line 12:
 
</script>
 
</script>
  
 +
<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++)
 +
    {
 +
        var elem = paragraphs[i];
 +
        if (elem.innerHTML.trim() == '<br>')
 +
        {
 +
            elem.parentNode.removeChild(elem);
 +
            i--;
 +
            len--;
 +
            continue;
 +
        }
 +
        if (elem.innerHTML.trim() == '')
 +
        {
 +
            elem.parentNode.removeChild(elem);
 +
            i--;
 +
            len--;
 +
            continue;
 +
        }
 +
    }
 +
    var brs = document.getElementById("main-div").getElementsByTagName("br");
 +
    var len = brs.length;
 +
    for (var i = 0; i < len; i++)
 +
    {
 +
        var elem = brs[i];
 +
        elem.parentNode.removeChild(elem);
 +
        i--;
 +
        len--;
 +
        continue;
 +
    }
 +
    paragraphs[paragraphs.length - 1].parentNode.removeChild(paragraphs[paragraphs.length - 1]);
 +
}
 +
</script>
  
 +
<script src="https://2015.igem.org/common/MathJax-2.5-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
  
</head>
 
 
</html>
 
</html>

Latest revision as of 16:24, 15 September 2015