Difference between revisions of "Template:UiOslo Norway"

Line 489: Line 489:
 
 
  
/*if ( wgPageName.substring( 0,  8) == "Template")  {   
+
if ( wgPageName.substring( 0,  8) == "Template")  {   
 
  // if the page is a template it displays the full name in a single line
 
  // if the page is a template it displays the full name in a single line
 
$("#team_name").html( wgPageName );  
 
$("#team_name").html( wgPageName );  
 
}
 
}
  
else */
+
else if (  ( (wgPageName.match(/\//g) || []).length ) == 0 ) {  // if it is the home page , just print the team's name
 
+
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("/")  ) );  

Revision as of 13:51, 29 August 2016