summaryrefslogtreecommitdiff
path: root/tbc
diff options
context:
space:
mode:
Diffstat (limited to 'tbc')
-rw-r--r--tbc/templates/tbc/upload-content.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/tbc/templates/tbc/upload-content.html b/tbc/templates/tbc/upload-content.html
index 5f6025c..62d2941 100644
--- a/tbc/templates/tbc/upload-content.html
+++ b/tbc/templates/tbc/upload-content.html
@@ -15,7 +15,7 @@ function validate_content()
alert("Chapter names & file fields cannot be empty !!");
return false;
}
- if(extension[1] == "ipynb")
+ if(extension.slice(Math.max(extension.length - 1, 1)) == "ipynb")
continue;
else
alert("Oops !! You can upload only Ipython Notebooks (.ipynb extension)");
@@ -32,7 +32,7 @@ function validate_content()
return false;
}
- if(extension[1] == "png")
+ if(extension.slice(Math.max(extension.length - 1, 1)) == "png")
continue;
else
alert("Only .png files are allowed for screenshots");