Skip to content
Snippets Groups Projects
Commit cc7ff5e2 authored by Hotte's avatar Hotte
Browse files

+dynamic UFC Fetch

parent 0a00c722
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,13 @@ this.loaded=function(panel,config) {
img = $(panel).find("#background");
titleDiv=$(panel).find("#title span");
zeitDiv=$(panel).find("#zeit span");
$.ajax("https://ufc.tu-dortmund.de/semesters/winter2016.json",{
var semesterString = "";
if (Date.now() >= Date.UTC(new Date().getFullYear(),4,1) && Date.now() < Date.UTC(new Date().getFullYear(),10,1)) {
semesterString = "sommer"+new Date().getFullYear();
} else {
semesterString = "winter"+new Date().getFullYear();
}
$.ajax("https://ufc.tu-dortmund.de/semesters/"+semesterString+".json",{
async:false
})
.done(function(e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment