fahrplan_download.js: mangle export filenames

This commit is contained in:
Astro 2010-10-11 02:26:59 +02:00
parent 98017c28c2
commit f8519c89b8
1 changed files with 14 additions and 1 deletions

View File

@ -137,7 +137,20 @@ var manglePath = function(path) {
var m;
if ((m = path.match(/^\/schedule\/\d+\/(.+)$/)))
return baseDir + '/' + m[1];
else
else if ((m = path.match(/^\/(xml|ical|xcal)\/(schedule|conference)\/\d+/))) {
var ext;
switch(m[1]) {
case 'ical':
ext = 'ics';
break;
case 'xcal':
ext = 'xcs';
break;
default:
ext = m[1];
}
return baseDir + '/schedule.' + ext;
} else
return baseDir + path;
};