Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Classlife download calendar

Classlife download calendari

Instruccions

  1. Crea un nou "preferit" (click-dret a la barra de preferits i click "Afegir Pàgina...")
  • Posa-li un nom
  • Copia el codi a sota, enganxa'l a la secció "URL".
javascript: (function() {
    $.when(
        $.getScript("https://cdn.rawgit.com/eligrey/FileSaver.js/e9d941381475b5df8b7d7691013401e171014e89/FileSaver.min.js"),
        $.getScript("https://cdn.rawgit.com/nwcell/ics.js/981e460c/ics.min.js"),
        $.Deferred(function(deferred) {
                $(deferred.resolve);
            })).done(function() {
            var cal = ics();

            var calname = '#' + $("[id^=calendar]")[0].id;
            var events = $(calname).fullCalendar('clientEvents');

            $.each(events, function(i, $event) {
                var start = ($event.start ? $event.start.format("YYYY-MM-DD HH:mm:ss") : "");
                var end = ($event.end ? $event.end.format("YYYY-MM-DD HH:mm:ss") : "");
                cal.addEvent($event.title, '', '', start, end);
            });

            cal.download('classlife-calendar', '.ics');
        });
})();
  1. Ves a la teva pàgina de calendari del classlife.

  2. Fes click al nou "Preferit" que has creat i es baixarà el calendari en format ICS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.