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

Line 10: Line 10:
 
   ga('send', 'pageview');
 
   ga('send', 'pageview');
  
</script>
 
 
<script>
 
window.onload = function favicon()
 
{
 
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);
 
}
 
 
</script>
 
</script>
  
Line 34: Line 23:
  
 
<script>
 
<script>
window.onload = function(){
+
function doThis() {
        window.document.body.onload = doThis; // note removed parentheses
+
};
+
 
+
function doThis()
+
{
+
 
var paragraphs = document.getElementsByTagName("p");  
 
var paragraphs = document.getElementsByTagName("p");  
 
for (var i = 0, len = paragraphs.length; i < len; i++) {
 
for (var i = 0, len = paragraphs.length; i < len; i++) {
Line 50: Line 34:
 
}
 
}
 
}
 
}
 +
 +
window.onload = function(){
 +
    window.document.body.onload = doThis;
 +
    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);
 +
};
 
</script>
 
</script>
  

Revision as of 07:58, 10 September 2015