Difference between revisions of "Template:UiOslo Norway"

Line 480: Line 480:
  
  
<!--<script>
+
<script>
  
 
// This is the jquery part of your template.  Try not modify any of this code since it makes your menu work.
 
// This is the jquery part of your template.  Try not modify any of this code since it makes your menu work.
Line 489: Line 489:
 
 
  
if ( wgPageName.substring( 0,  8) == "Template")  {   // if the page is a template it displays the full name in a single line
+
/*if ( wgPageName.substring( 0,  8) == "Template")  {
 +
// if the page is a template it displays the full name in a single line
 
$("#team_name").html( wgPageName );  
 
$("#team_name").html( wgPageName );  
 
}
 
}
  
else if (  ( (wgPageName.match(/\//g) || []).length ) == 0 ) {  // if it is the home page , just print the team's name
+
else */
 +
 
 +
if (  ( (wgPageName.match(/\//g) || []).length ) == 0 ) {  // if it is the home page , just print the team's name
 
$("#team_name").html( wgPageName.substring( 5, wgPageName.length ) );  
 
$("#team_name").html( wgPageName.substring( 5, wgPageName.length ) );  
 
}
 
}
  
else {
+
else if {
 
// this adds the team's name as an h1
 
// this adds the team's name as an h1
 
$("#team_name").html( wgPageName.substring( 5 , wgPageName.indexOf("/")  ) );  
 
$("#team_name").html( wgPageName.substring( 5 , wgPageName.indexOf("/")  ) );  
Line 543: Line 546:
  
  
</script>-->
+
</script>
  
  
 
</html>
 
</html>

Revision as of 13:50, 29 August 2016