Template:CSS/UT-Tokyo/Counter/Contents

From 2014.igem.org

(Difference between revisions)
Line 481: Line 481:
document.title = "σ-Re Counter | UT-Tokyo 2014";
document.title = "σ-Re Counter | UT-Tokyo 2014";
-
if(typeof cont !== "undefined"){
+
if(typeof cont != "undefined"){
if(cont != "Team-top"){
if(cont != "Team-top"){
var op = cont.replace("-block","");
var op = cont.replace("-block","");
Line 491: Line 491:
}else{
}else{
var tmp;
var tmp;
-
if(getUrlVars()["page"]){
+
if(typeof getUrlVars()["page"] != "undefined"){
tmp = getUrlVars()["page"];
tmp = getUrlVars()["page"];
}else{
}else{
Line 513: Line 513:
if(typeof cont === "undefined"){
if(typeof cont === "undefined"){
-
if(getUrlVars()["page"]){
+
if(typeof getUrlVars()["page"] !== "undefined"){
var str = getUrlVars()["page"];
var str = getUrlVars()["page"];
}else{
}else{
Line 539: Line 539:
btnode.style.display = "block";
btnode.style.display = "block";
-
if(link){
+
if(typeof link !== "undefined"){
var href = "#" + link;
var href = "#" + link;
var target = $(href);
var target = $(href);
$("#contentsBody").mCustomScrollbar("scrollTo",target);
$("#contentsBody").mCustomScrollbar("scrollTo",target);
}else{
}else{
-
if(getUrlVars()["cont"]){
+
if(typeof getUrlVars()["cont"] !== "undefined"){
var href = "#" + getUrlVars()["cont"];
var href = "#" + getUrlVars()["cont"];
var target = $(href);
var target = $(href);
-
if(node.getElementById(getUrlVars()["cont"])){
+
if(node.getElementById(getUrlVars()["cont"]) != null){
$("#contentsBody").mCustomScrollbar("scrollTo",target);
$("#contentsBody").mCustomScrollbar("scrollTo",target);
}else{
}else{

Revision as of 07:11, 12 October 2014