You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/src/UI/Calendar/CalendarFeedView.js

17 lines
552 B

'use strict';
define(
[
'marionette',
], function (Marionette) {
return Marionette.Layout.extend({
template: 'Calendar/CalendarFeedViewTemplate',
onRender: function() {
// hackish way to determine the correct url, as using urlBase seems to only work for reverse proxies or so
var ics = '//' + window.location.host + '/feed/calendar/NzbDrone.ics';
this.$('#ical-url').val(window.location.protocol + ics);
this.$('#ical-subscribe-button').attr('href', 'webcal:' + ics);
}
});
});