Difference between revisions of "Template:Heidelberg/title"

Line 1: Line 1:
{{#tag:html|
+
    window.onload = title_update();
<script>
+
 
{{Heidelberg/title|{{{1}}}}}
+
    function title_update(){
</script>
+
        var title = "iGEM Heidelberg 2017";
}}
+
        var page = "{{{1}}}";
 +
        if(!page.startsWith("{{{1")){
 +
            title = page + " - " + title;
 +
        }
 +
        document.title = title;
 +
    }

Revision as of 00:18, 29 October 2017

   window.onload = title_update();
   function title_update(){
       var title = "iGEM Heidelberg 2017";
       var page = "{{{1}}}";
       if(!page.startsWith("{{{1")){
           title = page + " - " + title;
       }
       document.title = title;
   }